Guile-GNOME: Gtk

version 2.16.2, updated 9 December 2011

Damon Chaplin many others

This manual is for (gnome gtk) (version 2.16.2, updated 9 December 2011) Copyright 1997-2007 Damon Chaplin and others

This work may be reproduced and distributed in whole or in part, in any medium, physical or electronic, so as long as this copyright notice remains intact and unchanged on all copies. Commercial redistribution is permitted and encouraged, but you may not redistribute, in whole or in part, under terms more restrictive than those under which you received it. If you redistribute a modified or translated version of this work, you must also make the source code to the modified or translated version available in electronic form without charge. However, mere aggregation as part of a larger work shall not count as a modification for this purpose. All code examples in this work are placed into the public domain, and may be used, modified and redistributed without restriction. BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRIT-ING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE WORK "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORREC-TION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE WORK AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAM-AGES ARISING OUT OF THE USE OR INABILITY TO USE THE WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Short Contents

1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 GtkDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 GtkInvisible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 GtkMessageDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5 GtkWindow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 6 GtkWindowGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 7 GtkAboutDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8 GtkAssistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9 GtkAccelLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 10 GtkImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 11 GtkLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 12 GtkProgressBar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 13 GtkStatusbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 14 GtkStatusIcon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 15 GtkButton. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 16 GtkCheckButton. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 17 GtkRadioButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 18 GtkToggleButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 19 GtkLinkButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 20 GtkEntry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 21 GtkEntryCompletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 22 GtkHScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 23 GtkVScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 24 GtkSpinButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 25 GtkEditable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 26 GtkTextIter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 27 GtkTextMark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 28 GtkTextBuffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 29 GtkTextTag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 30 GtkTextTagTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 31 GtkTextView. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 32 GtkTreeModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 33 GtkTreeSelection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 34 GtkTreeViewColumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 35 GtkTreeView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 36 GtkTreeView drag-and-drop. . . . . . . . . . . . . . . . . . . . . . . . . . . 215 37 GtkCellView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 38 GtkIconView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 39 GtkTreeSortable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 40 GtkTreeModelSort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 41 GtkTreeModelFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 42 GtkCellLayout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 43 GtkCellRenderer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 44 GtkCellEditable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 45 GtkCellRendererAccel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 46 GtkCellRendererCombo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 47 GtkCellRendererPixbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 48 GtkCellRendererProgress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 49 GtkCellRendererSpin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 50 GtkCellRendererText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 51 GtkCellRendererToggle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 52 GtkListStore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 53 GtkTreeStore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 54 GtkComboBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 55 GtkComboBoxEntry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 56 GtkMenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 57 GtkMenuBar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 58 GtkMenuItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 59 GtkMenuShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 60 GtkImageMenuItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 61 GtkRadioMenuItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 62 GtkCheckMenuItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 63 GtkSeparatorMenuItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 64 GtkTearoffMenuItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 65 GtkToolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 66 GtkToolItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 67 GtkSeparatorToolItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 68 GtkToolButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 69 GtkMenuToolButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 70 GtkToggleToolButton. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 71 GtkRadioToolButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 72 GtkUIManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 73 GtkActionGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 74 GtkAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 75 GtkToggleAction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 76 GtkRadioAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 77 GtkColorButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 78 GtkColorSelection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 79 GtkColorSelectionDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 80 GtkFileSelection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 81 GtkFileChooser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 82 GtkFileChooserButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 83 GtkFileChooserDialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 84 GtkFileChooserWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 85 GtkFileFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 86 GtkFontButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 87 GtkFontSelection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 88 GtkFontSelectionDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 89 GtkInputDialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 90 GtkAlignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 91 GtkAspectFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 92 GtkHBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 93 GtkVBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 94 GtkHButtonBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 95 GtkVButtonBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 96 GtkFixed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 97 GtkHPaned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 98 GtkVPaned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 99 GtkLayout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 100 GtkNotebook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 101 GtkTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 102 GtkExpander. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 103 GtkFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 104 GtkHSeparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 105 GtkVSeparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 106 GtkHScrollbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 107 GtkVScrollbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 108 GtkScrolledWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 109 GtkPrintOperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 110 GtkPrintContext. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 111 GtkPrintSettings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 112 GtkPageSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 113 GtkPaperSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 114 GtkAdjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 115 GtkArrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 116 GtkCalendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 117 GtkDrawingArea. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 118 GtkEventBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 119 GtkHandleBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 120 GtkIMContextSimple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 121 GtkIMMulticontext. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 122 GtkSizeGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 123 GtkTooltips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 124 GtkViewport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 125 GtkAccessible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 126 GtkBin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 127 GtkBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 128 GtkButtonBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 129 GtkContainer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 130 GtkItem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 131 GtkMisc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 132 GtkObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 133 GtkPaned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 134 GtkRange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 135 GtkScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 136 GtkScrollbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 137 GtkSeparator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 138 GtkWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 139 GtkIMContext. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 140 GtkPlug. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 141 GtkSocket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 142 GtkCurve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 143 GtkGammaCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 144 GtkRuler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 145 GtkHRuler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 146 GtkVRuler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 147 GtkRecentManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 148 GtkRecentChooser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 149 GtkRecentChooserDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 150 GtkRecentChooserMenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 151 GtkRecentChooserWidget . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 152 GtkRecentFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 153 Undocumented . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 Type Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 Function Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616

1 Overview

The GTK+ wrapper for Guile is a part of Guile-GNOME. It’s a good idea to read the (gnome gobject) documentation first. See Section “Contents” in Guile-GNOME: GObject.

1.1 Example usage

The following code can be found in the file gtk/examples/hello.scm in your distribution.

     (use-modules (oop goops) (gnome gobject) (gnome gtk))
     ;; define the app as a function -- there are many other ways to do
     ;; this, of course...
     (define (hello)
       ;; every widget has a class. here we define a window and a button.
       (let* ((window (make <gtk-window> #:type 'toplevel))
      (button (make <gtk-button> #:label "Hello, World!")))
         (gtk-container-set-border-width window 10)
         (gtk-container-add window button)
         ;; of course you can attach a lambda to a signal :-)
         (gtype-instance-signal-connect button 'clicked
                                        (lambda (b) (gtk-main-quit)))
         (gtk-widget-show-all window)
         ;; this will block until gtk-main-quit is called...
         (gtk-main)))
     ;; meaning this blocks until the button is clicked.
     (hello)

1.2 hello world, improved

There’s something about this that resembles programming in C a little bit too much. In Python, you can just do window.add(button). That’s a lot less typing. In GOOPS, the object framework for Guile, methods are implemented a bit differently – See Section “(gnome gobject generics)” in Guile-Gnome:GObject. If we use the GOOPS methods,

hello-generics.scm looks a bit different:
     (use-modules (oop goops) (gnome gobject) (gnome gtk)
                  (gnome gobject utils))
     (define (hello)
       (let* ((window (make <gtk-window> #:type 'toplevel))
      (button (make <gtk-button> #:label "Hello, World!")))

;; since window is a container, this generic maps onto the
;; function gtk-container-set-border-width
(set-border-width window 10)
;; note that we can set the border width with a gobject property
;; as well:
(gobject-set-property window 'border-width 15)
;; (gnome gobject generics), re-exported by (gnome gtk), defines a
;; generic `set' method for gobject-set-property, se we can also
;; do it like this:
(set window 'border-width 20)
;; or, like this, using with-accessors from (gnome gobject utils):
(with-accessors (border-width)
  (set! (border-width window) 20))
;; this is much less typing :-)
(add window button)
;; see (gnome gobject generics) for a full list of gobject generic
;; functions
(connect button 'clicked (lambda (b) (gtk-main-quit)))
;; generic functions for .defs apis are defined in the .defs files,
;; not manually
(show-all window)
(gtk-main)))
(hello)

2 GtkDialog

Create popup windows

2.1 Overview

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.

GTK+ treats a dialog 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 . This is generally used for packing buttons into the dialog which may perform functions such as cancel, ok, or apply. The two areas are separated by

a <gtk-hseparator>.
   <gtk-dialog> boxes are created with a call to gtk-dialog-new or gtk-dialog-new-
with-buttons. gtk-dialog-new-with-buttons is recommended; it allows you to set the

dialog title, some convenient flags, and add simple buttons.

If ’dialog’ is a newly created dialog, the two primary areas of the window can be ac-

cessed as ‘GTK_DIALOG(dialog)->vbox’ and ‘GTK_DIALOG(dialog)->action_area’, as can

be seen from the example, below.

A ’modal’ dialog (that is, one which freezes the rest of the application from user input), can be created by calling gtk-window-set-modal on the dialog. Use the gtk-window macro to cast the widget returned from gtk-dialog-new into a <gtk-window>. When using gtk-

dialog-new-with-buttons you can also pass the <gtk-dialog-modal> flag to make a

dialog modal.

   If you add buttons to <gtk-dialog> using gtk-dialog-new-with-buttons, gtk-
dialog-add-button, gtk-dialog-add-buttons, or gtk-dialog-add-action-widget,

clicking the button will emit a signal called "response" with a response ID that you specified. GTK+ will never assign a meaning to positive response IDs; these are entirely user-defined. But for convenience, you can use the response IDs in the <gtk-response-type> enumeration (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 gtk-dialog-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.

For the simple dialog in the following example, in reality you’d probably use <gtkmessage-dialog> to save yourself some effort. But you’d need to create the dialog contents manually if you had more than a simple message in the dialog.

     /* Function to open a dialog box displaying the message provided. */
     void quick_message (gchar *message) {

   GtkWidget *dialog, *label;
   /* Create the widgets */
   dialog = gtk_dialog_new_with_buttons ("Message",
                                         main_application_window,
                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                         GTK_STOCK_OK,
                                         GTK_RESPONSE_NONE,
                                         NULL);
   label = gtk_label_new (message);
   /* Ensure that the dialog box is destroyed when the user responds. */
   g_signal_connect_swapped (dialog,
                             "response",
                             G_CALLBACK (gtk_widget_destroy),
                             dialog);
   /* Add the label, and show everything we've added to the dialog. */
   gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
                      label);
   gtk_widget_show_all (dialog);
}

2.2 Usage

[Class] <gtk-dialog>
Derives from <gtk-window>.

This class defines the following slots:

has-separator

The dialog has a separator bar above its buttons

[Signal on <gtk-dialog>] response (arg0 <gint>)

Emitted when an action widget is clicked, the dialog receives a delete event, or the application programmer calls gtk-dialog-response. On a delete event, the response ID is <gtk-response-none>. Otherwise, it depends on which action widget was clicked.

[Signal on <gtk-dialog>] close
[Function] gtk-dialog-run (self <gtk-dialog>) ⇒ (ret int)

[Method] run

Blocks in a recursive main loop until the dialog either emits the response signal, or is destroyed. If the dialog is destroyed during the call to gtk-dialog-run, gtk dialog returns <gtk-response-none>. Otherwise, it returns the response ID from the "response" signal emission. Before entering the recursive main loop, gtk-dialog-run calls gtk-widget-show on the dialog for you. Note that you still need to show any children of the dialog yourself.

During gtk-dialog-run, the default behavior of "delete event" is disabled; if the dialog receives "delete event", it will not be destroyed as windows usually are, and gtk-

dialog-run will return <gtk-response-delete-event>. Also, during gtk-dialog-

run the dialog will be modal. You can force gtk-dialog-run to return at any time by calling gtk-dialog-response to emit the "response" signal. Destroying the dialog during gtk-dialog-run is a very bad idea, because your post-run code won’t know whether the dialog was destroyed or not.

After gtk-dialog-run returns, you are responsible for hiding or destroying the dialog if you wish to do so.

Typical usage of this function might be:

       gint result = gtk_dialog_run (GTK_DIALOG (dialog));
       switch (result)
         {
           case GTK_RESPONSE_ACCEPT:
              do_application_specific_something ();
              break;
           default:
              do_nothing_since_dialog_was_cancelled ();
              break;
         }
       gtk_widget_destroy (dialog);

Note that even though the recursive main loop gives the effect of a modal dialog (it prevents the user from interacting with other windows in the same window group while the dialog is run), callbacks such as timeouts, IO channel watches, DND drops, etc, will be triggered during a gtk-dialog-run call.

dialog  a <gtk-dialog>

ret response ID

[Function] gtk-dialog-response (self <gtk-dialog>) (response id int)
[Method] response

Emits the "response" signal with the given response ID. 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.

dialog  a <gtk-dialog>

response-id response ID

[Function] gtk-dialog-add-button (self <gtk-dialog>) (button text mchars)

(response id int) ⇒ (ret <gtk-widget>)

[Method] add-button

Adds a button with the given 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 given 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.

dialog  a <gtk-dialog>

button-text text of button, or stock ID

response-id response ID for the button

ret the button widget that was added

[Function] gtk-dialog-add-action-widget (self <gtk-dialog>)

(child <gtk-widget>) (response id int)

[Method] add-action-widget

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’ field of the <gtk-

dialog> struct.
dialog  a <gtk-dialog>

child an activatable widget

response-id response ID for child

[Function] gtk-dialog-get-has-separator (self <gtk-dialog>) ⇒ (ret bool)
[Method] get-has-separator

Accessor for whether the dialog has a separator.

dialog  a <gtk-dialog>

ret ‘#t’ if the dialog has a separator

[Function] gtk-dialog-set-default-response (self <gtk-dialog>)

(response id int)

[Method] set-default-response

Sets the last widget in the dialog’s action area with the given response-id as the default widget for the dialog. Pressing "Enter" normally activates the default widget.

dialog  a <gtk-dialog>

response-id a response ID

[Function] gtk-dialog-set-has-separator (self <gtk-dialog>) (setting bool)
[Method] set-has-separator

Sets whether the dialog has a separator above the buttons. ‘#t’ by default.

dialog  a <gtk-dialog>

setting ‘#t’ to have a separator

[Function] gtk-dialog-set-response-sensitive (self <gtk-dialog>)

(response id int) (setting bool)

[Method] set-response-sensitive
Calls ‘gtk_widget_set_sensitive (widget, setting)’ for each widget in the dia-

log’s action area with the given response-id. A convenient way to sensitize/desensitize dialog buttons.

dialog  a <gtk-dialog>

response-id a response ID

setting ‘#t’ for sensitive

[Function] gtk-dialog-get-response-for-widget (self <gtk-dialog>)
   (widget <gtk-widget>) ⇒ (ret int)
[Method] get-response-for-widget

Gets the response id of a widget in the action area of a dialog.

dialog  a <gtk-dialog>

widget a widget in the action area of dialog

ret the response id of widget, or ‘GTK_RESPONSE_NONE’ if widget doesn’t have a response id set.

Since 2.8

[Function] gtk-alternative-dialog-button-order (screen <gdk-screen>)

⇒ (ret bool) Returns ‘#t’ if dialogs are expected to use an alternative button order on the screen

screen. See gtk-dialog-set-alternative-button-order for more details about

alternative button order. If you need to use this function, you should probably connect to the ::notify:gtkalternative-button-order signal on the <gtk-settings> object associated to screen, in order to be notified if the button order setting changes.

screen a <gdk-screen>, or ‘#f’ to use the default screen

ret Whether the alternative button order should be used

Since 2.6

3 GtkInvisible

A widget which is not displayed

3.1 Overview

The <gtk-invisible> widget is used internally in GTK+, and is probably not very useful for application developers.

It is used for reliable pointer grabs and selection handling in the code for drag-and-drop.

3.2 Usage

[Class] <gtk-invisible>
Derives from <gtk-widget>.

This class defines the following slots:

screen The screen where this window will be displayed

[Function] gtk-invisible-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-invisible>.
ret  a new <gtk-invisible>.
[Function] gtk-invisible-new-for-screen (screen <gdk-screen>)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-invisible> object for a specified screen

screen a <gdk-screen> which identifies on which the new <gtk-invisible> will be created.

ret a newly created <gtk-invisible> object

Since 2.2

[Function] gtk-invisible-set-screen (self <gtk-invisible>)
   (screen <gdk-screen>)
[Method] set-screen

Sets the <gdk-screen> where the <gtk-invisible> object will be displayed.

invisible a <gtk-invisible>.
screen  a <gdk-screen>.

Since 2.2

[Function] gtk-invisible-get-screen (self <gtk-invisible>)
   ⇒ (ret <gdk-screen>)
[Method] get-screen

Returns the <gdk-screen> object associated with invisible

invisible a <gtk-invisible>.

ret the associated <gdk-screen>.

Since 2.2

4 GtkMessageDialog

A convenient message window

4.1 Overview

<gtk-message-dialog> 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-message-dialog> from <gtk-dialog> without too much effort, but <gtk-message-dialog> saves typing.

The easiest way to do a modal message dialog is to use gtk-dialog-run, though you can also pass in the ‘GTK_DIALOG_MODAL’ flag, gtk-dialog-run automatically makes the dialog modal and waits for the user to respond to it. gtk-dialog-run returns when any dialog button is clicked.

dialog = gtk_message_dialog_new (main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error loading file '%s': %s",
filename, g_strerror (errno));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);

You might do a non-modal <gtk-message-dialog> as follows:

dialog = gtk_message_dialog_new (main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error loading file '%s': %s",
filename, g_strerror (errno));
/* Destroy the dialog when the user responds to it (e.g. clicks a button) */
g_signal_connect_swapped (dialog, "response",
G_CALLBACK (gtk_widget_destroy),
dialog);

4.2 Usage

[Class] <gtk-message-dialog>
Derives from <gtk-dialog>.

This class defines the following slots:

message-type

The type of message

buttons The buttons shown in the message dialog text The primary text of the message dialog

use-markup

The primary text of the title includes Pango markup.

secondary-text

The secondary text of the message dialog

secondary-use-markup

The secondary text includes Pango markup.

image The image

[Function] gtk-message-dialog-set-markup (self <gtk-message-dialog>)
   (str mchars)
[Method] set-markup

Sets the text of the message dialog to be str, which is marked up with the Pango text markup language.

message-dialog

          a <gtk-message-dialog>

str markup string (see Pango markup format)

Since 2.4

[Function] gtk-message-dialog-set-image (self <gtk-message-dialog>)
   (image <gtk-widget>)
[Method] set-image

Sets the dialog’s image to image.

dialog  a <gtk-message-dialog>

image the image

Since 2.10

5 GtkWindow

Toplevel which can contain other widgets

5.1 Overview

5.2 Usage

[Class] <gtk-window>

Derives from <gtk-bin>. This class defines the following slots: type The type of the window title The title of the window

startup-id

Unique startup identifier for the window used by startup-notification

role Unique identifier for the window to be used when restoring a session

allow-shrink

If TRUE, the window has no mimimum size. Setting this to TRUE is 99% of the time a bad idea

allow-grow

If TRUE, users can expand the window beyond its minimum size

resizable

If TRUE, users can resize the window

modal If TRUE, the window is modal (other windows are not usable while this

one is up)

window-position

The initial position of the window

default-width

The default width of the window, used when initially showing the window

default-height

The default height of the window, used when initially showing the window

destroy-with-parent

If this window should be destroyed when the parent is destroyed

icon Icon for this window

icon-name

Name of the themed icon for this window

screen The screen where this window will be displayed

type-hint

Hint to help the desktop environment understand what kind of window this is and how to treat it.

skip-taskbar-hint

TRUE if the window should not be in the task bar.

skip-pager-hint

TRUE if the window should not be in the pager.

urgency-hint

TRUE if the window should be brought to the user’s attention.

accept-focus

TRUE if the window should receive the input focus.

focus-on-map

TRUE if the window should receive the input focus when mapped.

decorated

Whether the window should be decorated by the window manager

deletable

Whether the window frame should have a close button

gravity The window gravity of the window

transient-for

The transient parent of the dialog

opacity The opacity of the window, from 0 to 1

is-active

Whether the toplevel is the current active window

has-toplevel-focus

Whether the input focus is within this GtkWindow

[Signal on <gtk-window>] set-focus (arg0 <gtk-widget>)
[Signal on <gtk-window>] frame-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-window>] activate-focus
[Signal on <gtk-window>] activate-default
[Signal on <gtk-window>] keys-changed
[Function] gtk-window-new (type <gtk-window-type>) ⇒ (ret <gtk-widget>)

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>. If you’re implementing something like a popup menu from scratch (which is a bad

idea, just use <gtk-menu>), you might use <gtk-window-popup>. <gtk-window-

popup> is not for dialogs, though in some other toolkits dialogs are called "popups". In GTK+, <gtk-window-popup> means 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 gtk-window-

set-decorated, don’t use <gtk-window-popup>.

type type of window

ret  a new <gtk-window>.

[Function] gtk-window-set-title (self <gtk-window>) (title mchars)
[Method] set-title

Sets the title of the <gtk-window>. 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, for example.

window a <gtk-window>

title title of the window

[Function] gtk-window-set-wmclass (self <gtk-window>)

(wmclass name mchars) (wmclass class mchars)

[Method] set-wmclass

Don’t use this function. It sets the X Window System "class" and "name" hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and GTK+ sets them to that value by default, so calling this function is sort of pointless. However, you may want to call gtk-window-set-role 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.

window a <gtk-window>

wmclass-name window name hint

wmclass-class window class hint

[Function] gtk-window-set-resizable (self <gtk-window>) (resizable bool)
[Method] set-resizable

Sets whether the user can resize a window. Windows are user resizable by default.

window a <gtk-window>

resizable ‘#t’ if the user can resize this window

[Function] gtk-window-get-resizable (self <gtk-window>) ⇒ (ret bool)
[Method] get-resizable
Gets the value set by gtk-window-set-resizable.
window a <gtk-window>

ret ‘#t’ if the user can resize the window

[Function] gtk-window-add-accel-group (self <gtk-window>)
   (accel group <gtk-accel-group>)
[Method] add-accel-group

Associate accel-group with window, such that calling gtk-accel-groups-activate on window will activate accelerators in accel-group. window window to attach accelerator group to

accel-group

          a <gtk-accel-group>
[Function] gtk-window-remove-accel-group (self <gtk-window>)
   (accel group <gtk-accel-group>)
[Method] remove-accel-group
Reverses the effects of gtk-window-add-accel-group.
window a <gtk-window>

accel-group

          a <gtk-accel-group>
[Function] gtk-window-activate-focus (self <gtk-window>) ⇒ (ret bool)
[Method] activate-focus

Activates the current focused widget within the window.

window a <gtk-window>

ret ‘#t’ if a widget got activated.

[Function] gtk-window-activate-default (self <gtk-window>) ⇒ (ret bool)
[Method] activate-default

Activates the default widget for the window, unless the current focused widget has been configured to receive the default action (see <gtk-receives-default> in <gtkwidget-flags>), in which case the focused widget is activated.

window a <gtk-window>

ret ‘#t’ if a widget got activated.

[Function] gtk-window-set-modal (self <gtk-window>) (modal bool)
[Method] set-modal

Sets a window modal or non-modal. Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use gtk-window-set-transient-for to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.

window a <gtk-window>

modal whether the window is modal

[Function] gtk-window-set-default-size (self <gtk-window>) (width int)

(height int)

[Method] set-default-size

Sets the default size of a window. 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 (gtk-window-set-geometry-hints can be used to set these explicitly), the default size will be clamped to the nearest permitted size. Unlike gtk-widget-set-size-request, which sets a size request for a widget and thus would keep users from shrinking the window, this function 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

gtk-window-set-geometry-hints.

For some uses, gtk-window-resize is a more appropriate function. gtk-window-resize changes the current size of the window, rather than the size to be used on initial display. gtk-window-resize 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.

window a <gtk-window>

width width in pixels, or -1 to unset the default width

height height in pixels, or -1 to unset the default height

[Function] gtk-window-set-gravity (self <gtk-window>)
   (gravity <gdk-gravity>)
[Method] set-gravity

Window gravity defines the meaning of coordinates passed to gtk-window-move. See

gtk-window-move and <gdk-gravity> for more details.

The default window gravity is <gdk-gravity-north-west> which will typically "do what you mean."

window a <gtk-window>

gravity window gravity

[Function] gtk-window-get-gravity (self <gtk-window>)
   ⇒ (ret <gdk-gravity>)
[Method] get-gravity
Gets the value set by gtk-window-set-gravity.
window a <gtk-window>

ret window gravity

[Function] gtk-window-set-position (self <gtk-window>)
   (position <gtk-window-position>)
[Method] set-position

Sets a position constraint for this window. If the old or new constraint is ‘GTK_WIN_POS_CENTER_ALWAYS’, this will also cause the window to be repositioned to satisfy the new constraint.

window a <gtk-window>.

position a position constraint.

[Function] gtk-window-set-transient-for (self <gtk-window>)
   (parent <gtk-window>)
[Method] set-transient-for

Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window. gtk-dialog-new-with-buttons and other convenience functions in GTK+ will sometimes call gtk-window-

set-transient-for on your behalf.

On Windows, this function will and put the child window on top of the parent, much as the window manager would have done on X.

window a <gtk-window>

parent parent window

[Function] gtk-window-set-destroy-with-parent (self <gtk-window>)

(setting bool)

[Method] set-destroy-with-parent

If setting is ‘#t’, then destroying the transient parent of window will also destroy window itself. This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they’re associated with, for example.

window a <gtk-window>

setting whether to destroy window with its transient parent

[Function] gtk-window-set-screen (self <gtk-window>) (screen <gdk-screen>)
[Method] set-screen

Sets the <gdk-screen> where the window is displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.

window a <gtk-window>.
screen  a <gdk-screen>.

Since 2.2

[Function] gtk-window-get-screen (self <gtk-window>) ⇒ (ret <gdk-screen>)
[Method] get-screen

Returns the <gdk-screen> associated with window.

window a <gtk-window>.
ret  a <gdk-screen>.

Since 2.2

[Function] gtk-window-is-active (self <gtk-window>) ⇒ (ret bool)
[Method] is-active

Returns whether the window is part of the current active toplevel. (That is, the toplevel window receiving keystrokes.) The return value is ‘#t’ if the window is active toplevel itself, but also if it is, say, a <gtk-plug> embedded in the active toplevel. You might use this function if you wanted to draw a widget differently in an active window from a widget in an inactive window. See gtk-window-has-toplevel-focus

window a <gtk-window>

ret ‘#t’ if the window part of the current active window.

Since 2.4

[Function] gtk-window-has-toplevel-focus (self <gtk-window>) ⇒ (ret bool)
[Method] has-toplevel-focus

Returns whether the input focus is within this GtkWindow. For real toplevel windows, this is identical to gtk-window-is-active, but for embedded windows, like <gtkplug>, the results will differ.

window a <gtk-window>

ret ‘#t’ if the input focus is within this GtkWindow

Since 2.4

[Function] gtk-window-list-toplevels ⇒ (ret glist-of)

Returns a list of all existing toplevel windows. The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call ‘g_list_foreach (result, (GFunc)g_object_ref, NULL)’ first, and then unref all the widgets afterwards.

ret list of toplevel widgets

[Function] gtk-window-add-mnemonic (self <gtk-window>)
   (keyval unsigned-int) (target <gtk-widget>)
[Method] add-mnemonic

Adds a mnemonic to this window.

window a <gtk-window>

keyval the mnemonic

target the widget that gets activated by the mnemonic

[Function] gtk-window-remove-mnemonic (self <gtk-window>)
   (keyval unsigned-int) (target <gtk-widget>)
[Method] remove-mnemonic

Removes a mnemonic from this window.

window a <gtk-window>

keyval the mnemonic

target the widget that gets activated by the mnemonic

[Function] gtk-window-mnemonic-activate (self <gtk-window>)
   (keyval unsigned-int) (modifier <gdk-modifier-type>) ⇒ (ret bool)
[Method] mnemonic-activate

Activates the targets associated with the mnemonic.

window a <gtk-window>

keyval the mnemonic

modifier the modifiers

ret ‘#t’ if the activation is done.

[Function] gtk-window-activate-key (self <gtk-window>)
   (event <gdk-event-key>) ⇒ (ret bool)
[Method] activate-key

Activates mnemonics and accelerators for this <gtk-window>. This is normally called by the default ::key press event 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.

window a <gtk-window>
event  a <gdk-event-key>

ret ‘#t’ if a mnemonic or accelerator was found and activated.

[Function] gtk-window-propagate-key-event (self <gtk-window>)
   (event <gdk-event-key>) ⇒ (ret bool)
[Method] propagate-key-event

Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event. This is normally called by the default ::key press event and ::key release event 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.

window a <gtk-window>
event  a <gdk-event-key>

ret ‘#t’ if a widget in the focus chain handled the event.

[Function] gtk-window-get-focus (self <gtk-window>) ⇒ (ret <gtk-widget>)
[Method] get-focus

Retrieves the current focused widget within the window. Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then ‘GTK_WIDGET_HAS_FOCUS (widget)’ will not be ‘#t’ for the widget.

window a <gtk-window>

ret the currently focused widget, or ‘#f’ if there is none.

[Function] gtk-window-set-focus (self <gtk-window>) (focus <gtk-widget>)
[Method] set-focus

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. If focus is ‘#f’, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use gtk-widget-grab-focus instead of this function.

window a <gtk-window>

focus widget to be the new focus widget, or ‘#f’ to unset any focus widget for the toplevel window.

[Function] gtk-window-set-default (self <gtk-window>)

(default widget <gtk-widget>)

[Method] set-default

The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a <gtkwindow> about. When setting (rather than unsetting) the default widget it’s generally easier to call gtk-widget-grab-focus 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 gtk-widget-set-flags.
window a <gtk-window>

default-widget widget to be the default, or ‘#f’ to unset the default widget for the toplevel.

[Function] gtk-window-present (self <gtk-window>)

[Method] present

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 window is hidden, this function calls gtk-widget-show as well. This function 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 gtk-window-present to move the already-open dialog where the user can see it. If you are calling this function in response to a user interaction, it is preferable to use

gtk-window-present-with-time.
window a <gtk-window>
[Function] gtk-window-present-with-time (self <gtk-window>)
   (timestamp unsigned-int32)
[Method] present-with-time

Presents a window to the user in response to a user interaction. If you need to present

a window without a timestamp, use gtk-window-present. See gtk-window-present

for details.

window a <gtk-window>

timestamp the timestamp of the user interaction (typically a button or key press event) which triggered this call

Since 2.8

[Function] gtk-window-iconify (self <gtk-window>)

[Method] iconify

Asks to iconify (i.e. minimize) the specified 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. It’s permitted to call this function before showing a window, in which case the window will be iconified before it ever appears onscreen. You can track iconification via the "window state event" signal on <gtk-widget>.

window a <gtk-window>
[Function] gtk-window-deiconify (self <gtk-window>)
[Method] deiconify

Asks to deiconify (i.e. unminimize) the specified 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 "window state event" signal on <gtk-widget>.

window a <gtk-window>
[Function] gtk-window-stick (self <gtk-window>)

[Method] stick

Asks to stick 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. It’s permitted to call this function before showing a window. You can track stickiness via the "window state event" signal on <gtk-widget>.

window a <gtk-window>
[Function] gtk-window-unstick (self <gtk-window>)

[Method] unstick

Asks to unstick 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 "window state event" signal on <gtk-widget>.

window a <gtk-window>
[Function] gtk-window-maximize (self <gtk-window>)
[Method] maximize

Asks to maximize 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. 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 maximized when it appears onscreen initially. You can track maximization via the "window state event" signal on <gtk-widget>.

window a <gtk-window>
[Function] gtk-window-unmaximize (self <gtk-window>)
[Method] unmaximize

Asks to unmaximize 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. Just don’t write code that crashes if not. You can track maximization via the "window state event" signal on <gtk-widget>.

window a <gtk-window>
[Function] gtk-window-fullscreen (self <gtk-window>)
[Method] fullscreen

Asks to place window in the fullscreen state. Note that 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 "window state event" signal on <gtk-

widget>.
window a <gtk-window>

Since 2.2

[Function] gtk-window-unfullscreen (self <gtk-window>)
[Method] unfullscreen

Asks to toggle off the fullscreen state for 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 "window state event" signal on <gtk-

widget>.
window a <gtk-window>

Since 2.2

[Function] gtk-window-set-keep-above (self <gtk-window>) (setting bool)
[Method] set-keep-above

Asks to keep window above, so that it stays on top. 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 function before showing a window, in which case the window will be kept above when it appears onscreen initially. You can track the above state via the "window state event" signal on <gtk-widget>. Note that, according to the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) 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.

window a <gtk-window>

setting whether to keep window above other windows

Since 2.4

[Function] gtk-window-set-keep-below (self <gtk-window>) (setting bool)
[Method] set-keep-below

Asks to keep window below, so that it stays in bottom. 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 onscreen initially. You can track the below state via the "window state event" signal on <gtk-widget>. Note that, according to the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) 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.

window a <gtk-window>

setting whether to keep window below other windows

Since 2.4

[Function] gtk-window-begin-resize-drag (self <gtk-window>)

(edge <gdk-window-edge>) (button int) (root x int) (root y int)

   (timestamp unsigned-int32)
[Method] begin-resize-drag

Starts resizing a window. This function is used if an application has window resizing controls. When GDK can support it, the resize will be done using the standard mechanism for the window manager or windowing system. Otherwise, GDK will try to emulate window resizing, potentially not all that well, depending on the windowing system.

window a <gtk-window>

edge position of the resize control

button mouse button that initiated the drag root-x X position where the user clicked to initiate the drag, in root window

coordinates

root-y Y position where the user clicked to initiate the drag

timestamp timestamp from the click event that initiated the drag

[Function] gtk-window-begin-move-drag (self <gtk-window>) (button int)

(root x int) (root y int) (timestamp unsigned-int32)

[Method] begin-move-drag

Starts moving a window. This function is used if an application has window movement grips. When GDK can support it, the window movement will be done using the standard mechanism for the window manager or windowing system. Otherwise, GDK will try to emulate window movement, potentially not all that well, depending on the windowing system.

window a <gtk-window>

button mouse button that initiated the drag

root-x X position where the user clicked to initiate the drag, in root window coordinates

root-y Y position where the user clicked to initiate the drag

timestamp timestamp from the click event that initiated the drag

[Function] gtk-window-set-decorated (self <gtk-window>) (setting bool)
[Method] set-decorated

By default, windows are decorated with a title bar, resize controls, etc. Some window managers allow GTK+ to disable these decorations, creating a borderless window. If you set the decorated property to ‘#f’ using this function, GTK+ will do its best to convince the window manager not to decorate the window. Depending on the system, this function 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 function always works, since there’s no window manager policy involved.

window a <gtk-window>

setting ‘#t’ to decorate the window

[Function] gtk-window-set-deletable (self <gtk-window>) (setting bool)
[Method] set-deletable

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 ‘#f’ using this function, GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function 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 function always works, since there’s no window manager policy involved.

window a <gtk-window>

setting ‘#t’ to decorate the window as deletable

Since 2.10

[Function] gtk-window-set-frame-dimensions (self <gtk-window>) (left int)

(top int) (right int) (bottom int)

[Method] set-frame-dimensions

(Note: this is a special-purpose function intended for the framebuffer port; see gtkwindow-set-has-frame. 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 gtk-window-set-has-frame) this function can be used to change the size of the frame border.

window a <gtk-window> that has a frame

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

[Function] gtk-window-set-has-frame (self <gtk-window>) (setting bool)
[Method] set-has-frame

(Note: this is a special-purpose function for the framebuffer port, that causes GTK+ to draw its own window border. For most applications, you want gtk-window-set-decorated instead, which tells the window manager whether to draw the window border.) If this function is called on a window with setting of ‘#t’, before it is realized or showed, it will have a "frame" window around window->window, accessible in window->frame. Using the signal frame event you can receive all events targeted at the frame. This function 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.

window a <gtk-window>

setting a boolean

[Function] gtk-window-set-mnemonic-modifier (self <gtk-window>)
   (modifier <gdk-modifier-type>)
[Method] set-mnemonic-modifier

Sets the mnemonic modifier for this window.

window a <gtk-window>

modifier the modifier mask used to activate mnemonics on this window.

[Function] gtk-window-set-role (self <gtk-window>) (role mchars)
[Method] set-role

This function is only useful on X11, not with other GTK+ targets.

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.

window a <gtk-window>

role unique identifier for the window to be used when restoring a session

[Function] gtk-window-set-type-hint (self <gtk-window>)
   (hint <gdk-window-type-hint>)
[Method] set-type-hint

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 function of the window in your application.

This function should be called before the window becomes visible.

gtk-dialog-new-with-buttons and other convenience functions in GTK+ will some-

times call gtk-window-set-type-hint on your behalf.
window a <gtk-window>

hint the window type

[Function] gtk-window-set-skip-taskbar-hint (self <gtk-window>)

(setting bool)

[Method] set-skip-taskbar-hint

Windows may set a hint asking the desktop environment not to display the window in the task bar. This function sets this hint.

window a <gtk-window>

setting ‘#t’ to keep this window from appearing in the task bar

Since 2.2

[Function] gtk-window-set-skip-pager-hint (self <gtk-window>)

(setting bool)

[Method] set-skip-pager-hint

Windows may set a hint asking the desktop environment not to display the window in the pager. This function sets this hint. (A "pager" is any desktop navigation tool such as a workspace switcher that displays a thumbnail representation of the windows on the screen.)

window a <gtk-window>

setting ‘#t’ to keep this window from appearing in the pager

[Function] gtk-window-set-urgency-hint (self <gtk-window>) (setting bool)
[Method] set-urgency-hint

Windows may set a hint asking the desktop environment to draw the users attention to the window. This function sets this hint.

window a <gtk-window>

setting ‘#t’ to mark this window as urgent

Since 2.8

[Function] gtk-window-set-accept-focus (self <gtk-window>) (setting bool)
[Method] set-accept-focus

Windows may set a hint asking the desktop environment not to receive the input focus. This function sets this hint.

window a <gtk-window>

setting ‘#t’ to let this window receive input focus

Since 2.4

[Function] gtk-window-set-focus-on-map (self <gtk-window>) (setting bool)
[Method] set-focus-on-map

Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped. This function sets this hint.

window a <gtk-window>

setting ‘#t’ to let this window receive input focus on map

Since 2.6

[Function] gtk-window-get-decorated (self <gtk-window>) ⇒ (ret bool)
[Method] get-decorated

Returns whether the window has been set to have decorations such as a title bar via

gtk-window-set-decorated.
window a <gtk-window>

ret ‘#t’ if the window has been set to have decorations

[Function] gtk-window-get-deletable (self <gtk-window>) ⇒ (ret bool)
[Method] get-deletable

Returns whether the window has been set to have a close button via gtk-window-

set-deletable.
window a <gtk-window>

ret ‘#t’ if the window has been set to have a close button

Since 2.10

[Function] gtk-window-get-default-icon-list ⇒ (ret glist-of)

Gets the value set by gtk-window-set-default-icon-list. The list is a copy and should be freed with g-list-free, but the pixbufs in the list have not had their reference count incremented.

ret copy of default icon list

[Function] gtk-window-get-default-size (self <gtk-window>) ⇒ (width int)

(height int)

[Method] get-default-size

Gets the default size of the window. A value of -1 for the 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.

window a <gtk-window>

width location to store the default width, or ‘#f’

height location to store the default height, or ‘#f’

[Function] gtk-window-get-destroy-with-parent (self <gtk-window>)

⇒ (ret bool)

[Method] get-destroy-with-parent

Returns whether the window will be destroyed with its transient parent. See gtk-

window-set-destroy-with-parent.
window a <gtk-window>

ret ‘#t’ if the window will be destroyed with its transient parent.

[Function] gtk-window-get-frame-dimensions (self <gtk-window>)

⇒ (left int) (top int) (right int) (bottom int)

[Method] get-frame-dimensions

(Note: this is a special-purpose function intended for the framebuffer port; see gtkwindow-set-has-frame. 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 gdk-window-get-frame-extents to get the standard window border extents.)

Retrieves the dimensions of the frame window for this toplevel. See gtk-window-

set-has-frame, gtk-window-set-frame-dimensions.
window a <gtk-window>

left location to store the width of the frame at the left, or ‘#f’

top location to store the height of the frame at the top, or ‘#f’

right location to store the width of the frame at the returns, or ‘#f’

bottom location to store the height of the frame at the bottom, or ‘#f’

[Function] gtk-window-get-has-frame (self <gtk-window>) ⇒ (ret bool)
[Method] get-has-frame

Accessor for whether the window has a frame window exterior to window->window.

Gets the value set by gtk-window-set-has-frame.
window a <gtk-window>

ret ‘#t’ if a frame has been added to the window via gtk-window-set-has-

          frame.

[Function] gtk-window-get-icon (self <gtk-window>) ⇒ (ret <gdk-pixbuf>)
[Method] get-icon
Gets the value set by gtk-window-set-icon (or if you’ve called gtk-window-set-

icon-list, gets the first icon in the icon list).

window a <gtk-window>

ret icon for window

[Function] gtk-window-get-icon-list (self <gtk-window>) ⇒ (ret glist-of)
[Method] get-icon-list

Retrieves the list of icons set by gtk-window-set-icon-list. The list is copied, but the reference count on each member won’t be incremented.

window a <gtk-window>

ret copy of window’s icon list

[Function] gtk-window-get-icon-name (self <gtk-window>) ⇒ (ret mchars)
[Method] get-icon-name

Returns the name of the themed icon for the window, see gtk-window-set-icon-

name.
window a <gtk-window>

ret the icon name or ‘#f’ if the window has no themed icon

Since 2.6

[Function] gtk-window-get-mnemonic-modifier (self <gtk-window>)
   ⇒ (ret <gdk-modifier-type>)
[Method] get-mnemonic-modifier

Returns the mnemonic modifier for this window. See gtk-window-set-mnemonic-

modifier.
window a <gtk-window>

ret the modifier mask used to activate mnemonics on this window.

[Function] gtk-window-get-modal (self <gtk-window>) ⇒ (ret bool)
[Method] get-modal

Returns whether the window is modal. See gtk-window-set-modal.

window a <gtk-window>

ret ‘#t’ if the window is set to be modal and establishes a grab when shown

[Function] gtk-window-get-position (self <gtk-window>) ⇒ (root x int)

(root y int)

[Method] get-position

This function returns the position you need to pass to gtk-window-move to keep window in its current position. This means that the meaning of the returned value varies with window gravity. See gtk-window-move for more details. If you haven’t changed the window gravity, its gravity will be <gdk-gravity-north-west>. This means that gtk-window-get-position gets the position of the top-left corner of the window manager frame for the window. gtk-window-move sets the position of this same top-left corner. gtk-window-get-position 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 GTK+ 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 gtk-window-get-position tends to result in moving the window slightly. Window managers are slowly getting better over time. If a window has gravity <gdk-gravity-static> the window manager frame is not relevant, and thus gtk-window-get-position 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 "Gnome-Client" object in the GNOME libraries for example) and allow the window manager to save your window sizes and positions.

window a <gtk-window>

root-x return location for X coordinate of gravity-determined reference p\oint

root-y return location for Y coordinate of gravity-determined reference p\oint

[Function] gtk-window-get-role (self <gtk-window>) ⇒ (ret mchars)
[Method] get-role

Returns the role of the window. See gtk-window-set-role for further explanation.

window a <gtk-window>

ret the role of the window if set, or ‘#f’. The returned is owned by the widget and must not be modified or freed.

[Function] gtk-window-get-size (self <gtk-window>) ⇒ (width int)

(height int)

[Method] get-size

Obtains the current size of window. If window is not onscreen, it returns the size GTK+ 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 gtk-window-get-size is the last size received in a <gdk-event-configure>, that is, GTK+ uses its locally-stored size, rather than querying the X server for the size. As a result, if you call gtk-window-resize then immediately call gtk-window-get-size, the size won’t have taken effect yet. After the window manager processes the resize request, GTK+ receives notification that the size has changed via a configure event, and the size of the window gets updated. Note 1: Nearly any use of this function 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 <gdk-event-configure>. Note 2: The returned size does not include the size of the window manager decorations (aka the window frame or border). Those are not drawn by GTK+ and GTK+ has no reliable method of determining their size. Note 3: If you are getting a window size in order to position the window onscreen, there may be a better way. The preferred way is to simply set the window’s semantic type with gtk-window-set-type-hint, which allows the window manager to e.g. center dialogs. Also, if you set the transient parent of dialogs with gtk-window-set-transient-for 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 - gtk-window-set-position will frequently handle the details for you.

window a <gtk-window>

width return location for width, or ‘#f’

height return location for height, or ‘#f’

[Function] gtk-window-get-title (self <gtk-window>) ⇒ (ret mchars)
[Method] get-title

Retrieves the title of the window. See gtk-window-set-title.

window a <gtk-window>

ret the title of the window, or ‘#f’ if none has been set explicitely. The returned string is owned by the widget and must not be modified or freed.

[Function] gtk-window-get-transient-for (self <gtk-window>)
   ⇒ (ret <gtk-window>)
[Method] get-transient-for

Fetches the transient parent for this window. See gtk-window-set-transient-for.

window a <gtk-window>

ret the transient parent for this window, or ‘#f’ if no transient parent has been set.

[Function] gtk-window-get-type-hint (self <gtk-window>)
   ⇒ (ret <gdk-window-type-hint>)
[Method] get-type-hint

Gets the type hint for this window. See gtk-window-set-type-hint.

window a <gtk-window>

ret the type hint for window.

[Function] gtk-window-get-skip-taskbar-hint (self <gtk-window>)

⇒ (ret bool)

[Method] get-skip-taskbar-hint
Gets the value set by gtk-window-set-skip-taskbar-hint
window a <gtk-window>

ret ‘#t’ if window shouldn’t be in taskbar Since 2.2

[Function] gtk-window-get-skip-pager-hint (self <gtk-window>)

⇒ (ret bool)

[Method] get-skip-pager-hint
Gets the value set by gtk-window-set-skip-pager-hint.
window a <gtk-window>

ret ‘#t’ if window shouldn’t be in pager Since 2.2

[Function] gtk-window-get-urgency-hint (self <gtk-window>) ⇒ (ret bool)
[Method] get-urgency-hint
Gets the value set by gtk-window-set-urgency-hint
window a <gtk-window>

ret ‘#t’ if window is urgent Since 2.8

[Function] gtk-window-get-accept-focus (self <gtk-window>) ⇒ (ret bool)
[Method] get-accept-focus
Gets the value set by gtk-window-set-accept-focus.
window a <gtk-window>

ret ‘#t’ if window should receive the input focus Since 2.4

[Function] gtk-window-get-focus-on-map (self <gtk-window>) ⇒ (ret bool)
[Method] get-focus-on-map
Gets the value set by gtk-window-set-focus-on-map.
window a <gtk-window>

ret ‘#t’ if window should receive the input focus when mapped. Since 2.6

[Function] gtk-window-get-group (self <gtk-window>)
   ⇒ (ret <gtk-window-group>)
[Method] get-group

Returns the group for window or the default group, if window is ‘#f’ or if window does not have an explicit window group.

window a <gtk-window>, or ‘#f’

ret the <gtk-window-group> for a window or the default group

Since 2.10

[Function] gtk-window-move (self <gtk-window>) (x int) (y int)

[Method] move

Asks the window manager to move window to the given position. Window managers are free to ignore this; 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. Note: 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 <gdk-gravity-north-west>, so the reference point is simply the x, y supplied to gtk-window-move. 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 <gdkgravity-north-west>) and move the window to 0,0. To position a window at the bottom right corner of the screen, you would set <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 write: ‘gtk_window_move (window, gdk-screen-width - window_width,
gdk-screen-height - window_height)’ (note that this example does not take

multi-head scenarios into account). The Extended Window Manager Hints specification at http://www.freedesktop.org/Standards/wm-spec

(http://www.freedesktop.org/Standards/wm-spec) has a nice table of gravities

in the "implementation notes" section. The gtk-window-get-position documentation may also be relevant.

window a <gtk-window>

x X coordinate to move window to

y Y coordinate to move window to

[Function] gtk-window-parse-geometry (self <gtk-window>) (geometry mchars)

⇒ (ret bool)

[Method] parse-geometry

Parses a standard X Window System geometry string - see the manual page for X (type ’man X’) for details on this. gtk-window-parse-geometry does work on all GTK+ 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, gtk-window-

parse-geometry returns ‘#t’ and calls gtk-window-set-default-size and/or gtk-

window-move to resize/move the window.

If gtk-window-parse-geometry returns ‘#t’, it will also set the <gdk-hint-user-

pos> and/or <gdk-hint-user-size> hints indicating to the window manager that the size/position of the window was user-specified. This causes most window managers to honor the geometry.

Note that for gtk-window-parse-geometry to work as expected, it has to be called when the window has its "final" size, i.e. after calling gtk-widget-show-all on the

contents and gtk-window-set-geometry-hints on the window.
#include <gtk/gtk.h>
static void
fill_with_content (GtkWidget *vbox)
{
/* fill with content... */
}
int
main (int argc, char *argv[])
{
GtkWidget *window, *vbox;
GdkGeometry size_hints = {
  100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
};
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
fill_with_content (vbox);
gtk_widget_show_all (vbox);
gtk_window_set_geometry_hints (GTK_WINDOW (window),
     window,
  &size_hints,
  GDK_HINT_MIN_SIZE |
  GDK_HINT_BASE_SIZE |
  GDK_HINT_RESIZE_INC);
if (argc > 1)
  {
    if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
      fprintf (stderr, "Failed to parse '%s'\n", argv[1]);
  }

       gtk_widget_show_all (window);
       gtk_main ();
       return 0;
     }
window a <gtk-window>

geometry geometry string

ret ‘#t’ if string was parsed successfully

[Function] gtk-window-reshow-with-initial-size (self <gtk-window>)
[Method] reshow-with-initial-size

Hides window, then reshows it, resetting the default size and position of the window. Used by GUI builders only.

window a <gtk-window>
[Function] gtk-window-resize (self <gtk-window>) (width int) (height int)

[Method] resize

Resizes the window 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 gtk-widget-set-size-request to set the window’s request to a smaller value.

If gtk-window-resize is called before showing a window for the first time, it overrides

any default size set with gtk-window-set-default-size.

Windows may not be resized smaller than 1 by 1 pixels.

window a <gtk-window>

width width in pixels to resize the window to

height height in pixels to resize the window to

[Function] gtk-window-set-default-icon-list (list glist-of)

Sets an icon list to be used as fallback for windows that haven’t had gtk-window-set-icon-list 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 gtk-window-set-icon-list for more details.
list  a list of <gdk-pixbuf>
[Function] gtk-window-set-default-icon (icon <gdk-pixbuf>)

Sets an icon to be used as fallback for windows that haven’t had gtk-window-set-icon called on them from a pixbuf.

icon the icon

[Function] gtk-window-set-default-icon-name (name mchars)

Sets an icon to be used as fallback for windows that haven’t had gtk-window-set-icon-list called on them from a named themed icon, see gtk-window-set-icon-

name.

name the name of the themed icon

Since 2.6

[Function] gtk-window-set-icon (self <gtk-window>) (icon <gdk-pixbuf>)
[Method] set-icon

Sets up the icon representing a <gtk-window>. 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 GTK+. 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 gtk-window-set-icon-list. Then the best size will be used. This function is equivalent to calling gtk-window-set-icon-list with a 1-element list. See also gtk-window-set-default-icon-list to set the icon for all windows in your application in one go.

window a <gtk-window>

icon icon image, or ‘#f’

[Function] gtk-window-set-icon-list (self <gtk-window>) (list glist-of)
[Method] set-icon-list

Sets up the icon representing a <gtk-window>. 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. gtk-window-set-icon-list allows you to pass in the same icon in several handdrawn sizes. The list should contain the natural sizes your icon is available in; that is, don’t scale the image before passing it to GTK+. 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. Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them. See also gtk-window-set-default-icon-list 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 gtk-window-set-transient-for) will inherit their icon from their transient parent. So there’s no need to explicitly set the icon on transient windows.

window a <gtk-window>
list  list of <gdk-pixbuf>

[Function] gtk-window-set-icon-from-file (self <gtk-window>)

(filename mchars) ⇒ (ret bool)

[Method] set-icon-from-file

Sets the icon for window. Warns on failure if err is ‘#f’. This function is equivalent to calling gtk-window-set-icon with a pixbuf created by loading the image from filename.

window a <gtk-window>

filename location of icon file

err location to store error, or ‘#f’.

ret ‘#t’ if setting the icon succeeded.

Since 2.2

[Function] gtk-window-set-icon-name (self <gtk-window>) (name mchars)
[Method] set-icon-name

Sets the icon for the window from a named themed icon. See the docs for <gtk-icon-theme> for more details. Note that this has nothing to do with the WM ICON NAME property which is mentioned in the ICCCM.

window a <gtk-window>

name the name of the themed icon

Since 2.6

6 GtkWindowGroup

Limit the effect of grabs

6.1 Overview

6.2 Usage

[Class] <gtk-window-group>

Derives from <gobject>. This class defines no direct slots.

[Function] gtk-window-group-new ⇒ (ret <gtk-window-group>)

Creates a new <gtk-window-group> object. Grabs added with gtk-grab-add only affect windows within the same <gtk-window-group>.

ret  a new <gtk-window-group>.
[Function] gtk-window-group-add-window (self <gtk-window-group>)
   (window <gtk-window>)
[Method] add-window
Adds a window to a <gtk-window-group>.

window-group

          a <gtk-window-group>

window the <gtk-window> to add

[Function] gtk-window-group-remove-window (self <gtk-window-group>)
   (window <gtk-window>)
[Method] remove-window

Removes a window from a <gtk-window-group>.

window-group

          a <gtk-window-group>

window the <gtk-window> to remove

7 GtkAboutDialog

Display information about an application

7.1 Overview

The <gtk-about-dialog> 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 ‘About’ option from the ‘Help’ menu. All parts of the dialog are optional.

About dialog often contain links and email addresses. <gtk-about-dialog> supports this by offering global hooks, which are called when the user clicks on a link or email

address, see gtk-about-dialog-set-email-hook and gtk-about-dialog-set-url-hook.

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.

To make constructing a <gtk-about-dialog> as convenient as possible, you can use the function gtk-show-about-dialog which constructs and shows a dialog and keeps it around so that it can be shown again.

7.2 Usage

[Class] <gtk-about-dialog>
     Derives from <gtk-dialog>.

This class defines the following slots:

     program-name

The name of the program. If this is not set, it defaults to g get application name()

version The version of the program

     copyright

Copyright information for the program

comments Comments about the program

website The URL for the link to the website of the program

     website-label

The label for the link to the website of the program. If this is not set, it defaults to the URL

license The license of the program

authors List of authors of the program

     documenters

List of people documenting the program

     translator-credits

Credits to the translators. This string should be marked as translatable artists List of people who have contributed artwork to the program

logo A logo for the about box. If this is not set, it defaults to gtk window get default icon list()

logo-icon-name

A named icon to use as the logo for the about box.

wrap-license

Whether to wrap the license text.

[Function] gtk-about-dialog-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-about-dialog>.
ret  a newly created <gtk-about-dialog>

Since 2.6

[Function] gtk-about-dialog-get-name (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-name

Returns the program name displayed in the about dialog.

about  a <gtk-about-dialog>

ret The program name. The string is owned by the about dialog and must not be modified.

Since 2.6

[Function] gtk-about-dialog-set-name (self <gtk-about-dialog>)
   (name mchars)
[Method] set-name

Sets the name to display in the about dialog. If this is not set, it defaults to g-get-

application-name.
about  a <gtk-about-dialog>

name the program name

Since 2.6

[Function] gtk-about-dialog-get-version (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-version

Returns the version string.

about  a <gtk-about-dialog>

ret The version string. The string is owned by the about dialog and must not be modified.

[Function] gtk-about-dialog-set-version (self <gtk-about-dialog>)

(version mchars)

[Method] set-version

Sets the version string to display in the about dialog.

about  a <gtk-about-dialog>

version the version string

Since 2.6

[Function] gtk-about-dialog-get-copyright (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-copyright

Returns the copyright string.

about  a <gtk-about-dialog>

ret The copyright string. The string is owned by the about dialog and must not be modified.

Since 2.6

[Function] gtk-about-dialog-set-copyright (self <gtk-about-dialog>)

(copyright mchars)

[Method] set-copyright

Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.

about  a <gtk-about-dialog>

copyright the copyright string

Since 2.6

[Function] gtk-about-dialog-get-license (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-license

Returns the license information.

about  a <gtk-about-dialog>

ret The license information. The string is owned by the about dialog and must not be modified.

Since 2.6

[Function] gtk-about-dialog-set-license (self <gtk-about-dialog>)

(license mchars)

[Method] set-license

Sets the license information to be displayed in the secondary license dialog. If license is ‘#f’, the license button is hidden.

about  a <gtk-about-dialog>

license the license information or ‘#f’

Since 2.6

[Function] gtk-about-dialog-get-wrap-license (self <gtk-about-dialog>)

⇒ (ret bool)

[Method] get-wrap-license

Returns whether the license text in about is automatically wrapped.

about  a <gtk-about-dialog>

ret ‘#t’ if the license text is wrapped

Since 2.8

[Function] gtk-about-dialog-set-wrap-license (self <gtk-about-dialog>)

(wrap license bool)

[Method] set-wrap-license

Sets whether the license text in about is automatically wrapped.

about  a <gtk-about-dialog>

wrap-license whether to wrap the license

Since 2.8

[Function] gtk-about-dialog-get-website (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-website

Returns the website URL.

about  a <gtk-about-dialog>

ret The website URL. The string is owned by the about dialog and must not be modified.

Since 2.6

[Function] gtk-about-dialog-set-website (self <gtk-about-dialog>)

(website mchars)

[Method] set-website

Sets the URL to use for the website link.

about  a <gtk-about-dialog>

website a URL string starting with "http://"

Since 2.6

[Function] gtk-about-dialog-get-website-label (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-website-label

Returns the label used for the website link.

about  a <gtk-about-dialog>

ret The label used for the website link. The string is owned by the about dialog and must not be modified.

Since 2.6

[Function] gtk-about-dialog-set-website-label (self <gtk-about-dialog>)

(website label mchars)

[Method] set-website-label

Sets the label to be used for the website link. It defaults to the website URL.

about  a <gtk-about-dialog>

website-label the label used for the website link

Since 2.6

[Function] gtk-about-dialog-get-logo (self <gtk-about-dialog>)
   ⇒ (ret <gdk-pixbuf>)
[Method] get-logo

Returns the pixbuf displayed as logo in the about dialog.

about  a <gtk-about-dialog>

ret the pixbuf displayed as logo. The pixbuf is owned by the about dialog. If you want to keep a reference to it, you have to call g-object-ref on it.

Since 2.6

[Function] gtk-about-dialog-set-logo (self <gtk-about-dialog>)
   (logo <gdk-pixbuf>)
[Method] set-logo

Sets the pixbuf to be displayed as logo in the about dialog. If it is ‘#f’, the default window icon set with gtk-window-set-default-icon will be used.

about  a <gtk-about-dialog>
logo  a <gdk-pixbuf>, or ‘#f’

Since 2.6

[Function] gtk-about-dialog-get-logo-icon-name (self <gtk-about-dialog>)
   ⇒ (ret mchars)
[Method] get-logo-icon-name

Returns the icon name displayed as logo in the about dialog.

about  a <gtk-about-dialog>

ret the icon name displayed as logo. The string is owned by the dialog. If you want to keep a reference to it, you have to call g-strdup on it.

Since 2.6

[Function] gtk-about-dialog-set-logo-icon-name (self <gtk-about-dialog>)

(icon name mchars)

[Method] set-logo-icon-name

Sets the pixbuf to be displayed as logo in the about dialog. If it is ‘#f’, the default window icon set with gtk-window-set-default-icon will be used.

about  a <gtk-about-dialog>

icon-name an icon name, or ‘#f’

Since 2.6

8 GtkAssistant

A widget used to guide users through multi-step operations

8.1 Overview

A <gtk-assistant> is a widget used to represent a generally complex operation splitted in several steps, guiding the user through its pages and controlling the page flow to collect the necessary data.

8.2 Usage

[Class] <gtk-assistant>
Derives from <gtk-window>.

This class defines no direct slots.

[Signal on <gtk-assistant>] close

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. Since 2.10

[Signal on <gtk-assistant>] cancel

The ::cancel signal is emitted when then the cancel button is clicked. Since 2.10

[Signal on <gtk-assistant>] prepare (arg0 <gtk-widget>)

The ::prepared signal is emitted when a new page is set as the assistant’s current page, before making the new page visible. A handler for this signal can do any preparation which are necessary before showing page. Since 2.10

[Signal on <gtk-assistant>] apply

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. Since 2.10

[Function] gtk-assistant-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-assistant>.

ret a newly created <gtk-assistant>

Since 2.10

[Function] gtk-assistant-get-current-page (self <gtk-assistant>)

⇒ (ret int)

[Method] get-current-page

Returns the page number of the current page

assistant a <gtk-assistant>

ret The index (starting from 0) of the current page in the assistant, if the assistant has no pages, -1 will be returned

Since 2.10

[Function] gtk-assistant-set-current-page (self <gtk-assistant>)

(page num int)

[Method] set-current-page

Switches the page to page-num. Note that this will only be necessary in custom buttons, as the assistant flow can be set with gtk-assistant-set-forward-page-

func.
assistant a <gtk-assistant>

page-num 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, nothing will be done.

Since 2.10

[Function] gtk-assistant-get-n-pages (self <gtk-assistant>) ⇒ (ret int)
[Method] get-n-pages

Returns the number of pages in the assistant

assistant a <gtk-assistant>

ret The number of pages in the assistant.

Since 2.10

[Function] gtk-assistant-get-nth-page (self <gtk-assistant>)
   (page num int) ⇒ (ret <gtk-widget>)
[Method] get-nth-page

Returns the child widget contained in page number page-num.

assistant a <gtk-assistant>

page-num The index of a page in the assistant, or -1 to get the last page;

ret The child widget, or ‘#f’ if page-num is out of bounds.

Since 2.10

[Function] gtk-assistant-prepend-page (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret int)
[Method] prepend-page

Prepends a page to the assistant.

assistant a <gtk-assistant>

page  a <gtk-widget>

ret the index (starting at 0) of the inserted page Since 2.10

[Function] gtk-assistant-append-page (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret int)
[Method] append-page

Appends a page to the assistant.

assistant a <gtk-assistant>
page  a <gtk-widget>

ret the index (starting at 0) of the inserted page Since 2.10

[Function] gtk-assistant-insert-page (self <gtk-assistant>)

(page <gtk-widget>) (position int) ⇒ (ret int)

[Method] insert-page

Inserts a page in the assistant at a given position.

assistant a <gtk-assistant>
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

ret the index (starting from 0) of the inserted page Since 2.10

[Function] gtk-assistant-set-page-type (self <gtk-assistant>)
   (page <gtk-widget>) (type <gtk-assistant-page-type>)
[Method] set-page-type

Sets the page type for page. The page type determines the page behavior in the assistant.

assistant a <gtk-assistant>

page a page of assistant type the new type for page Since 2.10

[Function] gtk-assistant-get-page-type (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret <gtk-assistant-page-type>)
[Method] get-page-type

Gets the page type of page.

assistant a <gtk-assistant>

page a page of assistant ret the page type of page. Since 2.10

[Function] gtk-assistant-set-page-title (self <gtk-assistant>)
   (page <gtk-widget>) (title mchars)
[Method] set-page-title

Sets a title for page. The title is displayed in the header area of the assistant when page is the current page.

assistant a <gtk-assistant>

page a page of assistant

title the new title for page

Since 2.10

[Function] gtk-assistant-get-page-title (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret mchars)
[Method] get-page-title

Gets the title for page.

assistant a <gtk-assistant>

page a page of assistant

ret the title for page.

Since 2.10

[Function] gtk-assistant-set-page-header-image (self <gtk-assistant>)
   (page <gtk-widget>) (pixbuf <gdk-pixbuf>)
[Method] set-page-header-image

Sets a header image for page. This image is displayed in the header area of the assistant when page is the current page.

assistant a <gtk-assistant>

page a page of assistant

pixbuf the new header image page

Since 2.10

[Function] gtk-assistant-get-page-header-image (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret <gdk-pixbuf>)
[Method] get-page-header-image

Gets the header image for page.

assistant a <gtk-assistant>

page a page of assistant

ret the header image for page, or ‘#f’ if there’s no header image for the page.

Since 2.10

[Function] gtk-assistant-set-page-side-image (self <gtk-assistant>)
   (page <gtk-widget>) (pixbuf <gdk-pixbuf>)
[Method] set-page-side-image

Sets a header image for page. This image is displayed in the side area of the assistant when page is the current page.

assistant a <gtk-assistant>

page a page of assistant pixbuf the new header image page Since 2.10

[Function] gtk-assistant-get-page-side-image (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret <gdk-pixbuf>)
[Method] get-page-side-image

Gets the header image for page.

assistant a <gtk-assistant>

page a page of assistant ret the side image for page, or ‘#f’ if there’s no side image for the page. Since 2.10

[Function] gtk-assistant-set-page-complete (self <gtk-assistant>)
   (page <gtk-widget>) (complete bool)
[Method] set-page-complete

Sets whether page contents are complete. This will make assistant update the buttons state to be able to continue the task.

assistant a <gtk-assistant>

page a page of assistant complete the completeness status of the page Since 2.10

[Function] gtk-assistant-get-page-complete (self <gtk-assistant>)
   (page <gtk-widget>) ⇒ (ret bool)
[Method] get-page-complete

Gets whether page is complete..

assistant a <gtk-assistant>

page a page of assistant ret ‘#t’ if page is complete. Since 2.10

[Function] gtk-assistant-add-action-widget (self <gtk-assistant>)
   (child <gtk-widget>)
[Method] add-action-widget

Adds a widget to the action area of a <gtk-assistant>.

assistant a <gtk-assistant>
child  a <gtk-widget>

Since 2.10

[Function] gtk-assistant-remove-action-widget (self <gtk-assistant>)
   (child <gtk-widget>)
[Method] remove-action-widget

Removes a widget from the action area of a <gtk-assistant>.

assistant a <gtk-assistant>
child  a <gtk-widget>

Since 2.10

[Function] gtk-assistant-update-buttons-state (self <gtk-assistant>)
[Method] update-buttons-state

Forces assistant to recompute the buttons state. GTK+ 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.

assistant a <gtk-assistant>

Since 2.10

9 GtkAccelLabel

A label which displays an accelerator key on the right of the text

9.1 Overview

The <gtk-accel-label> widget is a subclass of <gtk-label> that also displays an accelerator key on the right of the label text, e.g. ’Ctl+S’. It is commonly used in menus to show the keyboard short-cuts for commands.

The accelerator key to display is not set explicitly. Instead, the <gtk-accel-label> displays the accelerators which have been added to a particular widget. This widget is set

by calling gtk-accel-label-set-accel-widget.

For example, a <gtk-menu-item> widget may have an accelerator added to emit the "activate" signal when the ’Ctl+S’ key combination is pressed. A <gtk-accel-label> is

created and added to the <gtk-menu-item>, and gtk-accel-label-set-accel-widget is

called with the <gtk-menu-item> as the second argument. The <gtk-accel-label> will now display ’Ctl+S’ after its label.

   Note that creating a <gtk-menu-item> with gtk-menu-item-new-with-label (or one of
the similar functions for <gtk-check-menu-item> and <gtk-radio-menu-item>) automat-
ically adds a <gtk-accel-label> to the <gtk-menu-item> and calls gtk-accel-label-
set-accel-widget to set it up for you.

A <gtk-accel-label> will only display accelerators which have ‘GTK_ACCEL_VISIBLE’ set (see <gtk-accel-flags>). A <gtk-accel-label> can display multiple accelerators and even signal names, though it is almost always used to display just one accelerator key.

       GtkWidget *save_item;
       GtkAccelGroup *accel_group;
       /* Create a GtkAccelGroup and add it to the window. */
       accel_group = gtk_accel_group_new ();
       gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
       /* Create the menu item using the convenience function. */
       save_item = gtk_menu_item_new_with_label ("Save");
       gtk_widget_show (save_item);
       gtk_container_add (GTK_CONTAINER (menu), save_item);
       /* Now add the accelerator to the GtkMenuItem. Note that since we called
          gtk_menu_item_new_with_label() to create the GtkMenuItem the
          GtkAccelLabel is automatically set up to display the GtkMenuItem
          accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */
       gtk_widget_add_accelerator (save_item, "activate", accel_group,
                                   GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);

9.2 Usage

[Class] <gtk-accel-label>

Derives from <gtk-label>. This class defines the following slots:

accel-closure

The closure to be monitored for accelerator changes

accel-widget

The widget to be monitored for accelerator changes

[Function] gtk-accel-label-new (string mchars) ⇒ (ret <gtk-widget>)
Creates a new <gtk-accel-label>.

string the label string. Must be non-‘#f’.

ret  a new <gtk-accel-label>.
[Function] gtk-accel-label-set-accel-closure (self <gtk-accel-label>)

(accel closure <gclosure>)

[Method] set-accel-closure

Sets the closure to be monitored by this accelerator label. The closure must be connected to an accelerator group; see gtk-accel-group-connect.

accel-label a <gtk-accel-label>

accel-closure the closure to monitor for accelerator changes.

[Function] gtk-accel-label-get-accel-widget (self <gtk-accel-label>)
   ⇒ (ret <gtk-widget>)
[Method] get-accel-widget

Fetches the widget monitored by this accelerator label. See gtk-accel-label-set-

accel-widget.
accel-label a <gtk-accel-label>

ret the object monitored by the accelerator label, or ‘#f’.

[Function] gtk-accel-label-set-accel-widget (self <gtk-accel-label>)

(accel widget <gtk-widget>)

[Method] set-accel-widget

Sets the widget to be monitored by this accelerator label.

accel-label a <gtk-accel-label>

accel-widget the widget to be monitored.

[Function] gtk-accel-label-get-accel-width (self <gtk-accel-label>)
   ⇒ (ret unsigned-int)
[Method] get-accel-width

Returns the width needed to display the accelerator key(s). This is used by menus to align all of the <gtk-menu-item> widgets, and shouldn’t be needed by applications.

accel-label a <gtk-accel-label>.

ret the width needed to display the accelerator key(s).

[Function] gtk-accel-label-refetch (self <gtk-accel-label>) ⇒ (ret bool)

[Method] refetch

Recreates the string representing the accelerator keys. This should not be needed since the string is automatically updated whenever accelerators are added or removed from the associated widget.

accel-label a <gtk-accel-label>.

ret always returns ‘#f’.

10 GtkImage

A widget displaying an image

10.1 Overview

The <gtk-image> widget displays an image. Various kinds of object can be displayed as an image; most typically, you would load a <gdk-pixbuf> ("pixel buffer") from a file, and then display that. There’s a convenience function to do this, gtk-image-new-from-file, used as follows: 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 gdk-

pixbuf-new-from-file, then create the <gtk-image> with gtk-image-new-from-pixbuf.
       GtkWidget *image;
       image = gtk_image_new_from_file ("myfile.png");

The image file may contain an animation, if so the <gtk-image> will display an animation (<gdk-pixbuf-animation>) 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 <gtk-misc> methods.

<gtk-image> is a "no window" widget (has no <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-event-box>, then connect to the event signals on the event box.

       static gboolean
       button_press_callback (GtkWidget      *event_box,
                              GdkEventButton *event,
                              gpointer        data)
       {
         g_print ("Event box clicked at coordinates %f,%f\n",
                  event->x, event->y);
         /* Returning TRUE means we handled the event, so the signal
          * emission should be stopped (don't call any further
          * callbacks that may be connected). Return FALSE
          * to continue invoking callbacks.
          */
         return TRUE;
       }
       static GtkWidget*
       create_image (void)
       {
         GtkWidget *image;
         GtkWidget *event_box;

    image = gtk_image_new_from_file ("myfile.png");
    event_box = gtk_event_box_new ();
    gtk_container_add (GTK_CONTAINER (event_box), image);
    g_signal_connect (G_OBJECT (event_box),
                      "button_press_event",
                      G_CALLBACK (button_press_callback),
                      image);
    return image;
  }

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 . This program allows you to convert an image into a C variable declaration, which can then be loaded into a

<gdk-pixbuf> using gdk-pixbuf-new-from-inline.

10.2 Usage

[Class] <gtk-image>

Derives from <gtk-misc>. This class defines the following slots:

pixbuf A GdkPixbuf to display

pixmap A GdkPixmap to display

image A GdkImage to display

mask Mask bitmap to use with GdkImage or GdkPixmap

file Filename to load and display

stock Stock ID for a stock image to display

icon-set Icon set to display

icon-size

Symbolic size to use for stock icon, icon set or named icon

pixel-size

Pixel size to use for named icon

pixbuf-animation

GdkPixbufAnimation to display

icon-name

The name of the icon from the icon theme

storage-type

The representation being used for image data

[Function] gtk-image-get-pixbuf (self <gtk-image>) ⇒ (ret <gdk-pixbuf>)
[Method] get-pixbuf

Gets the <gdk-pixbuf> being displayed by the <gtk-image>. The storage type of

the image must be ‘GTK_IMAGE_EMPTY’ or ‘GTK_IMAGE_PIXBUF’ (see gtk-image-get-

storage-type). The caller of this function does not own a reference to the returned pixbuf.

image  a <gtk-image>

ret the displayed pixbuf, or ‘#f’ if the image is empty

[Function] gtk-image-get-animation (self <gtk-image>)
   ⇒ (ret <gdk-pixbuf-animation>)
[Method] get-animation

Gets the <gdk-pixbuf-animation> being displayed by the <gtk-image>. The storage

type of the image must be ‘GTK_IMAGE_EMPTY’ or ‘GTK_IMAGE_ANIMATION’ (see gtk-

image-get-storage-type). The caller of this function does not own a reference to the returned animation.

image  a <gtk-image>

ret the displayed animation, or ‘#f’ if the image is empty

[Function] gtk-image-get-storage-type (self <gtk-image>)
   ⇒ (ret <gtk-image-type>)
[Method] get-storage-type

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’.

image  a <gtk-image>

ret image representation being used

[Function] gtk-image-new-from-file (filename mchars) ⇒ (ret <gtk-widget>)

Creates a new <gtk-image> displaying the file 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 ‘#f’, it always returns a valid <gtk-image> widget. If the file contains an animation, the image will contain an animation. If you need to detect failures to load the file, use gdk-pixbuf-new-from-file to load the file yourself, then create the <gtk-image> from the pixbuf. (Or for animations,

use gdk-pixbuf-animation-new-from-file).

The storage type (gtk-image-get-storage-type) of the returned image is not defined, it will be whatever is appropriate for displaying the file.

filename a filename

ret  a new <gtk-image>

[Function] gtk-image-new-from-icon-set (icon set <gtk-icon-set>)
   (size <gtk-icon-size>) ⇒ (ret <gtk-widget>)

Creates a <gtk-image> displaying an icon set. Sample stock sizes are <gtk-icon-

size-menu>, <gtk-icon-size-small-toolbar>. Instead of using this function, usu-

ally it’s better to create a <gtk-icon-factory>, put your icon sets in the icon factory, add the icon factory to the list of default factories with gtk-icon-factory-

add-default, and then use gtk-image-new-from-stock. This will allow themes to

override the icon you ship with your application. The <gtk-image> does not assume a reference to the icon set; you still need to unref it if you own references. <gtk-image> will add its own reference rather than adopting yours.

icon-set a <gtk-icon-set>

size a stock icon size

ret  a new <gtk-image>
[Function] gtk-image-new-from-image (image <gdk-image>)
   (mask <gdk-drawable>) ⇒ (ret <gtk-widget>)

Creates a <gtk-image> widget displaying a image with a mask. A <gdk-image> is a client-side image buffer in the pixel format of the current display. The <gtk-image> does not assume a reference to the image or mask; you still need to unref them if you own references. <gtk-image> will add its own reference rather than adopting yours.

image  a <gdk-image>, or ‘#f’
mask  a <gdk-bitmap>, or ‘#f’
ret  a new <gtk-image>
[Function] gtk-image-new-from-pixbuf (pixbuf <gdk-pixbuf>)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-image> displaying pixbuf. The <gtk-image> does not assume a reference to the pixbuf; you still need to unref it if you own references. <gtk-image> will add its own reference rather than adopting yours. Note that this function just creates an <gtk-image> from the pixbuf. The <gtkimage> created will not react to state changes. Should you want that, you should use

gtk-image-new-from-icon-set.
pixbuf  a <gdk-pixbuf>, or ‘#f’
ret  a new <gtk-image>
[Function] gtk-image-new-from-pixmap (pixmap <gdk-pixmap>)
   (mask <gdk-drawable>) ⇒ (ret <gtk-widget>)

Creates a <gtk-image> widget displaying pixmap with a mask. A <gdk-pixmap> is a server-side image buffer in the pixel format of the current display. The <gtk-image> does not assume a reference to the pixmap or mask; you still need to unref them if you own references. <gtk-image> will add its own reference rather than adopting yours.

pixmap  a <gdk-pixmap>, or ‘#f’

mask  a <gdk-bitmap>, or ‘#f’
ret  a new <gtk-image>
[Function] gtk-image-new-from-stock (stock id mchars)
   (size <gtk-icon-size>) ⇒ (ret <gtk-widget>)

Creates a <gtk-image> displaying a stock icon. Sample stock icon names are <gtk-

stock-open>, <gtk-stock-quit>. Sample stock sizes are <gtk-icon-size-menu>,

<gtk-icon-size-small-toolbar>. If the stock icon name isn’t known, the image will be empty. You can register your own stock icon names, see gtk-icon-factory-

add-default and gtk-icon-factory-add.

stock-id a stock icon name

size a stock icon size

ret a new <gtk-image> displaying the stock icon

[Function] gtk-image-new-from-animation
   (animation <gdk-pixbuf-animation>) ⇒ (ret <gtk-widget>)

Creates a <gtk-image> displaying the given animation. The <gtk-image> does not assume a reference to the animation; you still need to unref it if you own references. <gtk-image> will add its own reference rather than adopting yours. Note that the animation frames are shown using a timeout with <g-priority-default>. When using animations to indicate busyness, keep in mind that the animation will only be shown if the main loop is not busy with something that has a higher priority.

animation an animation

ret a new <gtk-image> widget

[Function] gtk-image-new-from-icon-name (icon name mchars)
   (size <gtk-icon-size>) ⇒ (ret <gtk-widget>)

Creates a <gtk-image> displaying an icon from the current icon theme. 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.

icon-name an icon name

size a stock icon size

ret a new <gtk-image> displaying the themed icon

Since 2.6

[Function] gtk-image-set-from-file (self <gtk-image>) (filename mchars)
[Method] set-from-file
See gtk-image-new-from-file for details.
image  a <gtk-image>

filename a filename or ‘#f’

[Function] gtk-image-set-from-icon-set (self <gtk-image>)
        (icon set <gtk-icon-set>) (size <gtk-icon-size>)
[Method] set-from-icon-set
     See gtk-image-new-from-icon-set for details.
     image  a <gtk-image>
     icon-set a <gtk-icon-set>

size a stock icon size

[Function] gtk-image-set-from-image (self <gtk-image>)
        (gdk image <gdk-image>) (mask <gdk-drawable>)
[Method] set-from-image
     See gtk-image-new-from-image for details.
     image  a <gtk-image>

gdk-image a <gdk-image> or ‘#f’

     mask  a <gdk-bitmap> or ‘#f’
[Function] gtk-image-set-from-pixbuf (self <gtk-image>)
        (pixbuf <gdk-pixbuf>)
[Method] set-from-pixbuf
     See gtk-image-new-from-pixbuf for details.
     image  a <gtk-image>
     pixbuf  a <gdk-pixbuf> or ‘#f’
[Function] gtk-image-set-from-pixmap (self <gtk-image>)
        (pixmap <gdk-pixmap>) (mask <gdk-drawable>)
[Method] set-from-pixmap
     See gtk-image-new-from-pixmap for details.
     image  a <gtk-image>
     pixmap  a <gdk-pixmap> or ‘#f’
     mask  a <gdk-bitmap> or ‘#f’
[Function] gtk-image-set-from-stock (self <gtk-image>) (stock id mchars)
        (size <gtk-icon-size>)
[Method] set-from-stock
     See gtk-image-new-from-stock for details.
     image  a <gtk-image>

stock-id a stock icon name

size a stock icon size

[Function] gtk-image-set-from-animation (self <gtk-image>)
        (animation <gdk-pixbuf-animation>)
[Method] set-from-animation

Causes the <gtk-image> to display the given animation (or display nothing, if you set the animation to ‘#f’).

image  a <gtk-image>
animation the <gdk-pixbuf-animation>
[Function] gtk-image-set-from-icon-name (self <gtk-image>)
   (icon name mchars) (size <gtk-icon-size>)
[Method] set-from-icon-name
See gtk-image-new-from-icon-name for details.
image  a <gtk-image>

icon-name an icon name size an icon size Since 2.6

[Function] gtk-image-clear (self <gtk-image>)

[Method] clear

Resets the image to be empty.

image  a <gtk-image>

Since 2.8

[Function] gtk-image-new ⇒ (ret <gtk-widget>)

Creates a new empty <gtk-image> widget. ret a newly created <gtk-image> widget.

[Function] gtk-image-set-pixel-size (self <gtk-image>) (pixel size int)
[Method] set-pixel-size

Sets the pixel size to use for named icons. If the pixel size is set to a value != -1, it is used instead of the icon size set by gtk-image-set-from-icon-name.

image  a <gtk-image>

pixel-size the new pixel size Since 2.6

[Function] gtk-image-get-pixel-size (self <gtk-image>) ⇒ (ret int)
[Method] get-pixel-size

Gets the pixel size used for named icons.

image  a <gtk-image>

ret the pixel size used for named icons. Since 2.6

11 GtkLabel

A widget that displays a small to medium amount of text

11.1 Overview

The <gtk-label> widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a <gtk-button>, a <gtk-menu-item>, or a

<gtk-option-menu>.

11.2 Mnemonics

Labels may contain mnemonics. Mnemonics are underlined characters in the label, used for keyboard navigation. Mnemonics are created by providing a string with an underscore before the mnemonic character, such as ‘"_File"’, to the functions gtk-label-new-with-

mnemonic or gtk-label-set-text-with-mnemonic.

Mnemonics automatically activate any activatable widget the label is inside, such as a <gtk-button>; if the label is not inside the mnemonic’s target widget, you have to tell the label about the target using gtk-label-set-mnemonic-widget. Here’s a simple example where the label is inside a button: There’s a convenience function to create buttons with a mnemonic label already inside: 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 gtk-label-set-

mnemonic-widget:
       /* Pressing Alt+H will activate this button */
       button = gtk_button_new ();
       label = gtk_label_new_with_mnemonic ("_Hello");
       gtk_container_add (GTK_CONTAINER (button), label);
       /* Pressing Alt+H will activate this button */
       button = gtk_button_new_with_mnemonic ("_Hello");
       /* Pressing Alt+H will focus the entry */
       entry = gtk_entry_new ();
       label = gtk_label_new_with_mnemonic ("_Hello");
       gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);

11.3 Markup (styled text)

To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple markup format. Here’s how to create a label with a small font: (See complete documentation of available tags in the Pango manual.)

       label = gtk_label_new (NULL);
       gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>");

The markup passed to gtk-label-set-markup must be valid; for example, literal </>/& characters must be escaped as &lt;, &gt;, and &amp;. If you pass text obtained from the user, file, or a network to gtk-label-set-markup, you’ll want to escape it with g-markup-

escape-text or g-markup-printf-escaped.

Markup strings are just a convenient way to set the <pango-attr-list> on a label; gtklabel-set-attributes may be a simpler way to set attributes in some cases. Be careful though; <pango-attr-list> tends to cause internationalization problems, unless you’re applying attributes to the entire string (i.e. unless you set the range of each attribute to [0, G MAXINT)). The reason is that specifying the start index and end index for a <pango-attribute> requires knowledge of the exact string being displayed, so translations will cause problems.

11.4 Selectable labels

Labels can be made selectable with gtk-label-set-selectable. Selectable labels allow the user to copy the label contents to the clipboard. Only labels that contain useful-to-copy information &#x2014; such as error messages &#x2014; should be made selectable.

11.5 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 gtk-label-set-line-wrap.

gtk-label-set-justify 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 gtk-misc-set-alignment.

11.6 Usage

[Class] <gtk-label>

Derives from <gtk-misc>.

This class defines the following slots:

label The text of the label

     attributes

A list of style attributes to apply to the text of the label

     use-markup

The text of the label includes XML markup. See pango parse markup()

     use-underline

If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key

justify The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See GtkMisc::xalign for that

pattern A string with characters in positions correspond to characters in the text to underline

wrap If set, wrap lines if the text becomes too wide

wrap-mode

If wrap is set, controls how linewrapping is done

selectable

Whether the label text can be selected with the mouse

mnemonic-keyval

The mnemonic accelerator key for this label

mnemonic-widget

The widget to be activated when the label’s mnemonic key is pressed

cursor-position

The current position of the insertion cursor in chars

selection-bound

The position of the opposite end of the selection from the cursor in chars

ellipsize

The preferred place to ellipsize the string, if the label does not have enough room to display the entire string

width-chars

The desired width of the label, in characters

single-line-mode

Whether the label is in single line mode

angle Angle at which the label is rotated

max-width-chars

The desired maximum width of the label, in characters

[Signal on <gtk-label>] move-cursor (arg0 <gtk-movement-step>)
   (arg1 <gint>) (arg2 <gboolean>)
[Signal on <gtk-label>] copy-clipboard
[Signal on <gtk-label>] populate-popup (arg0 <gtk-menu>)
[Function] gtk-label-new (str mchars) ⇒ (ret <gtk-widget>)

Creates a new label with the given text inside it. You can pass ‘#f’ to get an empty label widget.

str The text of the label

ret  the new <gtk-label>
[Function] gtk-label-set-text (self <gtk-label>) (str mchars)
[Method] set-text

Sets the text within the <gtk-label> widget. It overwrites any text that was there before. This will also clear any previously set mnemonic accelerators.

label  a <gtk-label>

str The text you want to set.

[Function] gtk-label-set-attributes (self <gtk-label>)
   (attrs <pango-attr-list>)
[Method] set-attributes

Sets a <pango-attr-list>; the attributes in the list are applied to the label text. The attributes set with this function will be ignored if the "use underline" property or the "use markup" property is ‘#t’.

label  a <gtk-label>
attrs  a <pango-attr-list>
[Function] gtk-label-set-markup (self <gtk-label>) (str mchars)
[Method] set-markup

Parses str which is marked up with the Pango text markup language, setting the label’s text and attribute list based on the parse results. If the str is external data, you

may need to escape it with g-markup-escape-text or g-markup-printf-escaped:
     char *markup;
     markup = g_markup_printf_escaped ("<span style=\"italic\">%s</span>", str);
     gtk_label_set_markup (GTK_LABEL (label), markup);
     g_free (markup);
label  a <gtk-label>

str a markup string (see Pango markup format)

[Function] gtk-label-set-markup-with-mnemonic (self <gtk-label>)
   (str mchars)
[Method] set-markup-with-mnemonic

Parses str which is marked up with the Pango text markup language, 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 keyboard accelerator called a mnemonic.

The mnemonic key can be used to activate another widget, chosen automatically, or

explicitly using gtk-label-set-mnemonic-widget.
label  a <gtk-label>

str a markup string (see Pango markup format)

[Function] gtk-label-set-pattern (self <gtk-label>) (pattern mchars)
[Method] set-pattern

The pattern of underlines you want under the existing text within the <gtk-label> widget. For example if the current text of the label says "FooBarBaz" passing a pattern of " " will underline "Foo" and "Baz" but not "Bar".

label The <gtk-label> you want to set the pattern to.

pattern The pattern as described above.

[Function] gtk-label-set-justify (self <gtk-label>)
   (jtype <gtk-justification>)
[Method] set-justify

Sets the alignment of the lines in the text of the label relative to each other. ‘GTK_JUSTIFY_LEFT’ is the default value when the widget is first created with gtk-label-new. If you instead want to set the alignment of the label as a whole, use

gtk-misc-set-alignment instead. gtk-label-set-justify has no effect on labels

containing only a single line.

label  a <gtk-label>
jtype  a <gtk-justification>
[Function] gtk-label-set-ellipsize (self <gtk-label>)
   (mode <pango-ellipsize-mode>)
[Method] set-ellipsize

Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there is not enough space to render the entire string.

label  a <gtk-label>
mode  a <pango-ellipsize-mode>

Since 2.6

[Function] gtk-label-set-width-chars (self <gtk-label>) (n chars int)
[Method] set-width-chars

Sets the desired width in characters of label to n-chars.

label  a <gtk-label>

n-chars the new desired width, in characters.

Since 2.6

[Function] gtk-label-set-max-width-chars (self <gtk-label>) (n chars int)
[Method] set-max-width-chars

Sets the desired maximum width in characters of label to n-chars.

label  a <gtk-label>

n-chars the new desired maximum width, in characters.

Since 2.6

[Function] gtk-label-set-line-wrap (self <gtk-label>) (wrap bool)
[Method] set-line-wrap

Toggles line wrapping within the <gtk-label> widget. ‘#t’ makes it break lines if text exceeds the widget’s size. ‘#f’ lets the text get cut off by the edge of the widget if it exceeds the widget size. Note that setting line wrapping to ‘#t’ does not make the label wrap at its parent container’s width, because GTK+ widgets conceptually can’t make their requisition depend on the parent container’s size. For a label that wraps at a specific position,

set the label’s width using gtk-widget-set-size-request.

label  a <gtk-label>

wrap the setting

[Function] gtk-label-set-line-wrap-mode (self <gtk-label>)
   (wrap mode <pango-wrap-mode>)
[Method] set-line-wrap-mode

If line wrapping is on (see gtk-label-set-line-wrap) this controls how the line wrapping is done. The default is ‘PANGO_WRAP_WORD’ which means wrap on word boundaries.

label  a <gtk-label>

wrap-mode the line wrapping mode

Since 2.10

[Function] gtk-label-get-layout-offsets (self <gtk-label>) ⇒ (x int)
   (y int)
[Method] get-layout-offsets

Obtains the coordinates where the label will draw the <pango-layout> representing the text in the label; useful to convert 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-event-box> to receive the events, and pack the label inside it, since labels are a <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>.
label  a <gtk-label>

x location to store X offset of layout, or ‘#f’

y location to store Y offset of layout, or ‘#f’

[Function] gtk-label-get-mnemonic-keyval (self <gtk-label>)
   ⇒ (ret unsigned-int)
[Method] get-mnemonic-keyval

If the label has been set so that it has an mnemonic key this function returns the keyval used for the mnemonic accelerator. If there is no mnemonic set up it returns

<gdk--void-symbol>.
label  a <gtk-label>

ret GDK keyval usable for accelerators, or <gdk--void-symbol>

[Function] gtk-label-get-selectable (self <gtk-label>) ⇒ (ret bool)
[Method] get-selectable
Gets the value set by gtk-label-set-selectable.
label  a <gtk-label>

ret ‘#t’ if the user can copy text from the label

[Function] gtk-label-get-text (self <gtk-label>) ⇒ (ret mchars)
[Method] get-text

Fetches the text from a label widget, as displayed on the screen. This does not include any embedded underlines indicating mnemonics or Pango markup. (See gtk-label-

get-label)
label  a <gtk-label>

ret the text in the label widget. This is the internal string used by the label, and must not be modified.

[Function] gtk-label-new-with-mnemonic (str mchars) ⇒ (ret <gtk-widget>)

Creates a new <gtk-label>, containing the text in str. If characters in str 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. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using gtk-

label-set-mnemonic-widget.

If gtk-label-set-mnemonic-widget is not called, then the first activatable ancestor of the <gtk-label> will be chosen as the mnemonic widget. For instance, if the label is inside a button or menu item, the button or menu item will automatically become the mnemonic widget and be activated by the mnemonic.

str The text of the label, with an underscore in front of the mnemonic character

ret  the new <gtk-label>
[Function] gtk-label-select-region (self <gtk-label>) (start offset int)

(end offset int)

[Method] select-region

Selects a range of characters in the label, if the label is selectable. See gtk-label-set-selectable. If the label is not selectable, this function has no effect. If start-offset or end-offset are -1, then the end of the label will be substituted.

label  a <gtk-label>

start-offset start offset (in characters not bytes)

end-offset end offset (in characters not bytes)

[Function] gtk-label-set-mnemonic-widget (self <gtk-label>)
   (widget <gtk-widget>)
[Method] set-mnemonic-widget

If the label has been set so that it has an mnemonic key (using i.e. gtk-

label-set-markup-with-mnemonic,  gtk-label-set-text-with-mnemonic,

gtk-label-new-with-mnemonic or the "use underline" property) the label can be associated with a widget that is the target of the mnemonic. 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 accelerated by emitting "mnemonic activate" on it. The default handler for this signal will activate the widget if there are no mnemonic collisions and toggle focus between the colliding widgets otherwise.

label  a <gtk-label>

widget the target <gtk-widget>

[Function] gtk-label-set-selectable (self <gtk-label>) (setting bool)
[Method] set-selectable

Selectable labels allow the user to select text from the label, for copy-and-paste.

label  a <gtk-label>

setting ‘#t’ to allow selecting text in the label

[Function] gtk-label-set-text-with-mnemonic (self <gtk-label>)
   (str mchars)
[Method] set-text-with-mnemonic

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 keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using gtk-label-set-mnemonic-widget.

label  a <gtk-label>

str a string

[Function] gtk-label-get-attributes (self <gtk-label>)
   ⇒ (ret <pango-attr-list>)
[Method] get-attributes

Gets the attribute list that was set on the label using gtk-label-set-attributes, if any. This function does not reflect attributes that come from the labels markup (see gtk-label-set-markup). If you want to get the effective attributes for the label, use pango layout get attribute (gtk label get layout (label)).

label  a <gtk-label>

ret the attribute list, or ‘#f’ if none was set.

[Function] gtk-label-get-justify (self <gtk-label>)
   ⇒ (ret <gtk-justification>)
[Method] get-justify

Returns the justification of the label. See gtk-label-set-justify.

label  a <gtk-label>
ret  <gtk-justification>
[Function] gtk-label-get-ellipsize (self <gtk-label>)
   ⇒ (ret <pango-ellipsize-mode>)
[Method] get-ellipsize

Returns the ellipsizing position of the label. See gtk-label-set-ellipsize.

label  a <gtk-label>

ret  <pango-ellipsize-mode>

Since 2.6

[Function] gtk-label-get-width-chars (self <gtk-label>) ⇒ (ret int)
[Method] get-width-chars

Retrieves the desired width of label, in characters. See gtk-label-set-width-chars.

label  a <gtk-label>

ret the width of the label in characters.

Since 2.6

[Function] gtk-label-get-max-width-chars (self <gtk-label>) ⇒ (ret int)
[Method] get-max-width-chars

Retrieves the desired maximum width of label, in characters. See gtk-label-set-

width-chars.
label  a <gtk-label>

ret the maximum width of the label in characters.

Since 2.6

[Function] gtk-label-get-label (self <gtk-label>) ⇒ (ret mchars)
[Method] get-label

Fetches the text from a label widget including any embedded underlines indicating mnemonics and Pango markup. (See gtk-label-get-text).

label  a <gtk-label>

ret the text of the label widget. This string is owned by the widget and must not be modified or freed.

[Function] gtk-label-get-layout (self <gtk-label>) ⇒ (ret <pango-layout>)
[Method] get-layout

Gets the <pango-layout> used to display the label. The layout is useful to e.g. convert text positions to pixel positions, in combination with gtk-label-get-layout-offsets. The returned layout is owned by the label so need not be freed by the caller.

label  a <gtk-label>

ret the <pango-layout> for this label

[Function] gtk-label-get-line-wrap (self <gtk-label>) ⇒ (ret bool)
[Method] get-line-wrap

Returns whether lines in the label are automatically wrapped. See gtk-label-set-

line-wrap.
label  a <gtk-label>

ret ‘#t’ if the lines of the label are automatically wrapped.

[Function] gtk-label-get-line-wrap-mode (self <gtk-label>)
   ⇒ (ret <pango-wrap-mode>)
[Method] get-line-wrap-mode

Returns line wrap mode used by the label. See gtk-label-set-line-wrap-mode.

label  a <gtk-label>

ret ‘#t’ if the lines of the label are automatically wrapped.

Since 2.10

[Function] gtk-label-get-mnemonic-widget (self <gtk-label>)
   ⇒ (ret <gtk-widget>)
[Method] get-mnemonic-widget

Retrieves the target of the mnemonic (keyboard shortcut) of this label. See gtk-

label-set-mnemonic-widget.
label  a <gtk-label>

ret the target of the label’s mnemonic, or ‘#f’ if none has been set and the default algorithm will be used.

[Function] gtk-label-get-selection-bounds (self <gtk-label>) ⇒ (ret bool)

(start int) (end int)

[Method] get-selection-bounds

Gets the selected range of characters in the label, returning ‘#t’ if there’s a selection.

label  a <gtk-label>

start return location for start of selection, as a character offset

end return location for end of selection, as a character offset

ret ‘#t’ if selection is non-empty

[Function] gtk-label-get-use-markup (self <gtk-label>) ⇒ (ret bool)
[Method] get-use-markup

Returns whether the label’s text is interpreted as marked up with the Pango text

markup language. See gtk-label-set-use-markup.
label  a <gtk-label>

ret ‘#t’ if the label’s text will be parsed for markup.

[Function] gtk-label-get-use-underline (self <gtk-label>) ⇒ (ret bool)
[Method] get-use-underline

Returns whether an embedded underline in the label indicates a mnemonic. See

gtk-label-set-use-underline.
label  a <gtk-label>

ret ‘#t’ whether an embedded underline in the label indicates the mnemonic accelerator keys.

[Function] gtk-label-get-single-line-mode (self <gtk-label>) ⇒ (ret bool)
[Method] get-single-line-mode

Returns whether the label is in single line mode.

label  a <gtk-label>

ret ‘#t’ when the label is in single line mode.

Since 2.6

[Function] gtk-label-get-angle (self <gtk-label>) ⇒ (ret double)
[Method] get-angle

Gets the angle of rotation for the label. See gtk label set angle.

label  a <gtk-label>

ret the angle of rotation for the label

Since 2.6

[Function] gtk-label-set-label (self <gtk-label>) (str mchars)
[Method] set-label

Sets the text of the label. The label is interpreted as including embedded underlines and/or Pango markup depending on the values of label->use underline and label- >use markup.

label  a <gtk-label>

str the new text to set for the label

[Function] gtk-label-set-use-markup (self <gtk-label>) (setting bool)
[Method] set-use-markup

Sets whether the text of the label contains markup in Pango’s text markup language.

See gtk-label-set-markup.
label  a <gtk-label>

setting ‘#t’ if the label’s text should be parsed for markup.

[Function] gtk-label-set-use-underline (self <gtk-label>) (setting bool)
[Method] set-use-underline

If true, an underline in the text indicates the next character should be used for the mnemonic accelerator key.

label  a <gtk-label>

setting ‘#t’ if underlines in the text indicate mnemonics

[Function] gtk-label-set-single-line-mode (self <gtk-label>)

(single line mode bool)

[Method] set-single-line-mode

Sets whether the label is in single line mode.

label  a <gtk-label>

single-line-mode ‘#t’ if the label should be in single line mode

Since 2.6

[Function] gtk-label-set-angle (self <gtk-label>) (angle double)
[Method] set-angle

Sets 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.

label  a <gtk-label>

angle the angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise

Since 2.6

12 GtkProgressBar

A widget which indicates progress visually

12.1 Overview

The <gtk-progress-bar> is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The <gtk-progress-bar> 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-progress-bar> 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 gtkprogress-bar-set-fraction 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-progress-bar> 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 gtk-progress-bar-pulse perodically to update the progress bar.

There is quite a bit of flexibility provided to control the appearance of the <gtkprogress-bar>. Functions 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.

   The <gtk-progress-bar>/<gtk-progress> API in GTK 1.2 was bloated,

needlessly complex and hard to use properly. Therefore <gtk-progress> has been deprecated completely and the <gtk-progress-bar> API has been reduced to

the following 10 functions: gtk-progress-bar-new, gtk-progress-bar-pulse,
gtk-progress-bar-set-text, gtk-progress-bar-set-fraction, gtk-progress-bar-
set-pulse-step, gtk-progress-bar-set-orientation, gtk-progress-bar-get-text,
gtk-progress-bar-get-fraction, gtk-progress-bar-get-pulse-step, gtk-progress-

bar-get-orientation. These have been grouped at the beginning of this section, followed by a large chunk of deprecated 1.2 compatibility functions.

12.2 Usage

[Class] <gtk-progress-bar>
     Derives from <gtk-progress>.

This class defines the following slots:

fraction The fraction of total work that has been completed

     pulse-step

The fraction of total progress to move the bouncing block when pulsed

     orientation

Orientation and growth direction of the progress bar

text Text to be displayed in the progress bar

ellipsize

The preferred place to ellipsize the string, if the progress bar does not have enough room to display the entire string, if at all.

adjustment

The GtkAdjustment connected to the progress bar (Deprecated)

bar-style

Specifies the visual style of the bar in percentage mode (Deprecated)

activity-step

The increment used for each iteration in activity mode (Deprecated)

activity-blocks

The number of blocks which can fit in the progress bar area in activity mode (Deprecated)

discrete-blocks

The number of discrete blocks in a progress bar (when shown in the discrete style)

[Function] gtk-progress-bar-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-progress-bar>.
ret  a <gtk-progress-bar>.
[Function] gtk-progress-bar-pulse (self <gtk-progress-bar>)

[Method] pulse

Indicates that some progress is made, but you don’t know how much. Causes the progress bar to enter "activity mode," where a block bounces back and forth. Each call to gtk-progress-bar-pulse causes the block to move by a little bit (the amount of movement per pulse is determined by gtk-progress-bar-set-pulse-step).

pbar  a <gtk-progress-bar>
[Function] gtk-progress-bar-set-text (self <gtk-progress-bar>)
   (text mchars)
[Method] set-text

Causes the given text to appear superimposed on the progress bar.

pbar  a <gtk-progress-bar>

text a UTF-8 string, or ‘#f’

[Function] gtk-progress-bar-set-fraction (self <gtk-progress-bar>)

(fraction double)

[Method] set-fraction

Causes the progress bar to "fill in" the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive.

pbar  a <gtk-progress-bar>

fraction fraction of the task that’s been completed

[Function] gtk-progress-bar-set-pulse-step (self <gtk-progress-bar>)

(fraction double)

[Method] set-pulse-step

Sets the fraction of total progress bar length to move the bouncing block for each call

to gtk-progress-bar-pulse.
pbar  a <gtk-progress-bar>

fraction fraction between 0.0 and 1.0

[Function] gtk-progress-bar-set-orientation (self <gtk-progress-bar>)
   (orientation <gtk-progress-bar-orientation>)
[Method] set-orientation

Causes the progress bar to switch to a different orientation (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).

pbar  a <gtk-progress-bar>

orientation orientation of the progress bar

[Function] gtk-progress-bar-set-ellipsize (self <gtk-progress-bar>)
   (mode <pango-ellipsize-mode>)
[Method] set-ellipsize

Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is not enough space to render the entire string.

pbar  a <gtk-progress-bar>
mode  a <pango-ellipsize-mode>

Since 2.6

[Function] gtk-progress-bar-get-text (self <gtk-progress-bar>)
   ⇒ (ret mchars)
[Method] get-text

Retrieves the text displayed superimposed on the progress bar, if any, otherwise ‘#f’. The return value is a reference to the text, not a copy of it, so will become invalid if you change the text in the progress bar.

pbar  a <gtk-progress-bar>

ret text, or ‘#f’; this string is owned by the widget and should not be modified or freed.

[Function] gtk-progress-bar-get-fraction (self <gtk-progress-bar>)
   ⇒ (ret double)
[Method] get-fraction

Returns the current fraction of the task that’s been completed.

pbar  a <gtk-progress-bar>

ret a fraction from 0.0 to 1.0

[Function] gtk-progress-bar-get-pulse-step (self <gtk-progress-bar>)
   ⇒ (ret double)
[Method] get-pulse-step
Retrieves the pulse step set with gtk-progress-bar-set-pulse-step
pbar  a <gtk-progress-bar>

ret a fraction from 0.0 to 1.0

[Function] gtk-progress-bar-get-ellipsize (self <gtk-progress-bar>)
   ⇒ (ret <pango-ellipsize-mode>)
[Method] get-ellipsize

Returns the ellipsizing position of the progressbar. See gtk-progress-bar-set-

ellipsize.
pbar  a <gtk-progress-bar>
ret  <pango-ellipsize-mode>

Since 2.6

13 GtkStatusbar

Report messages of minor importance to the user

13.1 Overview

A <gtk-statusbar> is usually placed along the bottom of an application’s main <gtkwindow>. It may provide a regular commentary of the application’s status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example). 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 Gtk+ maintain a stack of messages. The message at the top of the each bar’s stack is the one that will currently be displayed.

Any messages added to a statusbar’s stack must specify a context id that is used to uniquely identify the source of a message. This context id can be generated by gtkstatusbar-get-context-id, given a message and the statusbar that it will be added to. Note that messages are stored in a stack, and when choosing which message to display, the stack structure is adhered to, regardless of the context identifier of a message.

Status bars are created using gtk-statusbar-new.

Messages are added to the bar’s stack with gtk-statusbar-push.

The message at the top of the stack can be removed using gtk-statusbar-pop. A message can be removed from anywhere in the stack if its message id was recorded at the time it was added. This is done using gtk-statusbar-remove.

13.2 Usage

[Class] <gtk-statusbar>

Derives from <gtk-hbox>.

This class defines the following slots:

     has-resize-grip

Whether the statusbar has a grip for resizing the toplevel

[Signal on <gtk-statusbar>] text-pushed (arg0 <guint>) (arg1 <gchararray>)

Is emitted whenever a new message gets pushed onto a statusbar’s stack.

[Signal on <gtk-statusbar>] text-popped (arg0 <guint>) (arg1 <gchararray>)

Is emitted whenever a new message is popped off a statusbar’s stack.

[Function] gtk-statusbar-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-statusbar> ready for messages.

     ret  the new <gtk-statusbar>.
[Function] gtk-statusbar-get-context-id (self <gtk-statusbar>)

(context description mchars) ⇒ (ret unsigned-int)

[Method] get-context-id

Returns a new context identifier, given a description of the actual context.

statusbar a <gtk-statusbar>.

context-description textual description of what context the new message is being used in.

ret an integer id.

[Function] gtk-statusbar-push (self <gtk-statusbar>)
   (context id unsigned-int) (text mchars) ⇒ (ret unsigned-int)

[Method] push

Pushes a new message onto a statusbar’s stack.

statusbar a <gtk-statusbar>.

context-id the message’s context id, as returned by gtk-statusbar-get-context-

          id.

text the message to add to the statusbar.

ret the message’s new message id for use with gtk-statusbar-remove.

[Function] gtk-statusbar-pop (self <gtk-statusbar>)
   (context id unsigned-int)

[Method] pop

Removes the message at the top of a <gtk-status-bar>’s stack.

statusbar a <gtk-status-bar>.

context-id a context identifier.

[Function] gtk-statusbar-remove (self <gtk-statusbar>)
   (context id unsigned-int) (message id unsigned-int)

[Method] remove

Forces the removal of a message from a statusbar’s stack. The exact context-id and message-id must be specified.

statusbar a <gtk-status-bar>.

context-id a context identifier.

message-id a message identifier, as returned by gtk-statusbar-push.

[Function] gtk-statusbar-set-has-resize-grip (self <gtk-statusbar>)

(setting bool)

[Method] set-has-resize-grip

Sets whether the statusbar has a resize grip. ‘#t’ by default.

statusbar a <gtk-status-bar>.

setting ‘#t’ to have a resize grip.

[Function] gtk-statusbar-get-has-resize-grip (self <gtk-statusbar>)

⇒ (ret bool)

[Method] get-has-resize-grip

Returns whether the statusbar has a resize grip.

Chapter 13: GtkStatusbar 77

statusbar a <gtk-status-bar>.

ret ‘#t’ if the statusbar has a resize grip.

14 GtkStatusIcon

Display an icon in the system tray

14.1 Overview

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-status-icon> 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-status-icon>, 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 gtk-status-icon-is-embedded.

On X11, the implementation follows the freedesktop.org "System Tray" specification

(http://www.freedesktop.org/wiki/Standards/systemtray-spec). Implementations

of the "tray" side of this specification can be found e.g. in the GNOME and KDE panel applications.

Note that a GtkStatusIcon is not a widget, but just a <gobject>. Making it a widget would be impractical, since the system tray on Win32 doesn’t allow to embed arbitrary widgets.

14.2 Usage

[Class] <gtk-status-icon>

Derives from <gobject>.

This class defines the following slots:

pixbuf A GdkPixbuf to display

file Filename to load and display

stock Stock ID for a stock image to display

     icon-name

The name of the icon from the icon theme

     storage-type

The representation being used for image data

size The size of the icon

screen The screen where this status icon will be displayed

visible Whether or not the status icon is visible

     orientation

The orientation of the tray

embedded Whether or not the status icon is embedded

blinking Whether or not the status icon is blinking

[Signal on <gtk-status-icon>] size-changed (arg0 <gint>) ⇒ <gboolean>

Gets emitted when the size available for the image changes, e.g. because the notification area got resized.

Since 2.10

[Signal on <gtk-status-icon>] popup-menu (arg0 <guint>) (arg1 <guint>)

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 to arguments

to gtk-menu-popup.

Since 2.10

[Signal on <gtk-status-icon>] activate

Gets emitted when the user activates the status icon. If and how status icons can activated is platform-dependent.

Since 2.10

[Function] gtk-status-icon-new ⇒ (ret <gtk-status-icon>)

Creates an empty status icon object.

ret  a new <gtk-status-icon>

Since 2.10

[Function] gtk-status-icon-new-from-pixbuf (pixbuf <gdk-pixbuf>)
   ⇒ (ret <gtk-status-icon>)

Creates a status icon displaying pixbuf.

The image will be scaled down to fit in the available space in the notification area, if necessary.

pixbuf  a <gdk-pixbuf>
ret  a new <gtk-status-icon>

Since 2.10

[Function] gtk-status-icon-new-from-file (filename mchars)
   ⇒ (ret <gtk-status-icon>)

Creates a status icon displaying the file filename.

The image will be scaled down to fit in the available space in the notification area, if necessary.

filename a filename

ret  a new <gtk-status-icon>

[Function] gtk-status-icon-new-from-stock (stock id mchars)
   ⇒ (ret <gtk-status-icon>)

Creates a status icon displaying a stock icon. Sample stock icon names are <gtkstock-open>, <gtk-stock-quit>. You can register your own stock icon names, see

gtk-icon-factory-add-default and gtk-icon-factory-add.

stock-id a stock icon id

ret  a new <gtk-status-icon>

Since 2.10

[Function] gtk-status-icon-new-from-icon-name (icon name mchars)
   ⇒ (ret <gtk-status-icon>)

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.

icon-name an icon name

ret  a new <gtk-status-icon>

Since 2.10

[Function] gtk-status-icon-set-from-pixbuf (self <gtk-status-icon>)
   (pixbuf <gdk-pixbuf>)
[Method] set-from-pixbuf

Makes status-icon display pixbuf. See gtk-status-icon-new-from-pixbuf for details.

status-icon

          a <gtk-status-icon>
pixbuf  a <gdk-pixbuf> or ‘#f’

Since 2.10

[Function] gtk-status-icon-set-from-file (self <gtk-status-icon>)

(filename mchars)

[Method] set-from-file

Makes status-icon display the file filename. See gtk-status-icon-new-from-file for details.

status-icon

          a <gtk-status-icon>

filename a filename

Since 2.10

[Function] gtk-status-icon-set-from-stock (self <gtk-status-icon>)

(stock id mchars)

[Method] set-from-stock

Makes status-icon display the stock icon with the id stock-id. See gtk-status-icon-

new-from-stock for details.

status-icon

          a <gtk-status-icon>

stock-id a stock icon id

Since 2.10

[Function] gtk-status-icon-set-from-icon-name (self <gtk-status-icon>)

(icon name mchars)

[Method] set-from-icon-name

Makes status-icon display the icon named icon-name from the current icon theme.

See gtk-status-icon-new-from-icon-name for details.

status-icon

          a <gtk-status-icon>

icon-name an icon name

Since 2.10

[Function] gtk-status-icon-get-storage-type (self <gtk-status-icon>)
   ⇒ (ret <gtk-image-type>)
[Method] get-storage-type

Gets the type of representation being used by the <gtk-status-icon> to store image data. If the <gtk-status-icon> has no image data, the return value will be

‘GTK_IMAGE_EMPTY’.

status-icon

          a <gtk-status-icon>

ret the image representation being used

Since 2.10

[Function] gtk-status-icon-get-pixbuf (self <gtk-status-icon>)
   ⇒ (ret <gdk-pixbuf>)
[Method] get-pixbuf

Gets the <gdk-pixbuf> being displayed by the <gtk-status-icon>. The storage

type of the status icon must be ‘GTK_IMAGE_EMPTY’ or ‘GTK_IMAGE_PIXBUF’ (see gtk-

status-icon-get-storage-type). The caller of this function does not own a reference to the returned pixbuf.

status-icon

          a <gtk-status-icon>

ret the displayed pixbuf, or ‘#f’ if the image is empty.

Since 2.10

[Function] gtk-status-icon-get-stock (self <gtk-status-icon>)
   ⇒ (ret mchars)
[Method] get-stock

Gets the id of the stock icon being displayed by the <gtk-status-icon>. The storage type of the status icon must be ‘GTK_IMAGE_EMPTY’ or ‘GTK_IMAGE_STOCK’ (see

gtk-status-icon-get-storage-type). The returned string is owned by the <gtk-

status-icon> and should not be freed or modified. status-icon

          a <gtk-status-icon>

ret stock id of the displayed stock icon, or ‘#f’ if the image is empty.

Since 2.10

[Function] gtk-status-icon-get-icon-name (self <gtk-status-icon>)
   ⇒ (ret mchars)
[Method] get-icon-name

Gets the name of the icon being displayed by the <gtk-status-icon>. The storage type of the status icon must be ‘GTK_IMAGE_EMPTY’ or ‘GTK_IMAGE_ICON_NAME’ (see

gtk-status-icon-get-storage-type). The returned string is owned by the <gtk-

status-icon> and should not be freed or modified.

status-icon

          a <gtk-status-icon>

ret name of the displayed icon, or ‘#f’ if the image is empty.

Since 2.10

[Function] gtk-status-icon-get-size (self <gtk-status-icon>) ⇒ (ret int)
[Method] get-size

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.

status-icon

          a <gtk-status-icon>

ret the size that is available for the image

Since 2.10

[Function] gtk-status-icon-set-tooltip (self <gtk-status-icon>)

(tooltip text mchars)

[Method] set-tooltip

Sets the tooltip of the status icon.

status-icon

          a <gtk-status-icon>

tooltip-text the tooltip text, or ‘#f’

Since 2.10

[Function] gtk-status-icon-set-visible (self <gtk-status-icon>)

(visible bool)

[Method] set-visible

Shows or hides a status icon.

status-icon

          a <gtk-status-icon>

visible ‘#t’ to show the status icon, ‘#f’ to hide it

Since 2.10

[Function] gtk-status-icon-get-visible (self <gtk-status-icon>)

⇒ (ret bool)

[Method] get-visible

Returns whether the status icon is visible or not. Note that being visible does not guarantee that the user can actually see the icon, see also gtk-status-icon-is-

embedded.

status-icon

          a <gtk-status-icon>

ret ‘#t’ if the status icon is visible

Since 2.10

[Function] gtk-status-icon-set-blinking (self <gtk-status-icon>)

(blinking bool)

[Method] set-blinking

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.

status-icon

          a <gtk-status-icon>

blinking ‘#t’ to turn blinking on, ‘#f’ to turn it off

Since 2.10

[Function] gtk-status-icon-get-blinking (self <gtk-status-icon>)

⇒ (ret bool)

[Method] get-blinking

Returns whether the icon is blinking, see gtk-status-icon-set-blinking.

status-icon

          a <gtk-status-icon>

ret ‘#t’ if the icon is blinking

Since 2.10

[Function] gtk-status-icon-is-embedded (self <gtk-status-icon>)

⇒ (ret bool)

[Method] is-embedded

Returns whether the status icon is embedded in a notification area.

status-icon

          a <gtk-status-icon>

ret ‘#t’ if the status icon is embedded in a notification area.

Since 2.10

15 GtkButton

A widget that creates a signal when clicked on

15.1 Overview

The <gtk-button> widget is generally used to attach a function to that is called when the button is pressed. The various signals and how to use them are outlined below.

The <gtk-button> widget can hold any valid child widget. That is it can hold most any other standard <gtk-widget>. The most commonly used child is the <gtk-label>.

15.2 Usage

[Class] <gtk-button>

Derives from <gtk-bin>. This class defines the following slots:

label Text of the label widget inside the button, if the button contains a label widget

image Child widget to appear next to the button text

relief The border relief style

use-underline

If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key

use-stock

If set, the label is used to pick a stock item instead of being displayed

focus-on-click

Whether the button grabs focus when it is clicked with the mouse

xalign Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned

yalign Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned

image-position

The position of the image relative to the text

[Signal on <gtk-button>] activate

The "activate" signal on GtkButton is an action signal and emitting it causes the button to animate press then release. Applications should never connect to this signal, but use the "clicked" signal.

[Signal on <gtk-button>] pressed

Emitted when the button is pressed. deprecated: Use the GtkWidget::button-press-event signal.

[Signal on <gtk-button>] released

Emitted when the button is released. deprecated: Use the GtkWidget::button-release-event signal.

[Signal on <gtk-button>] clicked

Emitted when the button has been activated (pressed and released).

[Signal on <gtk-button>] enter

Emitted when the pointer enters the button. deprecated: Use the GtkWidget::enter-notify-event signal.

[Signal on <gtk-button>] leave

Emitted when the pointer leaves the button. deprecated: Use the GtkWidget::leave-notify-event signal.

[Function] gtk-button-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-button> widget. To add a child widget to the button, use gtk-

container-add.

ret The newly created <gtk-button> widget.

[Function] gtk-button-new-with-label (label mchars) ⇒ (ret <gtk-widget>)

Creates a <gtk-button> widget with a <gtk-label> child containing the given text.

label The text you want the <gtk-label> to hold.

ret The newly created <gtk-button> widget.

[Function] gtk-button-new-with-mnemonic (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-button> containing a 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 and that key activates the button.

label The text of the button, with an underscore in front of the mnemonic character

ret  a new <gtk-button>
[Function] gtk-button-new-from-stock (stock id mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-button> containing the image and text from a stock item. Some stock ids have preprocessor macros like <gtk-stock-ok> and <gtk-stock-apply>. If stock-id is unknown, then it will be treated as a mnemonic label (as for gtk-

button-new-with-mnemonic).

stock-id the name of the stock item

ret  a new <gtk-button>

[Function] gtk-button-pressed (self <gtk-button>)

[Method] pressed

Emits a <gtk-button::pressed> signal to the given <gtk-button>.

button The <gtk-button> you want to send the signal to.

[Function] gtk-button-released (self <gtk-button>)
[Method] released
Emits a <gtk-button::released> signal to the given <gtk-button>.

button The <gtk-button> you want to send the signal to.

[Function] gtk-button-clicked (self <gtk-button>)

[Method] clicked

Emits a <gtk-button::clicked> signal to the given <gtk-button>.

button The <gtk-button> you want to send the signal to.

[Function] gtk-button-enter (self <gtk-button>)

[Method] enter

Emits a <gtk-button::enter> signal to the given <gtk-button>.

button The <gtk-button> you want to send the signal to.

[Function] gtk-button-leave (self <gtk-button>)

[Method] leave

Emits a <gtk-button::leave> signal to the given <gtk-button>.

button The <gtk-button> you want to send the signal to.

[Function] gtk-button-set-relief (self <gtk-button>)
   (newstyle <gtk-relief-style>)
[Method] set-relief

Sets the relief style of the edges of the given <gtk-button> widget. Three styles exist, GTK RELIEF NORMAL, GTK RELIEF HALF, GTK RELIEF NONE. The default style is, as one can guess, GTK RELIEF NORMAL.

button The <gtk-button> you want to set relief styles of.

newstyle The GtkReliefStyle as described above.

[Function] gtk-button-get-relief (self <gtk-button>)
   ⇒ (ret <gtk-relief-style>)
[Method] get-relief

Returns the current relief style of the given <gtk-button>.

button  The <gtk-button> you want the <gtk-relief-style> from.
ret  The current <gtk-relief-style>
[Function] gtk-button-get-label (self <gtk-button>) ⇒ (ret mchars)
[Method] get-label

Fetches the text from the label of the button, as set by gtk-button-set-label. If the label text has not been set the return value will be ‘#f’. This will be the case if you create an empty button with gtk-button-new to use as a container.

button  a <gtk-button>

ret The text of the label widget. This string is owned by the widget and must not be modified or freed.

[Function] gtk-button-set-label (self <gtk-button>) (label mchars)
[Method] set-label

Sets the text of the label of the button to str. This text is also used to select the

stock item if gtk-button-set-use-stock is used.

This will also clear any previously set labels.

button  a <gtk-button>

label a string

[Function] gtk-button-get-use-stock (self <gtk-button>) ⇒ (ret bool)
[Method] get-use-stock

Returns whether the button label is a stock item.

button  a <gtk-button>

ret ‘#t’ if the button label is used to select a stock item instead of being used directly as the label text.

[Function] gtk-button-set-use-stock (self <gtk-button>) (use stock bool)
[Method] set-use-stock

If true, the label set on the button is used as a stock id to select the stock item for the button.

button  a <gtk-button>

use-stock ‘#t’ if the button should use a stock item

[Function] gtk-button-get-use-underline (self <gtk-button>) ⇒ (ret bool)
[Method] get-use-underline

Returns whether an embedded underline in the button label indicates a mnemonic.

See gtk-button-set-use-underline.
button  a <gtk-button>

ret ‘#t’ if an embedded underline in the button label indicates the mnemonic accelerator keys.

[Function] gtk-button-set-use-underline (self <gtk-button>)

(use underline bool)

[Method] set-use-underline

If true, an underline in the text of the button label indicates the next character should be used for the mnemonic accelerator key.

button  a <gtk-button>

use-underline ‘#t’ if underlines in the text indicate mnemonics

[Function] gtk-button-set-focus-on-click (self <gtk-button>)

(focus on click bool)

[Method] set-focus-on-click

Sets whether 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.

button  a <gtk-button>

focus-on-click whether the button grabs focus when clicked with the mouse

Since 2.4

[Function] gtk-button-get-focus-on-click (self <gtk-button>) ⇒ (ret bool)
[Method] get-focus-on-click

Returns whether the button grabs focus when it is clicked with the mouse. See gtk-

button-set-focus-on-click.
button  a <gtk-button>

ret ‘#t’ if the button grabs focus when it is clicked with the mouse.

Since 2.4

[Function] gtk-button-set-alignment (self <gtk-button>) (xalign float)

(yalign float)

[Method] set-alignment

Sets the alignment of the child. This property has no effect unless the child is a

<gtk-misc> or a <gtk-aligment>.
button  a <gtk-button>

xalign the horizontal position of the child, 0.0 is left aligned, 1.0 is right aligned

yalign the vertical position of the child, 0.0 is top aligned, 1.0 is bottom aligned

Since 2.4

[Function] gtk-button-get-alignment (self <gtk-button>) ⇒ (xalign float)

(yalign float)

[Method] get-alignment

Gets the alignment of the child in the button.

button  a <gtk-button>

xalign return location for horizontal alignment

yalign return location for vertical alignment

Since 2.4

[Function] gtk-button-set-image (self <gtk-button>) (image <gtk-widget>)
[Method] set-image

Set the image of button to the given widget. Note that it depends on the gtk-button-images setting whether the image will be displayed or not, you don’t have to call gtk-widget-show on image yourself.

button  a <gtk-button>

image a widget to set as the image for the button Since 2.6

[Function] gtk-button-get-image (self <gtk-button>) ⇒ (ret <gtk-widget>)
[Method] get-image

Gets the widget that is currenty set as the image of button. This may have been

explicitly set by gtk-button-set-image or constructed by gtk-button-new-from-
stock.
button  a <gtk-button>

ret a <gtk-widget> or ‘#f’ in case there is no image Since 2.6

[Function] gtk-button-set-image-position (self <gtk-button>)
   (position <gtk-position-type>)
[Method] set-image-position

Sets the position of the image relative to the text inside the button.

button  a <gtk-button>

position the position Since 2.10

[Function] gtk-button-get-image-position (self <gtk-button>)
   ⇒ (ret <gtk-position-type>)
[Method] get-image-position

Gets the position of the image relative to the text inside the button.

button  a <gtk-button>

ret the position Since 2.10

16 GtkCheckButton

Create widgets with a discrete toggle button

16.1 Overview

A <gtk-check-button> places a discrete <gtk-toggle-button> next to a widget, (usually a <gtk-label>). See the section on <gtk-toggle-button> widgets for more information about toggle/check buttons.

The important signal (’toggled’) is also inherited from <gtk-toggle-button>.

16.2 Usage

[Class] <gtk-check-button>
Derives from <gtk-toggle-button>.

This class defines no direct slots.

[Function] gtk-check-button-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-check-button>.
ret  a <gtk-widget>.
[Function] gtk-check-button-new-with-label (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-check-button> with a <gtk-label> to the right of it.

label the text for the check button.

ret  a <gtk-widget>.
[Function] gtk-check-button-new-with-mnemonic (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-check-button> containing a label. The label will be created using gtk-label-new-with-mnemonic, so underscores in label indicate the mnemonic for the check button.

label The text of the button, with an underscore in front of the mnemonic character

ret  a new <gtk-check-button>

17 GtkRadioButton

A choice from multiple check buttons

17.1 Overview

A single radio button performs the same basic function as a <gtk-check-button>, as its 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-radio-button> is one way of giving the user a choice from many options.

Radio button widgets are created with gtk-radio-button-new, passing NULL as the argument if this is the first radio button in a group. In subsequent calls, the group you wish to add this button to should be passed as an argument. Optionally, gtk-radio-button-new-with-label can be used if you want a text label on the radio button.

Alternatively, when adding widgets to an existing group of radio buttons, use gtk-

radio-button-new-from-widget with a <gtk-radio-button> that already has a group as-
signed to it. The convenience function gtk-radio-button-new-with-label-from-widget

is also provided.

   To retrieve the group a <gtk-radio-button> is assigned to, use gtk-radio-button-
get-group.

To remove a <gtk-radio-button> from one group and make it part of a new one, use

gtk-radio-button-set-group.

The group list does not need to be freed, as each <gtk-radio-button> will remove itself and its list item when it is destroyed.

     void create_radio_buttons (void) {
        GtkWidget *window, *radio1, *radio2, *box, *entry;
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        box = gtk_vbox_new (TRUE, 2);
        /* Create a radio button with a GtkEntry widget */
        radio1 = gtk_radio_button_new (NULL);
        entry = gtk_entry_new ();
        gtk_container_add (GTK_CONTAINER (radio1), entry);

        /* Create a radio button with a label */
        radio2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio1),
     "I'm the second radio button.");
        /* Pack them into a box, then show all the widgets */
        gtk_box_pack_start (GTK_BOX (box), radio1, TRUE, TRUE, 2);

   gtk_box_pack_start (GTK_BOX (box), radio2, TRUE, TRUE, 2);
   gtk_container_add (GTK_CONTAINER (window), box);
   gtk_widget_show_all (window);
   return;
}

When an unselected button in the group is clicked the clicked button receives the "toggled" signal, as does the previously selected button. Inside the "toggled" handler, gtktoggle-button-get-active can be used to determine if the button has been selected or deselected.

17.2 Usage

[Class] <gtk-radio-button>
Derives from <gtk-check-button>.

This class defines the following slots:

group The radio button whose group this widget belongs to.

[Signal on <gtk-radio-button>] group-changed

Emitted when the group of radio buttons that a radio button belongs to changes. This is emitted when a radio button switches from being alone to being part of a group of 2 or more buttons, or vice-versa, and when a buttton is moved from one group of 2 or more buttons to a different one, but not when the composition of the group that a button belongs to changes. Since 2.4

[Function] gtk-radio-button-new (group <gtk-radio-group*>)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-radio-button>. To be of any practical value, a widget should then be packed into the radio button.

group an existing radio button group, or ‘#f’ if you are creating a new group.

ret a new radio button.

[Function] gtk-radio-button-new-from-widget (group <gtk-radio-button>)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-radio-button>, adding it to the same group as group. As with gtk-radio-button-new, a widget should be packed into the radio button.

group  an existing <gtk-radio-button>.

ret a new radio button.

[Function] gtk-radio-button-new-with-label (group <gtk-radio-group*>)
   (label mchars) ⇒ (ret <gtk-widget>)

Creates a new <gtk-radio-button> with a text label.

group an existing radio button group, or ‘#f’ if you are creating a new group.

label the text label to display next to the radio button.

ret a new radio button.

[Function] gtk-radio-button-new-with-mnemonic
   (group <gtk-radio-group*>) (label mchars) ⇒ (ret <gtk-widget>)

Creates a new <gtk-radio-button> containing a label, adding it to the same group as group. The label will be created using gtk-label-new-with-mnemonic, so underscores in label indicate the mnemonic for the button.

group the radio button group

label the text of the button, with an underscore in front of the mnemonic character

ret  a new <gtk-radio-button>
[Function] gtk-radio-button-set-group (self <gtk-radio-button>)
   (group <gtk-radio-group*>)
[Method] set-group

Sets a <gtk-radio-button>’s group. It should be noted that this does not change the layout of your interface in any way, so if you are changing the group, it is likely you will need to re-arrange the user interface to reflect these changes.

radio-button

          a <gtk-radio-button>.

group an existing radio button group, such as one returned from gtk-radio-

          button-get-group.
[Function] gtk-radio-button-get-group (self <gtk-radio-button>)
   ⇒ (ret <gtk-radio-group*>)
[Method] get-group

Retrieves the group assigned to a radio button.

radio-button

          a <gtk-radio-button>.

ret a linked list containing all the radio buttons in the same group as radiobutton.

18 GtkToggleButton

Create buttons which retain their state

18.1 Overview

A <gtk-toggle-button> is a <gtk-button> which will remain ’pressed-in’ when clicked. Clicking again will cause the toggle button to return to its normal state.

A toggle button is created by calling either gtk-toggle-button-new or gtk-toggle-button-new-with-label. If using the former, it is advisable to pack a widget, (such as a <gtk-label> and/or a <gtk-pixmap>), into the toggle button’s container. (See <gtkbutton> for more information).

The state of a <gtk-toggle-button> can be set specifically using gtk-toggle-button-
set-active, and retrieved using gtk-toggle-button-get-active.

To simply switch the state of a toggle button, use gtk toggle button toggled.

void make_toggles (void) {
GtkWidget *dialog, *toggle1, *toggle2;
dialog = gtk_dialog_new ();
toggle1 = gtk_toggle_button_new_with_label ("Hi, i'm a toggle button.");
/* Makes this toggle button invisible */
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE);
g_signal_connect (toggle1, "toggled",
                  G_CALLBACK (output_state), NULL);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                    toggle1, FALSE, FALSE, 2);
toggle2 = gtk_toggle_button_new_with_label ("Hi, i'm another toggle button.");
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE);
g_signal_connect (toggle2, "toggled",
                  G_CALLBACK (output_state), NULL);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                    toggle2, FALSE, FALSE, 2);
gtk_widget_show_all (dialog);
}

18.2 Usage

[Class] <gtk-toggle-button>
Derives from <gtk-button>.

This class defines the following slots: active If the toggle button should be pressed in or not

inconsistent

If the toggle button is in an "in between" state

draw-indicator

If the toggle part of the button is displayed

[Signal on <gtk-toggle-button>] toggled

Should be connected if you wish to perform an action whenever the <gtk-toggle-button>’s state is changed.

[Function] gtk-toggle-button-new ⇒ (ret <gtk-widget>)

Creates a new toggle button. A widget should be packed into the button, as in

gtk-button-new.

ret a new toggle button.

[Function] gtk-toggle-button-new-with-label (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new toggle button with a text label.

label a string containing the message to be placed in the toggle button.

ret a new toggle button.

[Function] gtk-toggle-button-new-with-mnemonic (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-toggle-button> containing a label. The label will be created using gtk-label-new-with-mnemonic, so underscores in label indicate the mnemonic for the button.

label the text of the button, with an underscore in front of the mnemonic character

ret  a new <gtk-toggle-button>
[Function] gtk-toggle-button-set-mode (self <gtk-toggle-button>)

(draw indicator bool)

[Method] set-mode

Sets whether the button is displayed as a separate indicator and label. You can call this function on a checkbutton or a radiobutton with draw-indicator = ‘#f’ to make the button look like a normal button This function only affects instances of classes like <gtk-check-button> and

<gtk-radio-button> that derive from <gtk-toggle-button>, not instances of
<gtk-toggle-button> itself.

toggle-button

          a <gtk-toggle-button>

draw-indicator if ‘#t’, draw the button as a separate indicator and label; if ‘#f’, draw the button like a normal button

[Function] gtk-toggle-button-get-mode (self <gtk-toggle-button>)

⇒ (ret bool)

[Method] get-mode

Retrieves whether the button is displayed as a separate indicator and label. See

gtk-toggle-button-set-mode.

toggle-button

          a <gtk-toggle-button>

ret ‘#t’ if the togglebutton is drawn as a separate indicator and label.

[Function] gtk-toggle-button-toggled (self <gtk-toggle-button>)

[Method] toggled

Emits the toggled signal on the <gtk-toggle-button>. There is no good reason for an application ever to call this function.

toggle-button

          a <gtk-toggle-button>.
[Function] gtk-toggle-button-get-active (self <gtk-toggle-button>)

⇒ (ret bool)

[Method] get-active

Queries a <gtk-toggle-button> and returns its current state. Returns ‘#t’ if the toggle button is pressed in and ‘#f’ if it is raised.

toggle-button

          a <gtk-toggle-button>.
ret  a <gboolean> value.
[Function] gtk-toggle-button-set-active (self <gtk-toggle-button>)

(is active bool)

[Method] set-active

Sets the status of the toggle button. Set to ‘#t’ if you want the GtkToggleButton to be ’pressed in’, and ‘#f’ to raise it. This action causes the toggled signal to be emitted.

toggle-button

          a <gtk-toggle-button>.

is-active ‘#t’ or ‘#f’.

[Function] gtk-toggle-button-get-inconsistent (self <gtk-toggle-button>)

⇒ (ret bool)

[Method] get-inconsistent
Gets the value set by gtk-toggle-button-set-inconsistent.

toggle-button

          a <gtk-toggle-button>

ret ‘#t’ if the button is displayed as inconsistent, ‘#f’ otherwise

[Function] gtk-toggle-button-set-inconsistent (self <gtk-toggle-button>)

(setting bool)

[Method] set-inconsistent

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, you may want to display the toggle in an "in between" state. This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user toggles the toggle button. This has to be done manually, gtk-toggle-button-set-inconsistent only affects visual appearance, it doesn’t affect the semantics of the button.

toggle-button

          a <gtk-toggle-button>

setting ‘#t’ if state is inconsistent

19 GtkLinkButton

Create buttons bound to a URL

19.1 Overview

A <gtk-link-button> is a <gtk-button> with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.

A link button is created by calling either gtk-link-button-new or gtk-link-button-new-with-label. If using the former, the URI you pass to the constructor is used as a label for the widget.

The URI bound to a <gtk-link-button> can be set specifically using gtk-link-

button-set-uri, and retrieved using gtk-link-button-get-uri.

<gtk-link-button> offers a global hook, which is called when the used clicks on it: see

gtk-link-button-set-uri-hook.
<gtk-link-button> was added in GTK+ 2.10.

19.2 Usage

[Class] <gtk-link-button>
Derives from <gtk-button>.

This class defines the following slots:

uri The URI bound to this button

[Function] gtk-link-button-new (uri mchars) ⇒ (ret <gtk-widget>)

Creates a new <gtk-link-button> with the URI as its text.

uri a valid URI

ret a new link button widget.

Since 2.10

[Function] gtk-link-button-new-with-label (uri mchars) (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-link-button> containing a label.

uri a valid URI

label the text of the button

ret a new link button widget.

Since 2.10

[Function] gtk-link-button-get-uri (self <gtk-link-button>)
   ⇒ (ret mchars)

[Method] get-uri

Retrieves the URI set using gtk-link-button-set-uri.

link-button

          a <gtk-link-button>

ret a valid URI. The returned string is owned by the link button and should not be modified or freed.

Since 2.10

[Function] gtk-link-button-set-uri (self <gtk-link-button>) (uri mchars)

[Method] set-uri

Sets uri as the URI where the <gtk-link-button> points.

link-button

          a <gtk-link-button>

uri a valid URI

Since 2.10

20 GtkEntry

A single line text entry field

20.1 Overview

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.

20.2 Usage

[Class] <gtk-entry>
Derives from <gtk-editable>, <gtk-cell-editable>, <gtk-widget>.

This class defines the following slots:

cursor-position

The current position of the insertion cursor in chars

selection-bound

The position of the opposite end of the selection from the cursor in chars

editable Whether the entry contents can be edited

max-length

Maximum number of characters for this entry. Zero if no maximum

visibility

FALSE displays the "invisible char" instead of the actual text (password mode)

has-frame

FALSE removes outside bevel from entry

inner-border

Border between text and frame. Overrides the inner-border style property

invisible-char

The character to use when masking entry contents (in "password mode")

activates-default

Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed

width-chars

Number of characters to leave space for in the entry

scroll-offset

Number of pixels of the entry scrolled off the screen to the left

text The contents of the entry

xalign The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

truncate-multiline

Whether to truncate multiline pastes to one line.

shadow-type

Which kind of shadow to draw around the entry when has-frame is set

[Signal on <gtk-entry>] move-cursor (arg0 <gtk-movement-step>)
   (arg1 <gint>) (arg2 <gboolean>)
[Signal on <gtk-entry>] copy-clipboard
[Signal on <gtk-entry>] populate-popup (arg0 <gtk-menu>)
[Signal on <gtk-entry>] activate
[Signal on <gtk-entry>] insert-at-cursor (arg0 <gchararray>)
[Signal on <gtk-entry>] delete-from-cursor (arg0 <gtk-delete-type>)
   (arg1 <gint>)
[Signal on <gtk-entry>] backspace
[Signal on <gtk-entry>] cut-clipboard
[Signal on <gtk-entry>] paste-clipboard
[Signal on <gtk-entry>] toggle-overwrite
[Function] gtk-entry-set-text (self <gtk-entry>) (text mchars)
[Method] set-text

Sets the text in the widget to the given value, replacing the current contents.

entry  a <gtk-entry>.

text the new text.

[Function] gtk-entry-get-text (self <gtk-entry>) ⇒ (ret mchars)
[Method] get-text

Retrieves the contents of the entry widget. See also gtk-editable-get-chars.

entry  a <gtk-entry>

ret a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

[Function] gtk-entry-set-visibility (self <gtk-entry>) (visible bool)
[Method] set-visibility

Sets whether the contents of the entry are visible or not. When visibility is set to ‘#f’, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere. The default invisible char is the asterisk ’*’, but it can be changed with gtk-entry-

set-invisible-char.
entry  a <gtk-entry>.

visible ‘#t’ if the contents of the entry are displayed as plaintext.

[Function] gtk-entry-set-invisible-char (self <gtk-entry>)
   (ch unsigned-int32)
[Method] set-invisible-char

Sets the character to use in place of the actual text when gtk-entry-set-visibility has been called to set text visibility to ‘#f’. i.e. this is the character used in "password mode" to show the user how many characters have been typed. The default invisible char is an asterisk (’*’). If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.

entry  a <gtk-entry>

ch a Unicode character

[Function] gtk-entry-set-max-length (self <gtk-entry>) (max int)
[Method] set-max-length

Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit.

entry  a <gtk-entry>.

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.

[Function] gtk-entry-get-activates-default (self <gtk-entry>)

⇒ (ret bool)

[Method] get-activates-default
Retrieves the value set by gtk-entry-set-activates-default.
entry  a <gtk-entry>

ret ‘#t’ if the entry will activate the default widget

[Function] gtk-entry-get-has-frame (self <gtk-entry>) ⇒ (ret bool)
[Method] get-has-frame
Gets the value set by gtk-entry-set-has-frame.
entry  a <gtk-entry>

ret whether the entry has a beveled frame

[Function] gtk-entry-get-inner-border (self <gtk-entry>)
   ⇒ (ret <gtk-border>)
[Method] get-inner-border

This function returns the entry’s inner-border property. See gtk-entry-set-inner-border for more information.

entry  a <gtk-entry>

ret the entry’s <gtk-border>, or ‘#f’ if none was set.

[Function] gtk-entry-get-width-chars (self <gtk-entry>) ⇒ (ret int)
[Method] get-width-chars
Gets the value set by gtk-entry-set-width-chars.
entry  a <gtk-entry>

ret number of chars to request space for, or negative if unset

[Function] gtk-entry-set-activates-default (self <gtk-entry>)

(setting bool)

[Method] set-activates-default

If setting is ‘#t’, pressing Enter 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 ‘#t’, the entry calls gtk-window-activate-default on the window containing the entry, in the default handler for the "activate" signal.)

entry  a <gtk-entry>

setting ‘#t’ to activate window’s default widget on Enter keypress

[Function] gtk-entry-set-has-frame (self <gtk-entry>) (setting bool)
[Method] set-has-frame

Sets whether the entry has a beveled frame around it.

entry  a <gtk-entry>

setting new value

[Function] gtk-entry-set-inner-border (self <gtk-entry>)
   (border <gtk-border>)
[Method] set-inner-border

Sets ‘entry’’s inner-border property to ‘border’, or clears it if ‘#f’ 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 styleprovided 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.

entry  a <gtk-entry>
border  a <gtk-border>, or ‘#f’

Since 2.10

[Function] gtk-entry-set-width-chars (self <gtk-entry>) (n chars int)
[Method] set-width-chars

Changes the size request of the entry to be about the right size for n-chars characters. Note that it 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.

entry  a <gtk-entry>

n-chars width in chars

[Function] gtk-entry-get-invisible-char (self <gtk-entry>)
   ⇒ (ret unsigned-int32)
[Method] get-invisible-char

Retrieves the character displayed in place of the real characters for entries with visis-

bility set to false. See gtk-entry-set-invisible-char.
entry  a <gtk-entry>

ret the current invisible char, or 0, if the entry does not show invisible text at all.

[Function] gtk-entry-set-alignment (self <gtk-entry>) (xalign float)
[Method] set-alignment

Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry.

entry  a <gtk-entry>

xalign The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts

Since 2.4

[Function] gtk-entry-get-alignment (self <gtk-entry>) ⇒ (ret float)
[Method] get-alignment
Gets the value set by gtk-entry-set-alignment.
entry  a <gtk-entry>

ret the alignment

Since 2.4

[Function] gtk-entry-get-layout (self <gtk-entry>) ⇒ (ret <pango-layout>)
[Method] get-layout

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 gtk-entry-get-layout-offsets. The returned layout is owned by the entry and must not be modified or freed by the caller. Keep in mind that the layout text may contain a preedit string, so gtk-entry-

layout-index-to-text-index and gtk-entry-text-index-to-layout-index are

needed to convert byte indices in the layout to byte indices in the entry contents.

entry  a <gtk-entry>

ret the <pango-layout> for this entry

[Function] gtk-entry-get-layout-offsets (self <gtk-entry>) ⇒ (x int)
   (y int)
[Method] get-layout-offsets

Obtains the position of the <pango-layout> used to render text in the entry, in widget coordinates. Useful if you want 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.

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. Remember when using the <pango-layout> functions you need to convert to and from pixels using pango-

pixels or <pango-scale>.

Keep in mind that the layout text may contain a preedit string, so gtk-entry-

layout-index-to-text-index and gtk-entry-text-index-to-layout-index are

needed to convert byte indices in the layout to byte indices in the entry contents.

entry  a <gtk-entry>

x location to store X offset of layout, or ‘#f’

y location to store Y offset of layout, or ‘#f’

[Function] gtk-entry-get-max-length (self <gtk-entry>) ⇒ (ret int)
[Method] get-max-length

Retrieves the maximum allowed length of the text in entry. See gtk-entry-set-

max-length.
entry  a <gtk-entry>

ret the maximum allowed number of characters in <gtk-entry>, or 0 if there is no maximum.

[Function] gtk-entry-get-visibility (self <gtk-entry>) ⇒ (ret bool)
[Method] get-visibility

Retrieves whether the text in entry is visible. See gtk-entry-set-visibility.

entry  a <gtk-entry>

ret ‘#t’ if the text is currently visible

[Function] gtk-entry-set-completion (self <gtk-entry>)
   (completion <gtk-entry-completion>)
[Method] set-completion

Sets completion to be the auxiliary completion object to use with entry. All further configuration of the completion mechanism is done on completion using the <gtkentry-completion> API. Completion is disabled if completion is set to ‘#f’.

entry  A <gtk-entry>.

completion

          The <gtk-entry-completion> or ‘#f’.

Since 2.4

[Function] gtk-entry-get-completion (self <gtk-entry>)
   ⇒ (ret <gtk-entry-completion>)
[Method] get-completion

Returns the auxiliary completion object currently in use by entry.

entry  A <gtk-entry>.

Chapter 20: GtkEntry 106 ret The auxiliary completion object currently in use by entry. Since 2.4

21 GtkEntryCompletion

Completion functionality for GtkEntry

21.1 Overview

<gtk-entry-completion> is an auxiliary object to be used in conjunction with <gtkentry> to provide the completion functionality. It implements the <gtk-cell-layout> interface, to allow the user to add extra cells to the <gtk-tree-view> with completion matches.

"Completion functionality" means that when the user modifies the text in the entry, <gtk-entry-completion> checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see gtk-entry-completion-set-text-column), but this can be overridden with a custom match function

(see gtk-entry-completion-set-match-func).

When the user selects a completion, the content of the entry is updated. By default, the content of the entry is replaced by the text column of the model, but this can be overridden by connecting to the ::match-selected signal and updating the entry in the signal handler. Note that you should return ‘#t’ from the signal handler to suppress the default behaviour.

To add completion functionality to an entry, use gtk-entry-set-completion.

In addition to regular completion matches, which will be inserted into the entry when they are selected, <gtk-entry-completion> also allows to display "actions" in the popup window. Their appearance is similar to menuitems, to differentiate them clearly from completion strings. When an action is selected, the ::action-activated signal is emitted.

21.2 Usage

[Class] <gtk-entry-completion>
     Derives from <gtk-buildable>, <gtk-cell-layout>, <gobject>.

This class defines the following slots:

model The model to find matches in

     minimum-key-length

Minimum length of the search key in order to look up matches

     text-column

The column of the model containing the strings.

     inline-completion

Whether the common prefix should be inserted automatically

     popup-completion

Whether the completions should be shown in a popup window

     popup-set-width

If TRUE, the popup window will have the same size as the entry

     popup-single-match

If TRUE, the popup window will appear for a single match.

inline-selection

Your description here

[Signal on <gtk-entry-completion>] insert-prefix (arg0 <gchararray>)
   ⇒ <gboolean>

Gets emitted when the inline autocompletion is triggered. The default behaviour 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-file-chooser> inserts only the part of the prefix up to the next ’/’. Since 2.6

[Signal on <gtk-entry-completion>] match-selected (arg0 <gtk-tree-model>)
   (arg1 <gtk-tree-iter>) ⇒ <gboolean>

Gets emitted when a match from the list is selected. The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by iter. Since 2.4

[Signal on <gtk-entry-completion>] cursor-on-match (arg0 <gtk-tree-model>)
   (arg1 <gtk-tree-iter>) ⇒ <gboolean>

undocumented

[Signal on <gtk-entry-completion>] action-activated (arg0 <gint>)

Gets emitted when an action is activated. Since 2.4

[Function] gtk-entry-completion-new ⇒ (ret <gtk-entry-completion>)
Creates a new <gtk-entry-completion> object.

ret A newly created <gtk-entry-completion> object.

Since 2.4

[Function] gtk-entry-completion-get-entry (self <gtk-entry-completion>)
   ⇒ (ret <gtk-widget>)
[Method] get-entry

Gets the entry completion has been attached to.

completion

          A <gtk-entry-completion>.

ret The entry completion has been attached to.

Since 2.4

[Function] gtk-entry-completion-set-model (self <gtk-entry-completion>)
   (model <gtk-tree-model>)
[Method] set-model

Sets the model for a <gtk-entry-completion>. If completion already has a model set, it will remove it before setting the new model. If model is ‘#f’, then it will unset the model. completion

          A <gtk-entry-completion>.
model  The <gtk-tree-model>.

Since 2.4

[Function] gtk-entry-completion-get-model (self <gtk-entry-completion>)
   ⇒ (ret <gtk-tree-model>)
[Method] get-model

Returns the model the <gtk-entry-completion> is using as data source. Returns ‘#f’ if the model is unset.

completion

          A <gtk-entry-completion>.

ret A <gtk-tree-model>, or ‘#f’ if none is currently being used.

Since 2.4

[Function] gtk-entry-completion-complete (self <gtk-entry-completion>)
[Method] complete

Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key. The completion list view will be updated accordingly.

completion

          A <gtk-entry-completion>.

Since 2.4

[Function] gtk-entry-completion-insert-prefix
   (self <gtk-entry-completion>)
[Method] insert-prefix

Requests a prefix insertion.

completion

          a <gtk-entry-completion>

Since 2.6

[Function] gtk-entry-completion-delete-action
   (self <gtk-entry-completion>) (index int)
[Method] delete-action

Deletes the action at index from completion’s action list.

completion

          A <gtk-entry-completion>.

index The index of the item to Delete.

Since 2.4

22 GtkHScale

A horizontal slider widget for selecting a value from a range

22.1 Overview

The <gtk-hscale> widget is used to allow the user to select a value using a horizontal

slider. To create one, use gtk-hscale-new-with-range.

The position to show the current value, and the number of decimal places shown can be set using the parent <gtk-scale> class’s functions.

22.2 Usage

[Class] <gtk-hscale>

Derives from <gtk-scale>. This class defines no direct slots.

[Function] gtk-hscale-new (adjustment <gtk-adjustment>)
   ⇒ (ret <gtk-widget>)
Creates a new <gtk-hscale>.

adjustment the <gtk-adjustment> which sets the range of the scale.

ret  a new <gtk-hscale>.
[Function] gtk-hscale-new-with-range (min double) (max double)
   (step double) ⇒ (ret <gtk-widget>)

Creates a new horizontal scale widget that lets the user input a number between min and max (including min and max) with the increment step. step must be nonzero; it’s the distance the slider moves when using the arrow keys to adjust the scale value. Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use gtk-scale-set-digits to correct it.

min minimum value

max maximum value

step step increment (tick size) used with keyboard shortcuts

ret  a new <gtk-hscale>

23 GtkVScale

A vertical slider widget for selecting a value from a range

23.1 Overview

The <gtk-vscale> widget is used to allow the user to select a value using a vertical slider.

To create one, use gtk-hscale-new-with-range.

The position to show the current value, and the number of decimal places shown can be set using the parent <gtk-scale> class’s functions.

23.2 Usage

[Class] <gtk-vscale>

Derives from <gtk-scale>. This class defines no direct slots.

[Function] gtk-vscale-new (adjustment <gtk-adjustment>)
   ⇒ (ret <gtk-widget>)
Creates a new <gtk-vscale>.

adjustment the <gtk-adjustment> which sets the range of the scale.

ret  a new <gtk-vscale>.
[Function] gtk-vscale-new-with-range (min double) (max double)
   (step double) ⇒ (ret <gtk-widget>)

Creates a new vertical scale widget that lets the user input a number between min and max (including min and max) with the increment step. step must be nonzero; it’s the distance the slider moves when using the arrow keys to adjust the scale value. Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use gtk-scale-set-digits to correct it.

min minimum value

max maximum value

step step increment (tick size) used with keyboard shortcuts

ret  a new <gtk-vscale>

24 GtkSpinButton

Retrieve an integer or floating-point number from the user

24.1 Overview

A <gtk-spin-button> is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a <gtk-entry>, <gtk-spin-button> allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range.

The main properties of a <gtk-spin-button> are through a <gtk-adjustment>. See the <gtk-adjustment> section for more details about an adjustment’s properties.

/* Provides a function to retrieve an integer value from a GtkSpinButton
* and creates a spin button to model percentage values.
*/
gint grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
return gtk_spin_button_get_value_as_int (a_spinner);
}
void create_integer_spin_button (void) {
GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj;
spinner_adj = (GtkAdjustment *) gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
/* creates the spinner, with no decimal places */
spinner = gtk_spin_button_new (spinner_adj, 1.0, 0);
gtk_container_add (GTK_CONTAINER (window), spinner);
gtk_widget_show_all (window);
return;
}

/* Provides a function to retrieve a floating point value from a
* GtkSpinButton, and creates a high precision spin button.
*/

gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
   return gtk_spin_button_get_value (a_spinner);
}
void create_floating_spin_button (void) {
   GtkWidget *window, *spinner;
   GtkAdjustment *spinner_adj;
   spinner_adj = (GtkAdjustment *) gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_container_set_border_width (GTK_CONTAINER (window), 5);
   /* creates the spinner, with three decimal places */
   spinner = gtk_spin_button_new (spinner_adj, 0.001, 3);
   gtk_container_add (GTK_CONTAINER (window), spinner);
   gtk_widget_show_all (window);
   return;
}

24.2 Usage

[Class] <gtk-spin-button>

Derives from <gtk-entry>.

This class defines the following slots:

adjustment

The adjustment that holds the value of the spinbutton

climb-rate

The acceleration rate when you hold down a button

digits The number of decimal places to display

snap-to-ticks

Whether erroneous values are automatically changed to a spin button’s nearest step increment

numeric Whether non-numeric characters should be ignored

wrap Whether a spin button should wrap upon reaching its limits

update-policy

Whether the spin button should update always, or only when the value is legal

value Reads the current value, or sets a new value

[Signal on <gtk-spin-button>] value-changed
[Signal on <gtk-spin-button>] change-value (arg0 <gtk-scroll-type>)
[Signal on <gtk-spin-button>] input (arg0 <gpointer>) ⇒ <gint>
[Signal on <gtk-spin-button>] output ⇒ <gboolean>
[Signal on <gtk-spin-button>] wrapped

The wrapped signal is emitted right after the spinbutton wraps from its maximum to minimum value or vice-versa. Since 2.10

[Function] gtk-spin-button-configure (self <gtk-spin-button>)

(adjustment <gtk-adjustment>) (climb rate double)

   (digits unsigned-int)
[Method] configure

Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call.

spin-button

          a <gtk-spin-button>.

adjustment

          a <gtk-adjustment>.

climb-rate the new climb rate.

digits the number of decimal places to display in the spin button.

[Function] gtk-spin-button-new (adjustment <gtk-adjustment>)
   (climb rate double) (digits unsigned-int) ⇒ (ret <gtk-widget>)
Creates a new <gtk-spin-button>.

adjustment the <gtk-adjustment> object that this spin button should use.

climb-rate specifies how much the spin button changes when an arrow is clicked on.

digits the number of decimal places to display.

ret The new spin button as a <gtk-widget>.

[Function] gtk-spin-button-new-with-range (min double) (max double)
   (step double) ⇒ (ret <gtk-widget>)

This is a convenience constructor that allows creation of a numeric <gtk-spin-button> without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin button is equivalent to the precision of step. Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use gtk-spin-button-set-digits to correct it.

min Minimum allowable value max Maximum allowable value

step Increment added or subtracted by spinning the widget

ret The new spin button as a <gtk-widget>.

[Function] gtk-spin-button-set-adjustment (self <gtk-spin-button>)
   (adjustment <gtk-adjustment>)
[Method] set-adjustment

Replaces the <gtk-adjustment> associated with spin-button.

spin-button

          a <gtk-spin-button>

adjustment a <gtk-adjustment> to replace the existing adjustment

[Function] gtk-spin-button-get-adjustment (self <gtk-spin-button>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-adjustment

Get the adjustment associated with a <gtk-spin-button>

spin-button

          a <gtk-spin-button>

ret the <gtk-adjustment> of spin-button

[Function] gtk-spin-button-set-digits (self <gtk-spin-button>)
   (digits unsigned-int)
[Method] set-digits

Set the precision to be displayed by spin-button. Up to 20 digit precision is allowed.

spin-button

          a <gtk-spin-button>

digits the number of digits after the decimal point to be displayed for the spin button’s value

[Function] gtk-spin-button-set-increments (self <gtk-spin-button>)
   (step double) (page double)
[Method] set-increments

Sets the step and page increments for spin button. This affects how quickly the value changes when the spin button’s arrows are activated.

spin-button

          a <gtk-spin-button>

step increment applied for a button 1 press.

page increment applied for a button 2 press.

[Function] gtk-spin-button-set-range (self <gtk-spin-button>)
   (min double) (max double)
[Method] set-range

Sets the minimum and maximum allowable values for spin-button spin-button

          a <gtk-spin-button>

min minimum allowable value

max maximum allowable value

[Function] gtk-spin-button-get-value-as-int (self <gtk-spin-button>)

⇒ (ret int)

[Method] get-value-as-int

Get the value spin-button represented as an integer.

spin-button

          a <gtk-spin-button>

ret the value of spin-button

[Function] gtk-spin-button-set-value (self <gtk-spin-button>)

(value double)

[Method] set-value

Set the value of spin-button.

spin-button

          a <gtk-spin-button>

value the new value

[Function] gtk-spin-button-set-update-policy (self <gtk-spin-button>)
   (policy <gtk-spin-button-update-policy>)
[Method] set-update-policy

Sets the update behavior of a spin button. This determines whether the spin button is always updated or only when a valid value is set.

spin-button

          a <gtk-spin-button>
policy  a <gtk-spin-button-update-policy> value
[Function] gtk-spin-button-set-numeric (self <gtk-spin-button>)

(numeric bool)

[Method] set-numeric

Sets the flag that determines if non-numeric text can be typed into the spin button.

spin-button

          a <gtk-spin-button>

numeric flag indicating if only numeric entry is allowed.

[Function] gtk-spin-button-spin (self <gtk-spin-button>)

(direction <gtk-spin-type>) (increment double)

[Method] spin

Increment or decrement a spin button’s value in a specified direction by a specified amount. spin-button

          a <gtk-spin-button>

direction a <gtk-spin-type> indicating the direction to spin.

increment step increment to apply in the specified direction.

[Function] gtk-spin-button-set-wrap (self <gtk-spin-button>) (wrap bool)
[Method] set-wrap

Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.

spin-button

          a <gtk-spin-button>

wrap a flag indicating if wrapping behavior is performed.

[Function] gtk-spin-button-set-snap-to-ticks (self <gtk-spin-button>)

(snap to ticks bool)

[Method] set-snap-to-ticks

Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.

spin-button

          a <gtk-spin-button>

snap-to-ticks a flag indicating if invalid values should be corrected.

[Function] gtk-spin-button-update (self <gtk-spin-button>)

[Method] update

Manually force an update of the spin button.

spin-button

          a <gtk-spin-button>
[Function] gtk-spin-button-get-digits (self <gtk-spin-button>)
   ⇒ (ret unsigned-int)
[Method] get-digits

Fetches the precision of spin-button. See gtk-spin-button-set-digits.

spin-button

          a <gtk-spin-button>

ret the current precision

[Function] gtk-spin-button-get-increments (self <gtk-spin-button>)

⇒ (step double) (page double)

[Method] get-increments

Gets the current step and page the increments used by spin-button. See gtk-spin-

button-set-increments.

spin-button

          a <gtk-spin-button>

step location to store step increment, or ‘#f’

page location to store page increment, or ‘#f’

[Function] gtk-spin-button-get-numeric (self <gtk-spin-button>)

⇒ (ret bool)

[Method] get-numeric

Returns whether non-numeric text can be typed into the spin button. See gtk-spin-

button-set-numeric.

spin-button

          a <gtk-spin-button>

ret ‘#t’ if only numeric text can be entered

[Function] gtk-spin-button-get-range (self <gtk-spin-button>)
   ⇒ (min double) (max double)
[Method] get-range

Gets the range allowed for spin-button. See gtk-spin-button-set-range.

spin-button

          a <gtk-spin-button>

min location to store minimum allowed value, or ‘#f’

max location to store maximum allowed value, or ‘#f’

[Function] gtk-spin-button-get-snap-to-ticks (self <gtk-spin-button>)

⇒ (ret bool)

[Method] get-snap-to-ticks

Returns whether the values are corrected to the nearest step. See gtk-spin-button-

set-snap-to-ticks.

spin-button

          a <gtk-spin-button>

ret ‘#t’ if values are snapped to the nearest step.

[Function] gtk-spin-button-get-value (self <gtk-spin-button>)
   ⇒ (ret double)
[Method] get-value

Get the value in the spin-button.

spin-button

          a <gtk-spin-button>

ret the value of spin-button

[Function] gtk-spin-button-get-wrap (self <gtk-spin-button>) ⇒ (ret bool)
[Method] get-wrap

Returns whether the spin button’s value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. See gtk-spin-button-set-wrap.

spin-button

          a <gtk-spin-button>

ret ‘#t’ if the spin button wraps around

25 GtkEditable

Interface for text-editing widgets

25.1 Overview

The <gtk-editable> interface is an interface which should be implemented by text editing widgets, such as <gtk-entry> and <gtk-text>. It contains functions for generically manipulating an editable widget, a large number of action signals used for key bindings, and several signals that an application can connect to to modify the behavior of a widget.

As an example of the latter usage, by connecting the following handler to "insert text", an application can convert all entry into a widget into uppercase.

#include <ctype.h>
void
insert_text_handler (GtkEditable *editable,
                     const gchar *text,
                     gint         length,
                     gint        *position,
                     gpointer     data)
{
  int i;
  gchar *result = g_utf8_strup (text, length);
  g_signal_handlers_block_by_func (editable,
   (gpointer) insert_text_handler, data);
  gtk_editable_insert_text (editable, result, length, position);
  g_signal_handlers_unblock_by_func (editable,
                                     (gpointer) insert_text_handler, data);
  g_signal_stop_emission_by_name (editable, "insert_text");
  g_free (result);
}

25.2 Usage

[Class] <gtk-editable>
Derives from <ginterface>.

This class defines no direct slots.

[Signal on <gtk-editable>] changed

Indicates that the user has changed the contents of the widget.

[Signal on <gtk-editable>] insert-text (arg0 <gchararray>) (arg1 <gint>)
   (arg2 <gpointer>)

This signal is emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with gtk-signal-emit-stop, it is possible to modify the inserted text, or prevent it from being inserted entirely.

[Signal on <gtk-editable>] delete-text (arg0 <gint>) (arg1 <gint>)

This signal is emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with gtk-signal-emit-stop, it is possible to modify the inserted text, or prevent it from being inserted entirely. The start-pos and end-pos parameters are interpreted as for gtk-editable-delete-text

[Function] gtk-editable-select-region (self <gtk-editable>) (start int)

(end int)

[Method] select-region

Selects a region of text. The characters that are selected are those characters at positions from start-pos up to, but not including end-pos. If end-pos is negative, then the the characters selected will be those characters from start-pos to the end of the text.

editable a <gtk-editable> widget.

start the starting position.

end the end position.

[Function] gtk-editable-get-selection-bounds (self <gtk-editable>)

⇒ (ret bool) (start int) (end int)

[Method] get-selection-bounds

Gets the current selection bounds, if there is a selection.

editable a <gtk-editable> widget.

start location to store the starting position, or ‘#f’.

end location to store the end position, or ‘#f’.

ret ‘#t’ if there is a selection.

[Function] gtk-editable-insert-text (self <gtk-editable>)

(new text mchars) (position int) ⇒ (ret int)

[Method] insert-text

Inserts text at a given position.

editable a <gtk-editable> widget.

new-text the text to insert.

new-text-length the length of the text to insert, in bytes

position an inout parameter. The caller initializes it to the position at which to insert the text. After the call it points at the position after the newly inserted text.

[Function] gtk-editable-delete-text (self <gtk-editable>) (start pos int)

(end pos int)

[Method] delete-text

Deletes a sequence of characters. The characters that are deleted are those characters at positions from start-pos up to, but not including end-pos. If end-pos is negative, then the the characters deleted will be those characters from start-pos to the end of the text.

editable a <gtk-editable> widget.

start-pos the starting position.

end-pos the end position.

[Function] gtk-editable-get-chars (self <gtk-editable>) (start pos int)

(end pos int) ⇒ (ret mchars)

[Method] get-chars

Retrieves a sequence of characters. The characters that are retrieved are those characters at positions from start-pos up to, but not including end-pos. If end-pos is negative, then the the characters retrieved will be those characters from start-pos to the end of the text.

editable a <gtk-editable> widget.

start-pos the starting position.

end-pos the end position.

ret the characters in the indicated region. The result must be freed with g-free when the application is finished with it.

[Function] gtk-editable-cut-clipboard (self <gtk-editable>)
[Method] cut-clipboard

Causes the characters in the current selection to be copied to the clipboard and then deleted from the widget.

editable a <gtk-editable> widget.

[Function] gtk-editable-copy-clipboard (self <gtk-editable>)
[Method] copy-clipboard

Causes the characters in the current selection to be copied to the clipboard.

editable a <gtk-editable> widget.

[Function] gtk-editable-paste-clipboard (self <gtk-editable>)
[Method] paste-clipboard

Causes the contents of the clipboard to be pasted into the given widget at the current cursor position.

editable a <gtk-editable> widget.

[Function] gtk-editable-delete-selection (self <gtk-editable>)
[Method] delete-selection

Deletes the current contents of the widgets selection and disclaims the selection.

editable a <gtk-editable> widget.

[Function] gtk-editable-set-position (self <gtk-editable>) (position int)
[Method] set-position

Sets the cursor position.

editable a <gtk-editable> widget.

position the position of the cursor. The cursor is displayed before the character with the given (base 0) index in the widget. The value must be less than or equal to the number of characters in the widget. A value of -1 indicates that the position should be set after the last character in the entry. Note that this position is in characters, not in bytes.

[Function] gtk-editable-get-position (self <gtk-editable>) ⇒ (ret int)
[Method] get-position

Retrieves the current cursor position.

editable a <gtk-editable> widget.

ret the position of the cursor. The cursor is displayed before the character with the given (base 0) index in the widget. The value will be less than or equal to the number of characters in the widget. Note that this position is in characters, not in bytes.

[Function] gtk-editable-set-editable (self <gtk-editable>)

(is editable bool)

[Method] set-editable

Determines if the user can edit the text in the editable widget or not.

editable a <gtk-editable> widget.

is-editable ‘#t’ if the user is allowed to edit the text in the widget.

[Function] gtk-editable-get-editable (self <gtk-editable>) ⇒ (ret bool)
[Method] get-editable

Retrieves whether editable is editable. See gtk-editable-set-editable.

editable a <gtk-editable>

ret ‘#t’ if editable is editable.

26 GtkTextIter

Text buffer iterator

26.1 Overview

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

26.2 Usage

[Class] <gtk-text-iter>

Derives from <gboxed>.

This class defines no direct slots.

[Function] gtk-text-iter-get-buffer (self <gtk-text-iter>)
   ⇒ (ret <gtk-text-buffer>)

Returns the <gtk-text-buffer> this iterator is associated with.

iter an iterator

ret the buffer

[Function] gtk-text-iter-copy (self <gtk-text-iter>)
   ⇒ (ret <gtk-text-iter>)

Creates a dynamically-allocated copy of an iterator. This function is not useful in applications, because iterators can be copied with a simple assignment (‘GtkTextIter i = j;’). The function is used by language bindings.

iter an iterator

ret a copy of the iter, free with gtk-text-iter-free

[Function] gtk-text-iter-get-offset (self <gtk-text-iter>) ⇒ (ret int)

Returns the character offset of an iterator. Each character in a <gtk-text-buffer> has an offset, starting with 0 for the first character in the buffer. Use gtk-text-buffer-get-iter-at-offset to convert an offset back into an iterator.

iter an iterator

ret a character offset

[Function] gtk-text-iter-get-line (self <gtk-text-iter>) ⇒ (ret int)

Returns the line number containing the iterator. Lines in a <gtk-text-buffer> are numbered beginning with 0 for the first line in the buffer.

iter an iterator

ret a line number

[Function] gtk-text-iter-get-line-offset (self <gtk-text-iter>)

⇒ (ret int) Returns the character offset of the iterator, counting from the start of a newlineterminated line. The first character on the line has offset 0.

iter an iterator

ret offset from start of line

[Function] gtk-text-iter-get-line-index (self <gtk-text-iter>)

⇒ (ret int) Returns the byte index of the iterator, counting from the start of a newline-terminated line. Remember that <gtk-text-buffer> encodes text in UTF-8, and that characters can require a variable number of bytes to represent.

iter an iterator

ret distance from start of line, in bytes

[Function] gtk-text-iter-get-char (self <gtk-text-iter>)
   ⇒ (ret unsigned-int32)

Returns the Unicode character at this iterator. (Equivalent to operator* on a C++ iterator.) If the element at this iterator is a non-character element, such as an image embedded in the buffer, the Unicode "unknown" character 0xFFFC is returned. If invoked on the end iterator, zero is returned; zero is not a valid Unicode character. So you can write a loop which ends when gtk-text-iter-get-char returns 0.

iter an iterator

ret a Unicode character, or 0 if iter is not dereferenceable

[Function] gtk-text-iter-get-slice (self <gtk-text-iter>)
   (end <gtk-text-iter>) ⇒ (ret mchars)

Returns the text in the given range. 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 buffer, 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 text buffer. 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.

start iterator at start of a range

end iterator at end of a range

ret slice of text from the buffer

[Function] gtk-text-iter-get-text (self <gtk-text-iter>)
   (end <gtk-text-iter>) ⇒ (ret mchars)

Returns text in the given range. 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 buffer. If you want offsets to correspond, see gtk-

text-iter-get-slice.

start iterator at start of a range end iterator at end of a range

ret array of characters from the buffer

[Function] gtk-text-iter-get-visible-slice (self <gtk-text-iter>)
   (end <gtk-text-iter>) ⇒ (ret mchars)

Like gtk-text-iter-get-slice, but invisible text is not included. Invisible text is usually invisible because a <gtk-text-tag> with the "invisible" attribute turned on has been applied to it.

start iterator at start of range

end iterator at end of range

ret slice of text from the buffer

[Function] gtk-text-iter-get-visible-text (self <gtk-text-iter>)
   (end <gtk-text-iter>) ⇒ (ret mchars)

Like gtk-text-iter-get-text, but invisible text is not included. Invisible text is usually invisible because a <gtk-text-tag> with the "invisible" attribute turned on has been applied to it.

start iterator at start of range

end iterator at end of range

ret string containing visible text in the range

[Function] gtk-text-iter-get-pixbuf (self <gtk-text-iter>)
   ⇒ (ret <gdk-pixbuf>)

If the element at iter is a pixbuf, the pixbuf is returned (with no new reference count added). Otherwise, ‘#f’ is returned.

iter an iterator

ret the pixbuf at iter

[Function] gtk-text-iter-get-marks (self <gtk-text-iter>)
   ⇒ (ret gslist-of)

Returns a list of all <gtk-text-mark> at this location. Because marks are not iterable (they don’t take up any "space" in the buffer, they are just marks in between iterable locations), multiple marks can exist in the same place. The returned list is not in any meaningful order.

iter an iterator

ret  list of <gtk-text-mark>
[Function] gtk-text-iter-get-toggled-tags (self <gtk-text-iter>)

(toggled on bool) ⇒ (ret gslist-of) Returns a list of <gtk-text-tag> that are toggled on or off at this point. (If toggledon is ‘#t’, the list contains tags that are toggled on.) If a tag is toggled on at iter, then some non-empty range of characters following iter has that tag applied to it. If a tag is toggled off, then some non-empty range following iter does not have the tag applied to it. iter an iterator

toggled-on ‘#t’ to get toggled-on tags

ret tags toggled at this point

[Function] gtk-text-iter-get-child-anchor (self <gtk-text-iter>)
   ⇒ (ret <gtk-text-child-anchor>)

If the location at iter contains a child anchor, the anchor is returned (with no new reference count added). Otherwise, ‘#f’ is returned.

iter an iterator

ret the anchor at iter

[Function] gtk-text-iter-begins-tag (self <gtk-text-iter>)
   (tag <gtk-text-tag>) ⇒ (ret bool)

Returns ‘#t’ if tag is toggled on at exactly this point. If tag is ‘#f’, returns ‘#t’ if any tag is toggled on at this point. Note that the gtk-text-iter-begins-tag returns ‘#t’ if iter is the start of the tagged range; gtk-text-iter-has-tag tells you whether an iterator is within a tagged range.

iter an iterator

tag  a <gtk-text-tag>, or ‘#f’

ret whether iter is the start of a range tagged with tag

[Function] gtk-text-iter-ends-tag (self <gtk-text-iter>)
   (tag <gtk-text-tag>) ⇒ (ret bool)

Returns ‘#t’ if tag is toggled off at exactly this point. If tag is ‘#f’, returns ‘#t’ if any tag is toggled off at this point. Note that the gtk-text-iter-ends-tag returns ‘#t’ if iter is the end of the tagged range; gtk-text-iter-has-tag tells you whether an iterator is within a tagged range.

iter an iterator

tag  a <gtk-text-tag>, or ‘#f’

ret whether iter is the end of a range tagged with tag

[Function] gtk-text-iter-toggles-tag (self <gtk-text-iter>)
   (tag <gtk-text-tag>) ⇒ (ret bool)
This is equivalent to (gtk-text-iter-begins-tag || gtk-text-iter-ends-tag),

i.e. it tells you whether a range with tag applied to it begins or ends at iter.

iter an iterator

tag  a <gtk-text-tag>, or ‘#f’

ret whether tag is toggled on or off at iter

[Function] gtk-text-iter-has-tag (self <gtk-text-iter>)
   (tag <gtk-text-tag>) ⇒ (ret bool)

Returns ‘#t’ if iter is within a range tagged with tag.

iter an iterator

tag  a <gtk-text-tag>

ret whether iter is tagged with tag

[Function] gtk-text-iter-get-tags (self <gtk-text-iter>)
   ⇒ (ret gslist-of)

Returns a list of tags that apply to iter, in ascending order of priority (highest-priority tags are last). The <gtk-text-tag> in the list don’t have a reference added, but you have to free the list itself.

iter  a <gtk-text-iter>
ret  list of <gtk-text-tag>
[Function] gtk-text-iter-editable (self <gtk-text-iter>)

(default setting bool) ⇒ (ret bool) Returns whether the character at iter is within an editable region of text. Noneditable text is "locked" and can’t be changed by the user via <gtk-text-view>. This function is simply a convenience wrapper around gtk-text-iter-get-attributes. If no tags applied to this text affect editability, default-setting will be returned. You don’t want to use this function to decide whether text can be inserted at iter, because for insertion you don’t want to know whether the char at iter is inside an editable range, you want to know whether a new character inserted at iter would be inside an editable range. Use gtk-text-iter-can-insert to handle this case.

iter an iterator

default-setting ‘#t’ if text is editable by default

ret whether iter is inside an editable range

[Function] gtk-text-iter-can-insert (self <gtk-text-iter>)

(default editability bool) ⇒ (ret bool) Considering the default editability of the buffer, and tags that affect editability, determines whether text inserted at iter would be editable. If text inserted at iter would be editable then the user should be allowed to insert text at iter. gtk-text-buffer-insert-interactive uses this function to decide whether insertions are allowed at a given position.

iter an iterator

default-editability ‘#t’ if text is editable by default

ret whether text inserted at iter would be editable

[Function] gtk-text-iter-starts-word (self <gtk-text-iter>) ⇒ (ret bool)

Determines whether iter 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter is at the start of a word

[Function] gtk-text-iter-ends-word (self <gtk-text-iter>) ⇒ (ret bool)

Determines whether iter 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter is at the end of a word

[Function] gtk-text-iter-inside-word (self <gtk-text-iter>) ⇒ (ret bool)

Determines whether iter 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter is inside a word

[Function] gtk-text-iter-starts-line (self <gtk-text-iter>) ⇒ (ret bool)

Returns ‘#t’ if iter begins a paragraph, i.e. if gtk-text-iter-get-line-offset would return 0. However this function is potentially more efficient than gtk-text-iter-get-line-offset because it doesn’t have to compute the offset, it just has to see whether it’s 0.

iter an iterator

ret whether iter begins a line

[Function] gtk-text-iter-ends-line (self <gtk-text-iter>) ⇒ (ret bool)

Returns ‘#t’ if iter 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 iterator 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 iterator is considered to be at the end of a line, even though there are no paragraph delimiter chars there.

iter an iterator

ret whether iter is at the end of a line

[Function] gtk-text-iter-starts-sentence (self <gtk-text-iter>)

⇒ (ret bool) Determines whether iter 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter is at the start of a sentence.

[Function] gtk-text-iter-ends-sentence (self <gtk-text-iter>)

⇒ (ret bool) Determines whether iter 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter is at the end of a sentence.

[Function] gtk-text-iter-inside-sentence (self <gtk-text-iter>)

⇒ (ret bool) Determines whether iter 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter is inside a sentence.

[Function] gtk-text-iter-is-cursor-position (self <gtk-text-iter>)

⇒ (ret bool)

See gtk-text-iter-forward-cursor-position or <pango-log-attr> or

pango-break for details on what a cursor position is.

iter  a <gtk-text-iter>

ret ‘#t’ if the cursor can be placed at iter

[Function] gtk-text-iter-get-chars-in-line (self <gtk-text-iter>)

⇒ (ret int) Returns the number of characters in the line containing iter, including the paragraph delimiters. iter an iterator ret number of characters in the line

[Function] gtk-text-iter-get-bytes-in-line (self <gtk-text-iter>)

⇒ (ret int) Returns the number of bytes in the line containing iter, including the paragraph delimiters. iter an iterator ret number of bytes in the line

[Function] gtk-text-iter-get-attributes (self <gtk-text-iter>)
   (values <gtk-text-attributes>) ⇒ (ret bool)

Computes the effect of any tags applied to this spot in the text. The values parameter should be initialized to the default settings you wish to use if no tags are in effect.

You’d typically obtain the defaults from gtk-text-view-get-default-attributes.

gtk-text-iter-get-attributes will modify values, applying the effects of any tags present at iter. If any tags affected values, the function returns ‘#t’. iter an iterator

values  a <gtk-text-attributes> to be filled in

ret ‘#t’ if values was modified

[Function] gtk-text-iter-get-language (self <gtk-text-iter>)
   ⇒ (ret <pango-language>)

A convenience wrapper around gtk-text-iter-get-attributes, which returns the language in effect at iter. If no tags affecting language apply to iter, the return value

is identical to that of gtk-get-default-language.

iter an iterator

ret language in effect at iter

[Function] gtk-text-iter-is-end (self <gtk-text-iter>) ⇒ (ret bool)

Returns ‘#t’ if iter is the end iterator, i.e. one past the last dereferenceable iterator in the buffer. gtk-text-iter-is-end is the most efficient way to check whether an iterator is the end iterator.

iter an iterator

ret whether iter is the end iterator

[Function] gtk-text-iter-is-start (self <gtk-text-iter>) ⇒ (ret bool)

Returns ‘#t’ if iter is the first iterator in the buffer, that is if iter has a character offset of 0.

iter an iterator

ret whether iter is the first in the buffer

[Function] gtk-text-iter-forward-char (self <gtk-text-iter>) ⇒ (ret bool)

Moves iter forward by one character offset. Note that images embedded in the buffer occupy 1 character slot, so gtk-text-iter-forward-char may actually move onto an image instead of a character, if you have images in your buffer. If iter is the end iterator or one character before it, iter will now point at the end iterator, and gtk-text-iter-forward-char returns ‘#f’ for convenience when writing loops.

iter an iterator

ret whether iter moved and is dereferenceable

[Function] gtk-text-iter-backward-char (self <gtk-text-iter>)

⇒ (ret bool) Moves backward by one character offset. Returns ‘#t’ if movement was possible; if iter was the first in the buffer (character offset 0), gtk-text-iter-backward-char returns ‘#f’ for convenience when writing loops.

iter an iterator

ret whether movement was possible

[Function] gtk-text-iter-forward-chars (self <gtk-text-iter>) (count int)

⇒ (ret bool) Moves count characters if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the new position of iter is different from its original position, and dereferenceable (the last iterator in the buffer is not dereferenceable). If count is 0, the function does nothing and returns ‘#f’. iter an iterator

count number of characters to move, may be negative

ret whether iter moved and is dereferenceable

[Function] gtk-text-iter-backward-chars (self <gtk-text-iter>) (count int)

⇒ (ret bool) Moves count characters backward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn’t move, or moved onto the end iterator, then ‘#f’ is returned. If count is 0, the function does nothing and returns ‘#f’.

iter an iterator

count number of characters to move

ret whether iter moved and is dereferenceable

[Function] gtk-text-iter-forward-line (self <gtk-text-iter>) ⇒ (ret bool)

Moves iter to the start of the next line. Returns ‘#t’ if there was a next line to move to, and ‘#f’ if iter was simply moved to the end of the buffer and is now not dereferenceable, or if iter was already at the end of the buffer.

iter an iterator

ret whether iter can be dereferenced

[Function] gtk-text-iter-backward-line (self <gtk-text-iter>)

⇒ (ret bool) Moves iter to the start of the previous line. Returns ‘#t’ if iter could be moved; i.e. if iter was at character offset 0, this function returns ‘#f’. Therefore if iter was already on line 0, but not at the start of the line, iter is snapped to the start of the line and the function returns ‘#t’. (Note that this implies that in a loop calling this function, the line number may not change on every iteration, if your first iteration is on line 0.)

iter an iterator

ret whether iter moved

[Function] gtk-text-iter-forward-lines (self <gtk-text-iter>) (count int)

⇒ (ret bool) Moves count lines forward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn’t move, or moved onto the end iterator, then ‘#f’ is returned. If count is 0, the function does nothing and returns ‘#f’. If count is negative, moves backward by 0 - count lines.

iter  a <gtk-text-iter>

count number of lines to move forward

ret whether iter moved and is dereferenceable

[Function] gtk-text-iter-backward-lines (self <gtk-text-iter>) (count int)

⇒ (ret bool) Moves count lines backward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn’t move, or moved onto the end iterator, then ‘#f’ is returned. If count is 0, the function does nothing and returns ‘#f’. If count is negative, moves forward by 0 - count lines.

iter  a <gtk-text-iter>

count number of lines to move backward

ret whether iter moved and is dereferenceable

[Function] gtk-text-iter-forward-word-ends (self <gtk-text-iter>)

(count int) ⇒ (ret bool)

Calls gtk-text-iter-forward-word-end up to count times.
iter  a <gtk-text-iter>

count number of times to move

ret ‘#t’ if iter moved and is not the end iterator

[Function] gtk-text-iter-backward-word-starts (self <gtk-text-iter>)

(count int) ⇒ (ret bool)

Calls gtk-text-iter-backward-word-start up to count times.
iter  a <gtk-text-iter>

count number of times to move

ret ‘#t’ if iter moved and is not the end iterator

[Function] gtk-text-iter-forward-word-end (self <gtk-text-iter>)

⇒ (ret bool) Moves forward to the next word end. (If iter is currently on a word end, 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter moved and is not the end iterator

[Function] gtk-text-iter-backward-word-start (self <gtk-text-iter>)

⇒ (ret bool) Moves backward to the previous word start. (If iter is currently on a word start, 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter moved and is not the end iterator

[Function] gtk-text-iter-forward-sentence-end (self <gtk-text-iter>)

⇒ (ret bool) Moves forward to the next sentence end. (If iter is at the end of a sentence, 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).

iter  a <gtk-text-iter>

ret ‘#t’ if iter moved and is not the end iterator

[Function] gtk-text-iter-forward-sentence-ends (self <gtk-text-iter>)

(count int) ⇒ (ret bool)

Calls gtk-text-iter-forward-sentence-endcount times (or until gtk-text-iter-

forward-sentence-end returns ‘#f’). If count is negative, moves backward instead of forward.

iter  a <gtk-text-iter>

count number of sentences to move

ret ‘#t’ if iter moved and is not the end iterator

[Function] gtk-text-iter-forward-visible-line (self <gtk-text-iter>)

⇒ (ret bool) Moves iter to the start of the next visible line. Returns ‘#t’ if there was a next line to move to, and ‘#f’ if iter was simply moved to the end of the buffer and is now not dereferenceable, or if iter was already at the end of the buffer.

iter an iterator

ret whether iter can be dereferenced

Since 2.8

[Function] gtk-text-iter-backward-visible-line (self <gtk-text-iter>)

⇒ (ret bool) Moves iter to the start of the previous visible line. Returns ‘#t’ if iter could be moved; i.e. if iter was at character offset 0, this function returns ‘#f’. Therefore if iter was already on line 0, but not at the start of the line, iter is snapped to the start of the line and the function returns ‘#t’. (Note that this implies that in a loop calling this function, the line number may not change on every iteration, if your first iteration is on line 0.)

iter an iterator

ret whether iter moved

Since 2.8

[Function] gtk-text-iter-forward-visible-lines (self <gtk-text-iter>)

(count int) ⇒ (ret bool) Moves count visible lines forward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn’t move, or moved onto the end iterator, then ‘#f’ is returned. If count is 0, the function does nothing and returns ‘#f’. If count is negative, moves backward by 0 - count lines.

iter  a <gtk-text-iter>

count number of lines to move forward

ret whether iter moved and is dereferenceable

Since 2.8

[Function] gtk-text-iter-set-offset (self <gtk-text-iter>) (char offset int)

Sets iter to point to char-offset. char-offset counts from the start of the entire text buffer, starting with 0.

iter  a <gtk-text-iter>

char-offset a character number

[Function] gtk-text-iter-set-line (self <gtk-text-iter>) (line number int)

Moves iterator iter to the start of the line line-number. If line-number is negative or larger than the number of lines in the buffer, moves iter to the start of the last line in the buffer.

iter  a <gtk-text-iter>

line-number line number (counted from 0)

[Function] gtk-text-iter-set-line-offset (self <gtk-text-iter>)

(char on line int) Moves iter within a line, to a new character (not byte) offset. The given character offset must be less than or equal to the number of characters in the line; if equal, iter moves to the start of the next line. See gtk-text-iter-set-line-index if you have a byte index rather than a character offset.

iter  a <gtk-text-iter>

char-on-line a character offset relative to the start of iter’s current line

[Function] gtk-text-iter-set-line-index (self <gtk-text-iter>)

(byte on line int) Same as gtk-text-iter-set-line-offset, but works with a byte 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.

iter  a <gtk-text-iter>

byte-on-line a byte index relative to the start of iter’s current line

[Function] gtk-text-iter-forward-to-end (self <gtk-text-iter>)

Moves iter forward to the "end iterator," which points one past the last valid character in the buffer. gtk-text-iter-get-char called on the end iterator returns 0, which is convenient for writing loops.

iter  a <gtk-text-iter>
[Function] gtk-text-iter-forward-to-line-end (self <gtk-text-iter>)

⇒ (ret bool) Moves the iterator to point to the paragraph delimiter characters, which will be either a newline, a carriage return, a carriage return/newline in sequence, or the Unicode paragraph separator character. If the iterator is already at the paragraph delimiter characters, moves to the paragraph delimiter characters for the next line. If iter is on the last line in the buffer, which does not end in paragraph delimiters, moves to the end iterator (end of the last line), and returns ‘#f’.

iter  a <gtk-text-iter>

ret ‘#t’ if we moved and the new location is not the end iterator

[Function] gtk-text-iter-forward-to-tag-toggle (self <gtk-text-iter>)
   (tag <gtk-text-tag>) ⇒ (ret bool)

Moves forward to the next toggle (on or off) of the <gtk-text-tag>tag, or to the next toggle of any tag if tag is ‘#f’. If no matching tag toggles are found, returns ‘#f’, otherwise ‘#t’. Does not return toggles located at iter, only toggles after iter. Sets iter to the location of the toggle, or to the end of the buffer if no toggle is found.

iter  a <gtk-text-iter>
tag  a <gtk-text-tag>, or ‘#f’

ret whether we found a tag toggle after iter

[Function] gtk-text-iter-forward-search (self <gtk-text-iter>)
   (str mchars) (flags <gtk-text-search-flags>)
   (match start <gtk-text-iter>) (match end <gtk-text-iter>)
   (limit <gtk-text-iter>) ⇒ (ret bool)

Searches forward for str. Any match is returned by setting match-start to the first character of the match and match-end to the first character after the match. The search will not continue past limit. Note that a search is a linear or O(n) operation, so you may wish to use limit to avoid locking up your UI on 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. similarly, if you specify <gtk-text-search-text-only>, the match may have pixbufs or child widgets mixed inside the matched range. If these flags are not given, the match must be exact; the special 0xFFFC character in str will match embedded pixbufs or child widgets.

iter start of search

str a search string

flags flags affecting how the search is done match-start

return location for start of match, or ‘#f’

match-end return location for end of match, or ‘#f’

limit bound for the search, or ‘#f’ for the end of the buffer

ret whether a match was found

[Function] gtk-text-iter-backward-search (self <gtk-text-iter>)
   (str mchars) (flags <gtk-text-search-flags>)
   (match start <gtk-text-iter>) (match end <gtk-text-iter>)
   (limit <gtk-text-iter>) ⇒ (ret bool)
Same as gtk-text-iter-forward-search, but moves backward.

iter a <gtk-text-iter> where the search begins

str search string

flags bitmask of flags affecting the search

match-start return location for start of match, or ‘#f’

match-end return location for end of match, or ‘#f’

limit location of last possible match-start, or ‘#f’ for start of buffer

ret whether a match was found

[Function] gtk-text-iter-equal (self <gtk-text-iter>)
   (rhs <gtk-text-iter>) ⇒ (ret bool)

Tests whether two iterators are equal, using the fastest possible mechanism. This function is very fast; you can expect it to perform better than e.g. getting the character offset for each iterator and comparing the offsets yourself. Also, it’s a bit

faster than gtk-text-iter-compare.
lhs  a <gtk-text-iter>
rhs  another <gtk-text-iter>

ret ‘#t’ if the iterators point to the same place in the buffer

[Function] gtk-text-iter-compare (self <gtk-text-iter>)
   (rhs <gtk-text-iter>) ⇒ (ret int)

A qsort-style function that returns negative if lhs is less than rhs, positive if lhs is greater than rhs, and 0 if they’re equal. Ordering is in character offset order, i.e. the first character in the buffer is less than the second character in the buffer.

lhs  a <gtk-text-iter>
rhs  another <gtk-text-iter>

ret -1 if lhs is less than rhs, 1 if lhs is greater, 0 if they are equal

[Function] gtk-text-iter-in-range (self <gtk-text-iter>)
   (start <gtk-text-iter>) (end <gtk-text-iter>) ⇒ (ret bool)

Checks whether iter falls in the range [start, end). start and end must be in ascending order.

iter  a <gtk-text-iter>

start start of range

end end of range

ret ‘#t’ if iter is in the range

[Function] gtk-text-iter-order (self <gtk-text-iter>)
   (second <gtk-text-iter>)

Swaps the value of first and second if second comes before first in the buffer. That is, ensures that first and second are in sequence. Most text buffer functions that take a range call this automatically on your behalf, so there’s no real reason to call it yourself in those cases. There are some exceptions, such as gtk-text-iter-in-range, that expect a pre-sorted range.

first  a <gtk-text-iter>
second  another <gtk-text-iter>

27 GtkTextMark

A position in the buffer preserved across buffer modifications

27.1 Overview

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

A <gtk-text-mark> is like a bookmark in a text buffer; it preserves a position in the text. You can convert the mark to an iterator using gtk-text-buffer-get-iter-at-mark. Unlike iterators, marks remain valid across buffer mutations, because their behavior is defined when text is inserted or deleted. When text containing a mark is deleted, the mark remains in the position originally occupied by the deleted text. When text is inserted at a mark, a mark with left gravity will be moved to the beginning of the newly-inserted text, and a mark with right gravity will be moved to the end.

"left" and "right" here refer to logical direction (left is the toward the start of the buffer); in some languages such as Hebrew the logically-leftmost text is not actually on the left when displayed.

Marks are reference counted, but the reference count only controls the validity of the memory; marks can be deleted from the buffer at any time with gtk-text-buffer-delete-mark. Once deleted from the buffer, a mark is essentially useless.

Marks optionally have names; these can be convenient to avoid passing the <gtk-text-mark> object around.

Marks are typically created using the gtk-text-buffer-create-mark function.

27.2 Usage

[Class] <gtk-text-mark>

Derives from <gobject>.

This class defines the following slots:

name Mark name

     left-gravity

Whether the mark has left gravity

[Function] gtk-text-mark-set-visible (self <gtk-text-mark>) (setting bool)
[Method] set-visible

Sets the visibility of mark; the insertion point is normally visible, i.e. you can see it as a vertical bar. Also, the text widget uses a visible mark to indicate where a drop will occur when dragging-and-dropping text. Most other marks are not visible. Marks are not visible by default.

     mark  a <gtk-text-mark>

setting visibility of mark

[Function] gtk-text-mark-get-visible (self <gtk-text-mark>) ⇒ (ret bool)
[Method] get-visible

Returns ‘#t’ if the mark is visible (i.e. a cursor is displayed for it)

mark  a <gtk-text-mark>

ret ‘#t’ if visible

[Function] gtk-text-mark-get-deleted (self <gtk-text-mark>) ⇒ (ret bool)
[Method] get-deleted

Returns ‘#t’ if the mark has been removed from its buffer with gtk-text-buffer-delete-mark. Marks can’t be used once deleted.

mark  a <gtk-text-mark>

ret whether the mark is deleted

[Function] gtk-text-mark-get-name (self <gtk-text-mark>) ⇒ (ret mchars)
[Method] get-name

Returns the mark name; returns NULL for anonymous marks.

mark  a <gtk-text-mark>

ret mark name

[Function] gtk-text-mark-get-buffer (self <gtk-text-mark>)
   ⇒ (ret <gtk-text-buffer>)
[Method] get-buffer

Gets the buffer this mark is located inside, or NULL if the mark is deleted.

mark  a <gtk-text-mark>
ret  the mark’s <gtk-text-buffer>
[Function] gtk-text-mark-get-left-gravity (self <gtk-text-mark>)

⇒ (ret bool)

[Method] get-left-gravity

Determines whether the mark has left gravity.

mark  a <gtk-text-mark>

ret ‘#t’ if the mark has left gravity, ‘#f’ otherwise

28 GtkTextBuffer

Stores attributed text for display in a

28.1 Overview

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

28.2 Usage

[Class] <gtk-text-buffer>

Derives from <gobject>. This class defines the following slots:

tag-table

Text Tag Table

text Current text of the buffer

has-selection

Whether the buffer has some text currently selected

cursor-position

The position of the insert mark (as offset from the beginning of the buffer)

copy-target-list

The list of targets this buffer supports for clipboard copying and DND source

paste-target-list

The list of targets this buffer supports for clipboard pasting and DND destination

[Signal on <gtk-text-buffer>] changed

The changed signal is emitted when the content of a <gtk-text-buffer> has changed.

[Signal on <gtk-text-buffer>] insert-text (arg0 <gtk-text-iter>)
   (arg1 <gchararray>) (arg2 <gint>)

The insert text signal is emitted to insert text in a <gtk-text-buffer>. Insertion actually occurs in the default handler. Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to point to the end of the inserted text.

See also: gtk-text-buffer-insert, gtk-text-buffer-insert-range.
[Signal on <gtk-text-buffer>] insert-pixbuf (arg0 <gtk-text-iter>)
   (arg1 <gdk-pixbuf>)

The insert pixbuf signal is emitted to insert a <gdk-pixbuf> in a <gtk-text-buffer>. Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to be placed after the inserted pixbuf.

See also: gtk-text-buffer-insert-pixbuf.
[Signal on <gtk-text-buffer>] insert-child-anchor (arg0 <gtk-text-iter>)
   (arg1 <gtk-text-child-anchor>)

The insert child anchor signal is emitted to insert a <gtk-text-child-anchor> in a <gtk-text-buffer>. Insertion actually occurs in the default handler. Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to be placed after the inserted anchor.

See also: gtk-text-buffer-insert-child-anchor.
[Signal on <gtk-text-buffer>] delete-range (arg0 <gtk-text-iter>)
   (arg1 <gtk-text-iter>)

The delete range signal is emitted to delete a range from a <gtk-text-buffer>. Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them). The default signal handler revalidates the start and end iters to both point point to the location where text was deleted. Handlers which run after the default handler (see g-signal-connect-after) do not have access to the deleted text.

See also: gtk-text-buffer-delete.
[Signal on <gtk-text-buffer>] modified-changed

The modified changed signal is emitted when the modified bit of a <gtk-text-

buffer> flips.
See also: gtk-text-buffer-set-modified.
[Signal on <gtk-text-buffer>] mark-set (arg0 <gtk-text-iter>)
   (arg1 <gtk-text-mark>)

The mark set signal is emitted as notification after a <gtk-text-mark> is set.

See also: gtk-text-buffer-create-mark, gtk-text-buffer-move-mark.
[Signal on <gtk-text-buffer>] mark-deleted (arg0 <gtk-text-mark>)

The mark deleted signal is emitted as notification after a <gtk-text-mark> is deleted.

See also: gtk-text-buffer-delete-mark.
[Signal on <gtk-text-buffer>] apply-tag (arg0 <gtk-text-tag>)
   (arg1 <gtk-text-iter>) (arg2 <gtk-text-iter>)

The apply tag signal is emitted to apply a tag to a range of text in a <gtk-text-buffer>. Applying actually occurs in the default handler. Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them).

See also: gtk-text-buffer-apply-tag, gtk-text-buffer-insert-with-tags,
gtk-text-buffer-insert-range.

[Signal on <gtk-text-buffer>] remove-tag (arg0 <gtk-text-tag>)
   (arg1 <gtk-text-iter>) (arg2 <gtk-text-iter>)

The remove tag signal is emitted to remove all occurrences of tag from a range of text in a <gtk-text-buffer>. Removal actually occurs in the default handler. Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them).

See also: gtk-text-buffer-remove-tag.
[Signal on <gtk-text-buffer>] begin-user-action

The begin user action signal is emitted at the beginning of a single user-visible op-

eration on a <gtk-text-buffer>.
See also:  gtk-text-buffer-begin-user-action,  gtk-text-buffer-
insert-interactive,  gtk-text-buffer-insert-range-interactive,
gtk-text-buffer-delete-interactive,  gtk-text-buffer-backspace,
gtk-text-buffer-delete-selection.
[Signal on <gtk-text-buffer>] end-user-action

The end user action signal is emitted at the end of a single user-visible operation

<gtk-text-buffer>.
See also:  gtk-text-buffer-end-user-action, gtk-text-buffer-insert-
interactive, gtk-text-buffer-insert-range-interactive, gtk-text-buffer-
delete-interactive, gtk-text-buffer-backspace, gtk-text-buffer-delete-
selection, gtk-text-buffer-backspace.
[Function] gtk-text-buffer-new (table <gtk-text-tag-table>)
   ⇒ (ret <gtk-text-buffer>)

Creates a new text buffer.

table a tag table, or NULL to create a new one

ret a new text buffer

[Function] gtk-text-buffer-get-line-count (self <gtk-text-buffer>)

⇒ (ret int)

[Method] get-line-count

Obtains the number of lines in the buffer. This value is cached, so the function is very fast.

buffer  a <gtk-text-buffer>

ret number of lines in the buffer

[Function] gtk-text-buffer-get-char-count (self <gtk-text-buffer>)

⇒ (ret int)

[Method] get-char-count

Gets 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.

buffer  a <gtk-text-buffer>

ret number of characters in the buffer

[Function] gtk-text-buffer-get-tag-table (self <gtk-text-buffer>)
   ⇒ (ret <gtk-text-tag-table>)
[Method] get-tag-table

Get the <gtk-text-tag-table> associated with this buffer.

buffer  a <gtk-text-buffer>

ret the buffer’s tag table

[Function] gtk-text-buffer-insert (self <gtk-text-buffer>)
   (iter <gtk-text-iter>) (stext scm)

[Method] insert

Inserts len bytes of text at position iter. If len is -1, text must be nul-terminated and will be inserted in its entirety. Emits the "insert text" signal; 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.

buffer  a <gtk-text-buffer>

iter a position in the buffer

text UTF-8 format text to insert

len length of text in bytes, or -1

[Function] gtk-text-buffer-insert-at-cursor (self <gtk-text-buffer>)

(stext scm)

[Method] insert-at-cursor

Simply calls gtk-text-buffer-insert, using the current cursor position as the insertion point.

buffer  a <gtk-text-buffer>

text some text in UTF-8 format

len length of text, in bytes

[Function] gtk-text-buffer-insert-interactive (self <gtk-text-buffer>)

(iter <gtk-text-iter>) (stext scm) (default editable bool) ⇒ (ret bool)

[Method] insert-interactive

Like gtk-text-buffer-insert, but the insertion will not occur if iter is at a noneditable location in the buffer. Usually you want to prevent insertions at ineditable 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 gtk-text-view-get-editable is appropriate here.

buffer  a <gtk-text-buffer>

iter a position in buffer

text some UTF-8 text

len length of text in bytes, or -1 default-editable

default editability of buffer

ret whether text was actually inserted

[Function] gtk-text-buffer-insert-range (self <gtk-text-buffer>)
   (iter <gtk-text-iter>) (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] insert-range

Copies text, tags, and pixbufs between start and end (the order of start and end doesn’t matter) 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. Implemented via emissions of the insert text and apply tag signals, so expect those.

buffer  a <gtk-text-buffer>

iter a position in buffer

start  a position in a <gtk-text-buffer>

end another position in the same buffer as start

[Function] gtk-text-buffer-insert-with-tags (self <gtk-text-buffer>)
   (iter <gtk-text-iter>) (stext scm) (tag list glist-of)
[Method] insert-with-tags

Inserts text into buffer at iter, applying the list of tags to the newly-inserted text. The last tag specified must be NULL to terminate the list. Equivalent to calling

gtk-text-buffer-insert, then gtk-text-buffer-apply-tag on the inserted text;
gtk-text-buffer-insert-with-tags is just a convenience function.
buffer  a <gtk-text-buffer>

iter an iterator in buffer

text UTF-8 text

len length of text, or -1

first-tag first tag to apply to text

... NULL-terminated list of tags to apply

[Function] gtk-text-buffer-delete (self <gtk-text-buffer>)
   (start <gtk-text-iter>) (end <gtk-text-iter>)

[Method] delete

Deletes text between start and end. The order of start and end is not actually relevant; gtk-text-buffer-delete will reorder them. This function actually emits the "delete range" signal, and the default handler of that signal deletes the text. Because the buffer is modified, all outstanding iterators become invalid after calling this function; however, the start and end will be re-initialized to point to the location where text was deleted.

buffer  a <gtk-text-buffer>

start a position in buffer

end another position in buffer

[Function] gtk-text-buffer-delete-interactive (self <gtk-text-buffer>)
   (start iter <gtk-text-iter>) (end iter <gtk-text-iter>)

(default editable bool) ⇒ (ret bool)

[Method] delete-interactive

Deletes all editable text in the given range. Calls gtk-text-buffer-delete 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.

buffer  a <gtk-text-buffer>

start-iter start of range to delete

end-iter end of range

default-editable whether the buffer is editable by default

ret whether some text was actually deleted

[Function] gtk-text-buffer-backspace (self <gtk-text-buffer>)

(iter <gtk-text-iter>) (interactive bool) (default editable bool)

⇒ (ret bool)

[Method] backspace

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, the iter will be re-initialized to point to the location where text was deleted.

buffer  a <gtk-text-buffer>

iter a position in buffer

interactive whether the deletion is caused by user interaction

default-editable whether the buffer is editable by default

ret ‘#t’ if the buffer was modified

Since 2.6

[Function] gtk-text-buffer-set-text (self <gtk-text-buffer>) (stext scm)
[Method] set-text

Deletes current contents of buffer, and inserts text instead. If len is -1, text must be nul-terminated. text must be valid UTF-8.

buffer  a <gtk-text-buffer>

text UTF-8 text to insert

len length of text in bytes

[Function] gtk-text-buffer-get-text (self <gtk-text-buffer>)
   (start <gtk-text-iter>) (end <gtk-text-iter>)

(include hidden chars bool) ⇒ (ret mchars)

[Method] get-text

Returns the text in the range [start,end). Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include-hidden-chars is ‘#f’. Does not include 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 with gtk-text-buffer-get-slice.
buffer  a <gtk-text-buffer>

start start of a range

end end of a range

include-hidden-chars whether to include invisible text

ret an allocated UTF-8 string

[Function] gtk-text-buffer-get-slice (self <gtk-text-buffer>)
   (start <gtk-text-iter>) (end <gtk-text-iter>)

(include hidden chars bool) ⇒ (ret mchars)

[Method] get-slice

Returns the text in the range [start,end). Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include-hidden-chars is ‘#f’. The returned string includes a 0xFFFC character whenever the buffer contains embedded images, so byte and character indexes into the returned string do correspond to byte and character indexes into the buffer. Contrast with gtk-text-buffer-get-text. 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.

buffer  a <gtk-text-buffer>

start start of a range

end end of a range

include-hidden-chars whether to include invisible text

ret an allocated UTF-8 string

[Function] gtk-text-buffer-insert-pixbuf (self <gtk-text-buffer>)
   (iter <gtk-text-iter>) (pixbuf <gdk-pixbuf>)
[Method] insert-pixbuf

Inserts an image into the text buffer at 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 gtk-text-buffer-get-slice

and gtk-text-buffer-get-text.

buffer  a <gtk-text-buffer>

iter location to insert the pixbuf

pixbuf  a <gdk-pixbuf>
[Function] gtk-text-buffer-insert-child-anchor (self <gtk-text-buffer>)
   (iter <gtk-text-iter>) (anchor <gtk-text-child-anchor>)
[Method] insert-child-anchor

Inserts a child widget anchor into the text buffer at 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 gtk-text-

buffer-get-slice and gtk-text-buffer-get-text. Consider gtk-text-buffer-

create-child-anchor as a more convenient alternative to this function. The buffer will add a reference to the anchor, so you can unref it after insertion.

buffer  a <gtk-text-buffer>

iter location to insert the anchor

anchor  a <gtk-text-child-anchor>
[Function] gtk-text-buffer-create-child-anchor (self <gtk-text-buffer>)
   (iter <gtk-text-iter>) ⇒ (ret <gtk-text-child-anchor>)
[Method] create-child-anchor

This is a convenience function which simply creates a child anchor with gtk-text-

child-anchor-new and inserts it into the buffer with gtk-text-buffer-insert-

child-anchor. The new anchor is owned by the buffer; no reference count is returned

to the caller of gtk-text-buffer-create-child-anchor.
buffer  a <gtk-text-buffer>

iter location in the buffer

ret the created child anchor

[Function] gtk-text-buffer-create-mark (self <gtk-text-buffer>)

(mark name mchars) (where <gtk-text-iter>) (left gravity bool)

   ⇒ (ret <gtk-text-mark>)
[Method] create-mark

Creates a mark at position where. If mark-name is ‘#f’, the mark is anonymous; otherwise, the mark can be retrieved by name using gtk-text-buffer-get-mark. 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 = ‘#f’), 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). The caller of this function does not own a reference to the returned <gtk-text-mark>, so you can ignore the return value if you like. Marks are owned by the buffer and go away when the buffer does. Emits the "mark set" signal as notification of the mark’s initial placement.

buffer  a <gtk-text-buffer>

mark-name name for mark, or ‘#f’

where location to place mark

left-gravity whether the mark has left gravity

ret  the new <gtk-text-mark> object
[Function] gtk-text-buffer-move-mark (self <gtk-text-buffer>)
   (mark <gtk-text-mark>) (where <gtk-text-iter>)
[Method] move-mark

Moves mark to the new location where. Emits the "mark set" signal as notification of the move.

buffer  a <gtk-text-buffer>
mark  a <gtk-text-mark>

where new location for mark in buffer

[Function] gtk-text-buffer-move-mark-by-name (self <gtk-text-buffer>)
   (name mchars) (where <gtk-text-iter>)
[Method] move-mark-by-name

Moves the mark named name (which must exist) to location where. See gtk-text-

buffer-move-mark for details.
buffer  a <gtk-text-buffer>

name name of a mark

where new location for mark

[Function] gtk-text-buffer-delete-mark (self <gtk-text-buffer>)
   (mark <gtk-text-mark>)
[Method] delete-mark

Deletes mark, so that it’s no longer located anywhere in the buffer. Removes the reference the buffer holds to the mark, so if you haven’t called g-object-ref on the mark, it will be freed. Even if the mark isn’t freed, most operations on mark become invalid. There is no way to undelete a mark. gtk-text-mark-get-deleted will return TRUE after this function has been called on a mark; gtk-text-mark-get-deleted indicates that a mark no longer belongs to a buffer. The "mark deleted" signal will be emitted as notification after the mark is deleted.

buffer  a <gtk-text-buffer>
mark  a <gtk-text-mark> in buffer
[Function] gtk-text-buffer-delete-mark-by-name (self <gtk-text-buffer>)
   (name mchars)
[Method] delete-mark-by-name

Deletes the mark named name; the mark must exist. See gtk-text-buffer-delete-mark for details.

buffer  a <gtk-text-buffer>

name name of a mark in buffer

[Function] gtk-text-buffer-get-mark (self <gtk-text-buffer>)
   (name mchars) ⇒ (ret <gtk-text-mark>)
[Method] get-mark

Returns the mark named name in buffer buffer, or NULL if no such mark exists in the buffer.

buffer  a <gtk-text-buffer>

name a mark name

ret  a <gtk-text-mark>, or NULL
[Function] gtk-text-buffer-get-insert (self <gtk-text-buffer>)
   ⇒ (ret <gtk-text-mark>)
[Method] get-insert

Returns the mark that represents the cursor (insertion point). Equivalent to calling gtk-text-buffer-get-mark to get the mark named "insert", but very slightly more efficient, and involves less typing.

buffer  a <gtk-text-buffer>

ret insertion point mark

[Function] gtk-text-buffer-get-selection-bound (self <gtk-text-buffer>)
   ⇒ (ret <gtk-text-mark>)
[Method] get-selection-bound

Returns the mark that represents the selection bound. Equivalent to calling gtktext-buffer-get-mark to get the mark named "selection bound", but very slightly more efficient, and involves less typing. The currently-selected text in buffer 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. gtk-text-buffer-get-selection-bounds is another

convenient function for handling the selection, if you just want to know whether there’s a selection and what its bounds are.

buffer  a <gtk-text-buffer>

ret selection bound mark

[Function] gtk-text-buffer-get-has-selection (self <gtk-text-buffer>)

⇒ (ret bool)

[Method] get-has-selection

Indicates whether the buffer has some text currently selected.

buffer  a <gtk-text-buffer>

ret ‘#t’ if the there is text selected

[Function] gtk-text-buffer-place-cursor (self <gtk-text-buffer>)
   (where <gtk-text-iter>)
[Method] place-cursor

This function moves the "insert" and "selection bound" marks simultaneously. If you move them to the same place in two steps with gtk-text-buffer-move-mark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.

buffer  a <gtk-text-buffer>

where where to put the cursor

[Function] gtk-text-buffer-select-range (self <gtk-text-buffer>)
   (ins <gtk-text-iter>) (bound <gtk-text-iter>)
[Method] select-range

This function moves the "insert" and "selection bound" marks simultaneously. If you move them in two steps with gtk-text-buffer-move-mark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.

buffer  a <gtk-text-buffer>

ins where to put the "insert" mark

bound where to put the "selection bound" mark

Since 2.4

[Function] gtk-text-buffer-apply-tag (self <gtk-text-buffer>)
   (tag <gtk-text-tag>) (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] apply-tag

Emits the "apply tag" signal on buffer. The default handler for the signal applies tag to the given range. start and end do not have to be in order.

buffer  a <gtk-text-buffer>
tag  a <gtk-text-tag>

start one bound of range to be tagged

end other bound of range to be tagged

[Function] gtk-text-buffer-remove-tag (self <gtk-text-buffer>)
   (tag <gtk-text-tag>) (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] remove-tag

Emits the "remove tag" signal. The default handler for the signal removes all occurrences of tag from the given range. start and end don’t have to be in order.

buffer  a <gtk-text-buffer>
tag  a <gtk-text-tag>

start one bound of range to be untagged

end other bound of range to be untagged

[Function] gtk-text-buffer-apply-tag-by-name (self <gtk-text-buffer>)
   (name mchars) (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] apply-tag-by-name
Calls gtk-text-tag-table-lookup on the buffer’s tag table to get a <gtk-text-
tag>, then calls gtk-text-buffer-apply-tag.
buffer  a <gtk-text-buffer>

name name of a named <gtk-text-tag>

start one bound of range to be tagged

end other bound of range to be tagged

[Function] gtk-text-buffer-remove-tag-by-name (self <gtk-text-buffer>)
   (name mchars) (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] remove-tag-by-name
Calls gtk-text-tag-table-lookup on the buffer’s tag table to get a <gtk-text-
tag>, then calls gtk-text-buffer-remove-tag.
buffer  a <gtk-text-buffer>
name  name of a <gtk-text-tag>

start one bound of range to be untagged

end other bound of range to be untagged

[Function] gtk-text-buffer-remove-all-tags (self <gtk-text-buffer>)
   (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] remove-all-tags

Removes all tags 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.

buffer  a <gtk-text-buffer>

start one bound of range to be untagged

end other bound of range to be untagged

[Function] gtk-text-buffer-get-iter-at-offset (self <gtk-text-buffer>)
   (char offset int) ⇒ (ret <gtk-text-iter>)
[Method] get-iter-at-offset

Initializes iter to a position char-offset chars from the start of the entire buffer. If char-offset is -1 or greater than the number of characters in the buffer, iter is initialized to the end iterator, the iterator one past the last valid character in the buffer.

buffer  a <gtk-text-buffer>

iter iterator to initialize

char-offset char offset from start of buffer, counting from 0, or -1

[Function] gtk-text-buffer-get-iter-at-line (self <gtk-text-buffer>)
   (line number int) ⇒ (ret <gtk-text-iter>)
[Method] get-iter-at-line

Initializes iter to the start of the given line.

buffer  a <gtk-text-buffer>

iter iterator to initialize

line-number line number counting from 0

[Function] gtk-text-buffer-get-iter-at-mark (self <gtk-text-buffer>)
   (mark <gtk-text-mark>) ⇒ (ret <gtk-text-iter>)
[Method] get-iter-at-mark

Initializes iter with the current position of mark.

buffer  a <gtk-text-buffer>

iter iterator to initialize

mark  a <gtk-text-mark> in buffer
[Function] gtk-text-buffer-get-start-iter (self <gtk-text-buffer>)
   ⇒ (ret <gtk-text-iter>)
[Method] get-start-iter

Initialized iter with the first position in the text buffer. This is the same as using

gtk-text-buffer-get-iter-at-offset to get the iter at character offset 0.
buffer  a <gtk-text-buffer>

iter iterator to initialize

[Function] gtk-text-buffer-get-end-iter (self <gtk-text-buffer>)
   ⇒ (ret <gtk-text-iter>)
[Method] get-end-iter

Initializes iter with the "end iterator," one past the last valid character in the text buffer. If dereferenced with gtk-text-iter-get-char, the end iterator has a character value of 0. The entire buffer lies in the range from the first position in the buffer (call gtk-text-buffer-get-start-iter to get character position 0) to the end iterator.

buffer  a <gtk-text-buffer>

iter iterator to initialize

[Function] gtk-text-buffer-get-bounds (self <gtk-text-buffer>)
   ⇒ (start <gtk-text-iter>) (end <gtk-text-iter>)
[Method] get-bounds
[Method] get-bounds

Retrieves the first and last iterators in the buffer, i.e. the entire buffer lies within the range [start,end).

buffer  a <gtk-text-buffer>

start iterator to initialize with first position in the buffer

end iterator to initialize with the end iterator

[Function] gtk-text-buffer-get-modified (self <gtk-text-buffer>)

⇒ (ret bool)

[Method] get-modified

Indicates whether the buffer has been modified since the last call to gtk-text-buffer-set-modified set the modification flag to ‘#f’. Used for example to enable a "save" function in a text editor.

buffer  a <gtk-text-buffer>

ret ‘#t’ if the buffer has been modified

[Function] gtk-text-buffer-set-modified (self <gtk-text-buffer>)

(setting bool)

[Method] set-modified

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 gtk text buffer set modified (buffer, FALSE). When the buffer is modified, it will automatically toggled on the modified bit again. When the modified bit flips, the buffer emits a "modified changed" signal.

buffer  a <gtk-text-buffer>

setting modification flag setting

[Function] gtk-text-buffer-delete-selection (self <gtk-text-buffer>)

(interactive bool) (default editable bool) ⇒ (ret bool)

[Method] delete-selection

Deletes the range between the "insert" and "selection bound" marks, that is, the currently-selected text. If interactive is ‘#t’, the editability of the selection will be considered (users can’t delete uneditable text).

buffer  a <gtk-text-buffer>

interactive whether the deletion is caused by user interaction

default-editable whether the buffer is editable by default

ret whether there was a non-empty selection to delete

[Function] gtk-text-buffer-paste-clipboard (self <gtk-text-buffer>)
   (clipboard <gtk-clipboard>) (override location <gtk-text-iter>)

(default editable bool)

[Method] paste-clipboard

Pastes the contents of a clipboard at the insertion point, or at override-location. (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.)

buffer  a <gtk-text-buffer>

clipboard the <gtk-clipboard> to paste from

override-location location to insert pasted text, or ‘#f’ for at the cursor

default-editable whether the buffer is editable by default

[Function] gtk-text-buffer-copy-clipboard (self <gtk-text-buffer>)
   (clipboard <gtk-clipboard>)
[Method] copy-clipboard

Copies the currently-selected text to a clipboard.

buffer  a <gtk-text-buffer>

clipboard the <gtk-clipboard> object to copy to.

[Function] gtk-text-buffer-cut-clipboard (self <gtk-text-buffer>)

(clipboard <gtk-clipboard>) (default editable bool)

[Method] cut-clipboard

Copies the currently-selected text to a clipboard, then deletes said text if it’s editable.

buffer  a <gtk-text-buffer>

clipboard the <gtk-clipboard> object to cut to.

default-editable default editability of the buffer

[Function] gtk-text-buffer-begin-user-action (self <gtk-text-buffer>)
[Method] begin-user-action

Called to indicate that the buffer operations between here and a call to gtk-text-buffer-end-user-action are part of a single user-visible operation. The operations

between gtk-text-buffer-begin-user-action and gtk-text-buffer-end-user-

action can then be grouped when creating an undo stack. <gtk-text-buffer> maintains a count of calls to gtk-text-buffer-begin-user-action that have not been closed with a call to gtk-text-buffer-end-user-action, and emits the "begin user action" and "end user action" signals only for the outermost pair of calls. This allows you to build user actions from other user actions. The "interactive" buffer mutation functions, such as gtk-text-buffer-insert-interactive, automatically call begin/end user action around the buffer 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 functions.

buffer  a <gtk-text-buffer>
[Function] gtk-text-buffer-end-user-action (self <gtk-text-buffer>)
[Method] end-user-action
Should be paired with a call to gtk-text-buffer-begin-user-action. See that

function for a full explanation.

buffer  a <gtk-text-buffer>

29 GtkTextTag

A tag that can be applied to text in a

29.1 Overview

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

Tags should be in the <gtk-text-tag-table> for a given <gtk-text-buffer> before

using them with that buffer.

gtk-text-buffer-create-tag is the best way to create tags. See for numerous examples.

The "invisible" property was not implemented for GTK+ 2.0; it’s planned to be implemented in future releases.

29.2 Usage

[Class] <gtk-text-tag>

Derives from <gobject>. This class defines the following slots:

name Name used to refer to the text tag. NULL for anonymous tags

background

Background color as a string

foreground

Foreground color as a string

background-gdk

Background color as a (possibly unallocated) GdkColor

foreground-gdk

Foreground color as a (possibly unallocated) GdkColor

background-stipple

Bitmap to use as a mask when drawing the text background

foreground-stipple

Bitmap to use as a mask when drawing the text foreground

font Font description as a string, e.g. "Sans Italic 12"

font-desc

Font description as a PangoFontDescription struct

family Name of the font family, e.g. Sans, Helvetica, Times, Monospace

style Font style as a PangoStyle, e.g. PANGO STYLE ITALIC

variant Font variant as a PangoVariant, e.g. PANGO VARIANT SMALL CAPS weight Font weight as an integer, see predefined values in PangoWeight; for

example, PANGO WEIGHT BOLD

stretch Font stretch as a PangoStretch, e.g. PANGO STRETCH CONDENSED

size Font size in Pango units

size-points

Font size in points

scale 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 X LARGE

pixels-above-lines

Pixels of blank space above paragraphs

pixels-below-lines

Pixels of blank space below paragraphs

pixels-inside-wrap

Pixels of blank space between wrapped lines in a paragraph

editable Whether the text can be modified by the user

wrap-mode

Whether to wrap lines never, at word boundaries, or at character boundaries

justification

Left, right, or center justification

direction

Text direction, e.g. right-to-left or left-to-right

left-margin

Width of the left margin in pixels

indent Amount to indent the paragraph, in pixels

strikethrough

Whether to strike through the text

right-margin

Width of the right margin in pixels

underline

Style of underline for this text

rise Offset of text above the baseline (below the baseline if rise is negative) in Pango units

background-full-height

Whether the background color fills the entire line height or only the height of the tagged characters

language The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used. tabs Custom tabs for this text

invisible

Whether this text is hidden.

paragraph-background

Paragraph background color as a string

paragraph-background-gdk

Paragraph background color as a (possibly unallocated) GdkColor

accumulative-margin

Whether left and right margins accumulate.

background-set

Whether this tag affects the background color

foreground-set

Whether this tag affects the foreground color

background-stipple-set

Whether this tag affects the background stipple

foreground-stipple-set

Whether this tag affects the foreground stipple

family-set

Whether this tag affects the font family

style-set

Whether this tag affects the font style

variant-set

Whether this tag affects the font variant

weight-set

Whether this tag affects the font weight

stretch-set

Whether this tag affects the font stretch

size-set Whether this tag affects the font size

scale-set

Whether this tag scales the font size by a factor

pixels-above-lines-set

Whether this tag affects the number of pixels above lines

pixels-below-lines-set

Whether this tag affects the number of pixels above lines

pixels-inside-wrap-set

Whether this tag affects the number of pixels between wrapped lines

editable-set

Whether this tag affects text editability

wrap-mode-set

Whether this tag affects line wrap mode

justification-set

Whether this tag affects paragraph justification

left-margin-set

Whether this tag affects the left margin

indent-set

Whether this tag affects indentation

strikethrough-set

Whether this tag affects strikethrough

right-margin-set

Whether this tag affects the right margin

underline-set

Whether this tag affects underlining

rise-set Whether this tag affects the rise

background-full-height-set

Whether this tag affects background height

language-set

Whether this tag affects the language the text is rendered as

tabs-set Whether this tag affects tabs

invisible-set

Whether this tag affects text visibility

paragraph-background-set

Whether this tag affects the paragraph background color

[Signal on <gtk-text-tag>] event (arg0 <gobject>) (arg1 <gdk-event>)
   (arg2 <gtk-text-iter>) ⇒ <gboolean>
[Class] <gtk-text-attributes>

Derives from <gboxed>. This class defines no direct slots.

[Function] gtk-text-tag-new (name mchars) ⇒ (ret <gtk-text-tag>)

Creates a <gtk-text-tag>. Configure the tag using object arguments, i.e. using

g-object-set.

name tag name, or ‘#f’

ret  a new <gtk-text-tag>
[Function] gtk-text-tag-get-priority (self <gtk-text-tag>) ⇒ (ret int)
[Method] get-priority

Get the tag priority.

tag  a <gtk-text-tag>

ret The tag’s priority.

[Function] gtk-text-tag-set-priority (self <gtk-text-tag>) (priority int)
[Method] set-priority

Sets the priority of a <gtk-text-tag>. Valid priorities are start at 0 and go to one less than gtk-text-tag-table-get-size. Each tag in a table has a unique priority; setting the priority of one tag shifts the priorities of all the other tags in the table to maintain a unique priority for each tag. Higher priority tags "win" if two tags both set the same text attribute. When adding a tag to a tag table, it will be assigned the highest priority in the table by default; so normally the precedence of a set of tags is the order in which they were added to the table, or created with gtk-text-buffer-create-tag, which adds the tag to the buffer’s table automatically.

tag  a <gtk-text-tag>

priority the new priority

[Function] gtk-text-tag-event (self <gtk-text-tag>) (event object <gobject>)
   (event <gdk-event>) (iter <gtk-text-iter>) ⇒ (ret bool)

[Method] event

Emits the "event" signal on the <gtk-text-tag>.

tag  a <gtk-text-tag>

event-object object that received the event, such as a widget

event the event

iter location where the event was received

ret result of signal emission (whether the event was handled)

[Function] gtk-text-attributes-new ⇒ (ret <gtk-text-attributes>)

Creates a <gtk-text-attributes>, which describes a set of properties on some text.

ret  a new <gtk-text-attributes>
[Function] gtk-text-attributes-copy (self <gtk-text-attributes>)
   ⇒ (ret <gtk-text-attributes>)

Copies src and returns a new <gtk-text-attributes>.

src  a <gtk-text-attributes> to be copied

ret a copy of src

[Function] gtk-text-attributes-copy-values (self <gtk-text-attributes>)
   (dest <gtk-text-attributes>)

Copies the values from src to dest so that dest has the same values as src. Frees existing values in dest.

src  a <gtk-text-attributes>
dest  another <gtk-text-attributes>

30 GtkTextTagTable

Collection of tags that can be used together

30.1 Overview

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

30.2 Usage

[Class] <gtk-text-tag-table>

Derives from <gobject>. This class defines no direct slots.

[Signal on <gtk-text-tag-table>] tag-changed (arg0 <gtk-text-tag>)
   (arg1 <gboolean>)
[Signal on <gtk-text-tag-table>] tag-added (arg0 <gtk-text-tag>)
[Signal on <gtk-text-tag-table>] tag-removed (arg0 <gtk-text-tag>)
[Function] gtk-text-tag-table-new ⇒ (ret <gtk-text-tag-table>)

Creates a new <gtk-text-tag-table>. The table contains no tags by default.

ret  a new <gtk-text-tag-table>
[Function] gtk-text-tag-table-add (self <gtk-text-tag-table>)
   (tag <gtk-text-tag>)

[Method] add

Add a tag to the table. The tag is assigned the highest priority in the table. tag must not be in a tag table already, and may not have the same name as an already-added tag.

table  a <gtk-text-tag-table>
tag  a <gtk-text-tag>
[Function] gtk-text-tag-table-remove (self <gtk-text-tag-table>)
   (tag <gtk-text-tag>)

[Method] remove

Remove a tag from the table. This will remove the table’s reference to the tag, so be careful - the tag will end up destroyed if you don’t have a reference to it.

table  a <gtk-text-tag-table>
tag  a <gtk-text-tag>
[Function] gtk-text-tag-table-lookup (self <gtk-text-tag-table>)
   (name mchars) ⇒ (ret <gtk-text-tag>)

[Method] lookup

Look up a named tag.

table  a <gtk-text-tag-table>

name name of a tag ret The tag, or ‘#f’ if none by that name is in the table.

[Function] gtk-text-tag-table-get-size (self <gtk-text-tag-table>)

⇒ (ret int)

[Method] get-size

Returns the size of the table (number of tags)

table  a <gtk-text-tag-table>

ret number of tags in table

31 GtkTextView

Widget that displays a

31.1 Overview

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together.

31.2 Usage

[Class] <gtk-text-view>
Derives from <gtk-container>.

This class defines the following slots:

pixels-above-lines

Pixels of blank space above paragraphs

pixels-below-lines

Pixels of blank space below paragraphs

pixels-inside-wrap

Pixels of blank space between wrapped lines in a paragraph

editable Whether the text can be modified by the user

wrap-mode

Whether to wrap lines never, at word boundaries, or at character boundaries

justification

Left, right, or center justification

left-margin

Width of the left margin in pixels

right-margin

Width of the right margin in pixels

indent Amount to indent the paragraph, in pixels

tabs Custom tabs for this text

cursor-visible

If the insertion cursor is shown

buffer The buffer which is displayed

overwrite

Whether entered text overwrites existing contents

accepts-tab

Whether Tab will result in a tab character being entered

[Signal on <gtk-text-view>] move-cursor (arg0 <gtk-movement-step>)
        (arg1 <gint>) (arg2 <gboolean>)

The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement. Applications should not connect to it, but may emit it with g-signal-emit-by-name if they need to control scrolling programmatically.

[Signal on <gtk-text-view>] copy-clipboard
[Signal on <gtk-text-view>] populate-popup (arg0 <gtk-menu>)
[Signal on <gtk-text-view>] insert-at-cursor (arg0 <gchararray>)
[Signal on <gtk-text-view>] delete-from-cursor (arg0 <gtk-delete-type>)
        (arg1 <gint>)
[Signal on <gtk-text-view>] backspace
[Signal on <gtk-text-view>] cut-clipboard
[Signal on <gtk-text-view>] paste-clipboard
[Signal on <gtk-text-view>] toggle-overwrite
[Signal on <gtk-text-view>] set-scroll-adjustments
        (arg0 <gtk-adjustment>) (arg1 <gtk-adjustment>)
[Signal on <gtk-text-view>] select-all (arg0 <gboolean>)
[Signal on <gtk-text-view>] page-horizontally (arg0 <gint>)
        (arg1 <gboolean>)
[Signal on <gtk-text-view>] move-viewport (arg0 <gtk-scroll-step>)
        (arg1 <gint>)
[Signal on <gtk-text-view>] set-anchor
[Signal on <gtk-text-view>] toggle-cursor-visible

undocumented

[Class] <gtk-text-child-anchor>

Derives from <gobject>.

This class defines no direct slots.

[Function] gtk-text-view-new-with-buffer (buffer <gtk-text-buffer>)
        ⇒ (ret <gtk-widget>)

Creates a new <gtk-text-view> widget displaying the buffer buffer. One buffer can be shared among many widgets. buffer may be NULL to create a default buffer, in which case this function is equivalent to gtk-text-view-new. The text view adds its own reference count to the buffer; it does not take over an existing reference.

     buffer  a <gtk-text-buffer>
     ret  a new <gtk-text-view>.

[Function] gtk-text-view-set-buffer (self <gtk-text-view>)
   (buffer <gtk-text-buffer>)
[Method] set-buffer

Sets buffer as the buffer being displayed by text-view. The previous buffer displayed by the text view is unreferenced, and a reference is added to buffer. If you owned a reference to buffer before passing it to this function, you must remove that reference yourself; <gtk-text-view> will not "adopt" it.

text-view a <gtk-text-view>
buffer  a <gtk-text-buffer>
[Function] gtk-text-view-get-buffer (self <gtk-text-view>)
   ⇒ (ret <gtk-text-buffer>)
[Method] get-buffer

Returns the <gtk-text-buffer> being displayed by this text view. The reference count on the buffer is not incremented; the caller of this function won’t own a new reference.

text-view a <gtk-text-view>
ret  a <gtk-text-buffer>
[Function] gtk-text-view-scroll-to-mark (self <gtk-text-view>)

(mark <gtk-text-mark>) (within margin double) (use align bool)

(xalign double) (yalign double)

[Method] scroll-to-mark

Scrolls text-view so that mark is on the screen in the position indicated by xalign and yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If use-align is ‘#f’, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size within-margin.

text-view a <gtk-text-view>
mark  a <gtk-text-mark>

within-margin margin as a [0.0,0.5) fraction of screen size

use-align whether to use alignment arguments (if ‘#f’, just get the mark onscreen)

xalign horizontal alignment of mark within visible area.

yalign vertical alignment of mark within visible area

[Function] gtk-text-view-scroll-to-iter (self <gtk-text-view>)

(iter <gtk-text-iter>) (within margin double) (use align bool)

(xalign double) (yalign double) ⇒ (ret bool)

[Method] scroll-to-iter

Scrolls text-view so that iter is on the screen in the position indicated by xalign and yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If use-align is ‘#f’, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size within-margin. NOTE: This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed in an idle handler; so this function may not have the desired effect if it’s called before the height computations. To avoid oddness, consider using gtk-text-view-scroll-to-mark which saves a point to be scrolled to after line validation.

text-view a <gtk-text-view>
iter  a <gtk-text-iter>

within-margin margin as a [0.0,0.5) fraction of screen size

use-align whether to use alignment arguments (if ‘#f’, just get the mark onscreen)

xalign horizontal alignment of mark within visible area.

yalign vertical alignment of mark within visible area

ret ‘#t’ if scrolling occurred

[Function] gtk-text-view-scroll-mark-onscreen (self <gtk-text-view>)
   (mark <gtk-text-mark>)
[Method] scroll-mark-onscreen

Scrolls text-view the minimum distance such that mark is contained within the visible area of the widget.

text-view a <gtk-text-view>

mark a mark in the buffer for text-view

[Function] gtk-text-view-move-mark-onscreen (self <gtk-text-view>)
   (mark <gtk-text-mark>) ⇒ (ret bool)
[Method] move-mark-onscreen

Moves a mark within the buffer so that it’s located within the currently-visible text area.

text-view a <gtk-text-view>
mark  a <gtk-text-mark>

ret ‘#t’ if the mark moved (wasn’t already onscreen)

[Function] gtk-text-view-place-cursor-onscreen (self <gtk-text-view>)

⇒ (ret bool)

[Method] place-cursor-onscreen

Moves the cursor to the currently visible region of the buffer, it it isn’t there already.

text-view a <gtk-text-view>

ret TRUE if the cursor had to be moved.

[Function] gtk-text-view-get-visible-rect (self <gtk-text-view>)
   (visible rect <gdk-rectangle>)
[Method] get-visible-rect

Fills visible-rect with the currently-visible region of the buffer, in buffer coordinates.

Convert to window coordinates with gtk-text-view-buffer-to-window-coords.

text-view a <gtk-text-view>

visible-rect rectangle to fill

[Function] gtk-text-view-get-iter-location (self <gtk-text-view>)
   (iter <gtk-text-iter>) (location <gdk-rectangle>)
[Method] get-iter-location

Gets a rectangle which roughly contains the character at iter. The rectangle position

is in buffer coordinates; use gtk-text-view-buffer-to-window-coords to convert

these coordinates to coordinates for one of the windows in the text view.

text-view a <gtk-text-view>
iter  a <gtk-text-iter>

location bounds of the character at iter

[Function] gtk-text-view-get-line-at-y (self <gtk-text-view>)

(target iter <gtk-text-iter>) (y int) ⇒ (line top int)

[Method] get-line-at-y

Gets the <gtk-text-iter> at the start of the line containing the coordinate y. y is in buffer coordinates, convert from window coordinates with gtk-text-view-window-to-buffer-coords. If non-‘#f’, line-top will be filled with the coordinate of the top edge of the line.

text-view a <gtk-text-view>
target-iter a <gtk-text-iter>

y a y coordinate

line-top return location for top coordinate of the line

[Function] gtk-text-view-get-line-yrange (self <gtk-text-view>)
   (iter <gtk-text-iter>) ⇒ (y int) (height int)
[Method] get-line-yrange

Gets the y coordinate of the top of the line containing iter, and the height of the line. The coordinate is a buffer coordinate; convert to window coordinates with gtk-text-

view-buffer-to-window-coords.
text-view a <gtk-text-view>
iter  a <gtk-text-iter>

y return location for a y coordinate

height return location for a height

[Function] gtk-text-view-get-iter-at-location (self <gtk-text-view>)
   (iter <gtk-text-iter>) (x int) (y int)
[Method] get-iter-at-location

Retrieves the iterator at buffer coordinates x and y. Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with gtk-text-view-

window-to-buffer-coords.

text-view a <gtk-text-view>
iter  a <gtk-text-iter>

x x position, in buffer coordinates

y y position, in buffer coordinates

[Function] gtk-text-view-get-window (self <gtk-text-view>)
   (win <gtk-text-window-type>) ⇒ (ret <gdk-window>)
[Method] get-window

Retrieves the <gdk-window> corresponding to an area of the text view; possible windows include the overall widget window, child windows on the left, right, top, bottom, and the window that displays the text buffer. Windows are ‘#f’ and nonexistent if their width or height is 0, and are nonexistent before the widget has been realized.

text-view a <gtk-text-view>

win window to get

ret  a <gdk-window>, or ‘#f’
[Function] gtk-text-view-get-window-type (self <gtk-text-view>)
   (window <gdk-window>) ⇒ (ret <gtk-text-window-type>)
[Method] get-window-type

Usually used to find out which window an event corresponds to. If you connect to an event signal on text-view, this function should be called on ‘event->window’ to see which window it was.

text-view a <gtk-text-view>

window a window type

ret the window type.

[Function] gtk-text-view-forward-display-line (self <gtk-text-view>)
   (iter <gtk-text-iter>) ⇒ (ret bool)
[Method] forward-display-line

Moves the given iter forward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the <gtk-text-buffer>.

text-view a <gtk-text-view>
iter  a <gtk-text-iter>

ret ‘#t’ if iter was moved and is not on the end iterator

[Function] gtk-text-view-backward-display-line (self <gtk-text-view>)
   (iter <gtk-text-iter>) ⇒ (ret bool)
[Method] backward-display-line

Moves the given iter backward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the <gtk-text-

buffer>.
text-view a <gtk-text-view>
iter  a <gtk-text-iter>

ret ‘#t’ if iter was moved and is not on the end iterator

[Function] gtk-text-view-starts-display-line (self <gtk-text-view>)
   (iter <gtk-text-iter>) ⇒ (ret bool)
[Method] starts-display-line

Determines whether iter is at the start of a display line. See gtk-text-view-forward-display-line for an explanation of display lines vs. paragraphs.

text-view a <gtk-text-view>
iter  a <gtk-text-iter>

ret ‘#t’ if iter begins a wrapped line

[Function] gtk-text-view-move-visually (self <gtk-text-view>)
   (iter <gtk-text-iter>) (count int) ⇒ (ret bool)
[Method] move-visually

Move the iterator a given number of characters visually, treating it as the strong cursor position. If count is positive, then the new strong cursor position will be count positions to the right of the old cursor position. If count is negative then the new strong cursor position will be count positions to the left of the old cursor position. In the presence of bidirection 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.

text-view a <gtk-text-view>
iter  a <gtk-text-iter>

count number of characters to move (negative moves left, positive moves right)

ret ‘#t’ if iter moved and is not on the end iterator

[Function] gtk-text-view-add-child-at-anchor (self <gtk-text-view>)
   (child <gtk-widget>) (anchor <gtk-text-child-anchor>)
[Method] add-child-at-anchor

Adds a child widget in the text buffer, at the given anchor.

text-view a <gtk-text-view>
child  a <gtk-widget>
anchor  a <gtk-text-child-anchor> in the <gtk-text-buffer> for text-view

[Function] gtk-text-child-anchor-new ⇒ (ret <gtk-text-child-anchor>)

Creates a new <gtk-text-child-anchor>. Usually you would then insert it into a

<gtk-text-buffer> with gtk-text-buffer-insert-child-anchor. To perform the

creation and insertion in one step, use the convenience function gtk-text-buffer-

create-child-anchor.
ret  a new <gtk-text-child-anchor>
[Function] gtk-text-child-anchor-get-widgets
   (self <gtk-text-child-anchor>) ⇒ (ret glist-of)
[Method] get-widgets

Gets a list of all widgets anchored at this child anchor. The returned list should be

freed with g-list-free.
anchor  a <gtk-text-child-anchor>

ret list of widgets anchored at anchor

[Function] gtk-text-child-anchor-get-deleted
   (self <gtk-text-child-anchor>) ⇒ (ret bool)
[Method] get-deleted

Determines whether a child anchor has been deleted from the buffer. Keep in mind that the child anchor will be unreferenced when removed from the buffer, so you need to hold your own reference (with g-object-ref) if you plan to use this function &#x2014; otherwise all deleted child anchors will also be finalized.

anchor  a <gtk-text-child-anchor>

ret ‘#t’ if the child anchor has been deleted from its buffer

[Function] gtk-text-view-add-child-in-window (self <gtk-text-view>)
   (child <gtk-widget>) (which window <gtk-text-window-type>)

(xpos int) (ypos int)

[Method] add-child-in-window

Adds a child at fixed coordinates in one of the text widget’s windows. The window

must have nonzero size (see gtk-text-view-set-border-window-size). Note that

the child coordinates are given relative to the <gdk-window> in question, and that these coordinates have no sane relationship to scrolling. When placing a child in <gtk-text-window-widget>, scrolling is irrelevant, the child floats above all scrollable areas. But when placing a child in one of the scrollable windows (border windows or text window), you’ll need to compute the child’s correct position in buffer coordinates any time scrolling occurs or buffer changes occur, and then call gtk-text-view-move-child 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. See bug 64518 on bugzilla.gnome.org for status of fixing this issue.

text-view a <gtk-text-view>
child  a <gtk-widget>

which-window which window the child should appear in xpos X position of child in window coordinates

ypos Y position of child in window coordinates

[Function] gtk-text-view-move-child (self <gtk-text-view>)

(child <gtk-widget>) (xpos int) (ypos int)

[Method] move-child
Updates the position of a child, as for gtk-text-view-add-child-in-window.
text-view a <gtk-text-view>

child child widget already added to the text view

xpos new X position in window coordinates

ypos new Y position in window coordinates

[Function] gtk-text-view-set-wrap-mode (self <gtk-text-view>)
   (wrap mode <gtk-wrap-mode>)
[Method] set-wrap-mode

Sets the line wrapping for the view.

text-view a <gtk-text-view>

wrap-mode

          a <gtk-wrap-mode>
[Function] gtk-text-view-get-wrap-mode (self <gtk-text-view>)
   ⇒ (ret <gtk-wrap-mode>)
[Method] get-wrap-mode

Gets the line wrapping for the view.

text-view a <gtk-text-view>

ret the line wrap setting

[Function] gtk-text-view-set-editable (self <gtk-text-view>) (setting bool)
[Method] set-editable

Sets the default editability of the <gtk-text-view>. You can override this default setting with tags in the buffer, using the "editable" attribute of tags.

text-view a <gtk-text-view>

setting whether it’s editable

[Function] gtk-text-view-get-editable (self <gtk-text-view>) ⇒ (ret bool)
[Method] get-editable

Returns the default editability of the <gtk-text-view>. Tags in the buffer may override this setting for some ranges of text.

text-view a <gtk-text-view>

ret whether text is editable by default

[Function] gtk-text-view-set-cursor-visible (self <gtk-text-view>)

(setting bool)

[Method] set-cursor-visible

Toggles whether the insertion point is displayed. A buffer with no editable text probably shouldn’t have a visible cursor, so you may want to turn the cursor off.

text-view a <gtk-text-view>

setting whether to show the insertion cursor

[Function] gtk-text-view-get-cursor-visible (self <gtk-text-view>)

⇒ (ret bool)

[Method] get-cursor-visible

Find out whether the cursor is being displayed.

text-view a <gtk-text-view>

ret whether the insertion mark is visible

[Function] gtk-text-view-set-overwrite (self <gtk-text-view>)

(overwrite bool)

[Method] set-overwrite

Changes the <gtk-text-view> overwrite mode.

text-view a <gtk-text-view>

overwrite ‘#t’ to turn on overwrite mode, ‘#f’ to turn it off

Since 2.4

[Function] gtk-text-view-get-overwrite (self <gtk-text-view>)

⇒ (ret bool)

[Method] get-overwrite

Returns whether the <gtk-text-view> is in overwrite mode or not.

text-view a <gtk-text-view>

ret whether text-view is in overwrite mode or not.

Since 2.4

[Function] gtk-text-view-set-justification (self <gtk-text-view>)
   (justification <gtk-justification>)
[Method] set-justification

Sets the default justification of text in text-view. Tags in the view’s buffer may override the default.

text-view a <gtk-text-view>

justification justification

[Function] gtk-text-view-get-justification (self <gtk-text-view>)
   ⇒ (ret <gtk-justification>)
[Method] get-justification

Gets the default justification of paragraphs in text-view. Tags in the buffer may override the default.

text-view a <gtk-text-view>

ret default justification

[Function] gtk-text-view-set-left-margin (self <gtk-text-view>)

(left margin int)

[Method] set-left-margin

Sets the default left margin for text in text-view. Tags in the buffer may override the default.

text-view a <gtk-text-view>

left-margin left margin in pixels

[Function] gtk-text-view-get-left-margin (self <gtk-text-view>)

⇒ (ret int)

[Method] get-left-margin

Gets the default left margin size of paragraphs in the text-view. Tags in the buffer may override the default.

text-view a <gtk-text-view>

ret left margin in pixels

[Function] gtk-text-view-set-right-margin (self <gtk-text-view>)

(right margin int)

[Method] set-right-margin

Sets the default right margin for text in the text view. Tags in the buffer may override the default.

text-view a <gtk-text-view>

right-margin right margin in pixels

[Function] gtk-text-view-get-right-margin (self <gtk-text-view>)

⇒ (ret int)

[Method] get-right-margin

Gets the default right margin for text in text-view. Tags in the buffer may override the default.

text-view a <gtk-text-view>

ret right margin in pixels

[Function] gtk-text-view-set-indent (self <gtk-text-view>) (indent int)
[Method] set-indent

Sets the default indentation for paragraphs in text-view. Tags in the buffer may override the default.

text-view a <gtk-text-view>

indent indentation in pixels

[Function] gtk-text-view-get-indent (self <gtk-text-view>) ⇒ (ret int)
[Method] get-indent

Gets the default indentation of paragraphs in text-view. Tags in the view’s buffer may override the default. The indentation may be negative.

text-view a <gtk-text-view>

ret number of pixels of indentation

[Function] gtk-text-view-set-tabs (self <gtk-text-view>)
   (tabs <pango-tab-array>)
[Method] set-tabs

Sets the default tab stops for paragraphs in text-view. Tags in the buffer may override the default.

text-view a <gtk-text-view>
tabs  tabs as a <pango-tab-array>
[Function] gtk-text-view-get-tabs (self <gtk-text-view>)
   ⇒ (ret <pango-tab-array>)
[Method] get-tabs

Gets the default tabs for text-view. Tags in the buffer may override the defaults. The returned array will be ‘#f’ if "standard" (8-space) tabs are used. Free the return

value with pango-tab-array-free.
text-view a <gtk-text-view>

ret copy of default tab array, or ‘#f’ if "standard" tabs are used; must be

          freed with pango-tab-array-free.
[Function] gtk-text-view-set-accepts-tab (self <gtk-text-view>)

(accepts tab bool)

[Method] set-accepts-tab

Sets the behavior of the text widget when the Tab key is pressed. If accepts-tab is ‘#t’ a tab character is inserted. If accepts-tab is ‘#f’ the keyboard focus is moved to the next widget in the focus chain.

text-view A <gtk-text-view>

accepts-tab ‘#t’ if pressing the Tab key should insert a tab character, ‘#f’, if pressing the Tab key should move the keyboard focus.

Since 2.4

[Function] gtk-text-view-get-accepts-tab (self <gtk-text-view>)

⇒ (ret bool)

[Method] get-accepts-tab

Returns whether pressing the Tab key inserts a tab characters. gtk-text-view-set-

accepts-tab.
text-view A <gtk-text-view>

Chapter 31: GtkTextView 174

ret ‘#t’ if pressing the Tab key inserts a tab character, ‘#f’ if pressing the

Tab key moves the keyboard focus.

Since 2.4

32 GtkTreeModel

The tree interface used by

32.1 Overview

The <gtk-tree-model> interface defines a generic tree interface for use by the <gtk-tree-view> 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-tree-view> 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 GType system (ie. <g-type-int>, <gtk-type-button>, <g-type-pointer>,

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 &#x2014; the <gtk-tree-store> and the <gtk-list-store>. 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. There are two structures used to reference a particular node in a model. They are the <gtk-tree-path> and the <gtk-tree-iter> Most of the interface consists of operations on a <gtk-tree-iter>.

Here, is short for

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. The <gtk-tree-path> struct 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 refers to the root node and the path refers to the fifth child of the third node.

By contrast, a <gtk-tree-iter> is a reference to a specific node on a specific model. It is a generic struct with an integer and three generic pointers. These are filled in by the model in a model-specific way. One can convert a path to an iterator by calling gtk-tree-model-get-iter. These iterators are the primary way of accessing a model and are similar to the iterators used by <gtk-text-buffer>. They are generally statically allocated on the stack and only used for a short time. The model interface defines a set of operations using them for navigating the model.

It is expected that models fill in the iterator with private data. For example, the <gtklist-store> model, which is internally a simple linked list, stores a list node in one of the pointers. The <gtk-tree-model-sort> 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 iterators with a model.

The lifecycle of an iterator can be a little confusing at first. Iterators 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 iterators and nothing needs to be done to free them from the user’s point of view. Additionally, some models guarantee that an iterator is valid for as long as the node it refers to is valid (most notably the <gtk-tree-store> and <gtk-list-store>). Although generally uninteresting, as one always has to allow for the case where iterators 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.

To help show some common operation of a model, some examples are provided. The first example shows three ways of getting the iter at the location . While the first method shown is easier, the second is much more common, as you often get paths from callbacks.

/* Three ways of getting the iter pointing to the location
*/
{
GtkTreePath *path;
GtkTreeIter iter;
GtkTreeIter parent_iter;
/* get the iterator from a string */
gtk_tree_model_get_iter_from_string (model, &iter, "3:2:5");
/* get the iterator from a path */
path = gtk_tree_path_new_from_string ("3:2:5");
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_path_free (path);

/* walk the tree to find the iterator */
gtk_tree_model_iter_nth_child (model, &iter, NULL, 3);
parent_iter = iter;
gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 2);
parent_iter = iter;
gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 5);
}

This second example shows a quick way of iterating through a list and getting a string and an integer from each row. The populate-model function used below is not shown, as it is specific to the <gtk-list-store>. For information on how to write such a function, see the <gtk-list-store> documentation.

enum
{
STRING_COLUMN,
INT_COLUMN,
N_COLUMNS

};
{
GtkTreeModel *list_store;
GtkTreeIter iter;
gboolean valid;
gint row_count = 0;
/* make a new list_store */
list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
/* Fill the list store with data */
populate_model (list_store);
/* Get the first iter in the list */
valid = gtk_tree_model_get_iter_first (list_store, &iter);
while (valid)
  {
    /* Walk through the list, reading each row */
    gchar *str_data;
    gint   int_data;
    /* Make sure you terminate calls to gtk_tree_model_get()
     * with a '-1' value
     */
    gtk_tree_model_get (list_store, &iter,
                        STRING_COLUMN, &str_data,
                        INT_COLUMN, &int_data,
                        -1);
    /* Do something with the data */
    g_print ("Row %d: (%s,%d)\n", row_count, str_data, int_data);
    g_free (str_data);
    row_count ++;
    valid = gtk_tree_model_iter_next (list_store, &iter);
  }
}

32.2 Usage

[Class] <gtk-tree-model>
Derives from <ginterface>.

This class defines no direct slots.

[Signal on <gtk-tree-model>] row-changed (arg0 <gtk-tree-path>)
   (arg1 <gtk-tree-iter>)

This signal is emitted when a row in the model has changed.

[Signal on <gtk-tree-model>] row-inserted (arg0 <gtk-tree-path>)
   (arg1 <gtk-tree-iter>)

This signal is emitted when a new row has been inserted in the model. Note that the row may still be empty at this point, since it is a common pattern to first insert an empty row, and then fill it with the desired values.

[Signal on <gtk-tree-model>] row-has-child-toggled (arg0 <gtk-tree-path>)
   (arg1 <gtk-tree-iter>)

This signal is emitted when a row has gotten the first child row or lost its last child row.

[Signal on <gtk-tree-model>] row-deleted (arg0 <gtk-tree-path>)

This signal is emitted when a row has been deleted. Note that no iterator is passed to the signal handler, since the row is already deleted. Implementations of GtkTreeModel must emit row-deleted before removing the node from its internal data structures. This is because models and views which access and monitor this model might have references on the node which need to be released in the row-deleted handler.

[Signal on <gtk-tree-model>] rows-reordered (arg0 <gtk-tree-path>)
   (arg1 <gtk-tree-iter>) (arg2 <gpointer>)

This signal is emitted when the children of a node in the <gtk-tree-model> have been reordered. Note that this signal is not emitted when rows are reordered by DND, since this is implemented by removing and then reinserting the row.

[Class] <gtk-tree-iter>

Derives from <gboxed>. This class defines no direct slots.

[Class] <gtk-tree-path>

Derives from <gboxed>. This class defines no direct slots.

[Class] <gtk-tree-row-reference>

Derives from <gboxed>. This class defines no direct slots.

[Function] gtk-tree-path-new-from-string (path mchars) (path mchars)
   ⇒ (ret <gtk-tree-path>)

Creates a new <gtk-tree-path> initialized to path. path is expected to be a colon separated list of numbers. For example, the string "10:4:0" would create a path of depth 3 pointing to the 11th child of the root node, the 5th child of that 11th child, and the 1st child of that 5th child. If an invalid path string is passed in, ‘#f’ is returned. path The string representation of a path.

ret A newly-created <gtk-tree-path>, or ‘#f’

[Function] gtk-tree-path-append-index (self <gtk-tree-path>) (index int)

Appends a new index to a path. As a result, the depth of the path is increased.

path  A <gtk-tree-path>.

index The index.

[Function] gtk-tree-path-prepend-index (self <gtk-tree-path>) (index int)

Prepends a new index to a path. As a result, the depth of the path is increased.

path  A <gtk-tree-path>.

index The index.

[Function] gtk-tree-path-copy (self <gtk-tree-path>)
   ⇒ (ret <gtk-tree-path>)

Creates a new <gtk-tree-path> as a copy of path.

path  A <gtk-tree-path>.
ret  A new <gtk-tree-path>.
[Function] gtk-tree-row-reference-new (model <gtk-tree-model>)
   (path <gtk-tree-path>) ⇒ (ret <gtk-tree-row-reference>)

Creates a row reference based on path. This reference will keep pointing to the node pointed to by path, so long as it exists. It listens to all signals emitted by model, and updates its path appropriately. If path isn’t a valid path in model, then ‘#f’ is returned.

model  A <gtk-tree-model>

path A valid <gtk-tree-path> to monitor

ret  A newly allocated <gtk-tree-row-reference>, or ‘#f’
[Function] gtk-tree-row-reference-new-proxy (proxy <gobject>)
   (model <gtk-tree-model>) (path <gtk-tree-path>)
   ⇒ (ret <gtk-tree-row-reference>)

You do not need to use this function. Creates a row reference based on path. This reference will keep pointing to the node pointed to by path, so long as it exists. If path isn’t a valid path in model, then ‘#f’ is returned. However, unlike references created with gtk-tree-row-reference-new, it does not listen to the model for changes. The creator of the row reference must do this explicitly us-

ing gtk-tree-row-reference-inserted, gtk-tree-row-reference-deleted, gtk-
tree-row-reference-reordered.

These functions must be called exactly once per proxy when the corresponding signal on the model is emitted. This single call updates all row references for that proxy. Since built-in GTK+ objects like <gtk-tree-view> already use this mechanism internally, using them as the proxy object will produce unpredictable results. Further more, passing the same object as model and proxy doesn’t work for reasons of internal implementation. This type of row reference is primarily meant by structures that need to carefully monitor exactly when a row reference updates itself, and is not generally needed by most applications. proxy A proxy <gobject>

model  A <gtk-tree-model>

path A valid <gtk-tree-path> to monitor

ret  A newly allocated <gtk-tree-row-reference>, or ‘#f’
[Function] gtk-tree-row-reference-get-model
   (self <gtk-tree-row-reference>) ⇒ (ret <gtk-tree-model>)

Returns the model that the row reference is monitoring.

reference A <gtk-tree-row-reference>

ret the model Since 2.8

[Function] gtk-tree-row-reference-get-path
   (self <gtk-tree-row-reference>) ⇒ (ret <gtk-tree-path>)

Returns a path that the row reference currently points to, or ‘#f’ if the path pointed to is no longer valid.

reference A <gtk-tree-row-reference>

ret A current path, or ‘#f’.

[Function] gtk-tree-row-reference-valid (self <gtk-tree-row-reference>)

⇒ (ret bool) Returns ‘#t’ if the reference is non-‘#f’ and refers to a current valid path.

reference A <gtk-tree-row-reference>, or ‘#f’

ret ‘#t’ if reference points to a valid path.

[Function] gtk-tree-row-reference-inserted (proxy <gobject>)
   (path <gtk-tree-path>)

Lets a set of row reference created by gtk-tree-row-reference-new-proxy know that the model emitted the "row inserted" signal.

proxy  A <gobject>

path The row position that was inserted

[Function] gtk-tree-row-reference-deleted (proxy <gobject>)
   (path <gtk-tree-path>)

Lets a set of row reference created by gtk-tree-row-reference-new-proxy know that the model emitted the "row deleted" signal.

proxy  A <gobject>

path The path position that was deleted

[Function] gtk-tree-row-reference-reordered (proxy <gobject>)
   (path <gtk-tree-path>) (iter <gtk-tree-iter>) ⇒ (new order int)

Lets a set of row reference created by gtk-tree-row-reference-new-proxy know that the model emitted the "rows reordered" signal.

proxy  A <gobject>

path The parent path of the reordered signal

iter The iter pointing to the parent of the reordered

new-order The new order of rows

[Function] gtk-tree-iter-copy (self <gtk-tree-iter>)
   ⇒ (ret <gtk-tree-iter>)

Creates a dynamically allocated tree iterator as a copy of iter. This function is not intended for use in applications, because you can just copy the structs by value

(‘GtkTreeIter new_iter = iter;’). You must free this iter with gtk-tree-iter-
free.
iter  A <gtk-tree-iter>.

ret a newly-allocated copy of iter.

[Function] gtk-tree-model-get-flags (self <gtk-tree-model>)
   ⇒ (ret <gtk-tree-model-flags>)
[Method] get-flags

Returns a set of flags supported by this interface. The flags are a bitwise combination of <gtk-tree-model-flags>. The flags supported should not change during the lifecycle of the tree-model.

tree-model

          A <gtk-tree-model>.

ret The flags supported by this interface.

[Function] gtk-tree-model-get-n-columns (self <gtk-tree-model>)

⇒ (ret int)

[Method] get-n-columns

Returns the number of columns supported by tree-model.

tree-model

          A <gtk-tree-model>.

ret The number of columns.

[Function] gtk-tree-model-get-column-type (self <gtk-tree-model>)

(index int) ⇒ (ret <gtype>)

[Method] get-column-type

Returns the type of the column.

tree-model

          A <gtk-tree-model>.

index The column index.

ret The type of the column.

[Function] gtk-tree-model-get-iter (self <gtk-tree-model>)
   (path <gtk-tree-path>) ⇒ (ret <gtk-tree-iter>)
[Method] get-iter

Sets iter to a valid iterator pointing to path.

tree-model

          A <gtk-tree-model>.

iter The uninitialized <gtk-tree-iter>.

path  The <gtk-tree-path>.

ret ‘#t’, if iter was set.

[Function] gtk-tree-model-get-iter-first (self <gtk-tree-model>)
   ⇒ (ret <gtk-tree-iter>)
[Method] get-iter-first

Initializes iter with the first iterator in the tree (the one at the path "0") and returns ‘#t’. Returns ‘#f’ if the tree is empty.

tree-model

          A <gtk-tree-model>.

iter The uninitialized <gtk-tree-iter>.

ret ‘#t’, if iter was set.

[Function] gtk-tree-model-get-path (self <gtk-tree-model>)
   (iter <gtk-tree-iter>) ⇒ (ret <gtk-tree-path>)
[Method] get-path

Returns a newly-created <gtk-tree-path> referenced by iter. This path should be

freed with gtk-tree-path-free.

tree-model

          A <gtk-tree-model>.
iter  The <gtk-tree-iter>.

ret a newly-created <gtk-tree-path>.

[Function] gtk-tree-model-get-value (self <gtk-tree-model>)
   (iter <gtk-tree-iter>) (column int) ⇒ (ret scm)
[Method] get-value

Sets initializes and sets value to that at column. When done with value, g-value-unset needs to be called to free any allocated memory.

tree-model

          A <gtk-tree-model>.
iter  The <gtk-tree-iter>.

column The column to lookup the value at.

value An empty <gvalue> to set.

[Function] gtk-tree-model-iter-next (self <gtk-tree-model>)
   (iter <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)
[Method] iter-next

Sets iter to point to the node following it at the current level. If there is no next iter, ‘#f’ is returned and iter is set to be invalid.

tree-model

          A <gtk-tree-model>.
iter  The <gtk-tree-iter>.

ret ‘#t’ if iter has been changed to the next node.

[Function] gtk-tree-model-iter-children (self <gtk-tree-model>)
   (parent <gtk-tree-iter>) ⇒ (ret glist-of)
[Method] iter-children

Sets iter to point to the first child of parent. If parent has no children, ‘#f’ is returned and iter is set to be invalid. parent will remain a valid node after this function has been called. If parent is ‘#f’ returns the first node, equivalent to ‘gtk_tree_model_get_iter_first

(tree_model, iter);’

tree-model

          A <gtk-tree-model>.

iter The new <gtk-tree-iter> to be set to the child.

parent  The <gtk-tree-iter>, or ‘#f’

ret ‘#t’, if child has been set to the first child.

[Function] gtk-tree-model-iter-has-child (self <gtk-tree-model>)
   (iter <gtk-tree-iter>) ⇒ (ret bool)
[Method] iter-has-child

Returns ‘#t’ if iter has children, ‘#f’ otherwise.

tree-model

          A <gtk-tree-model>.

iter The <gtk-tree-iter> to test for children.

ret ‘#t’ if iter has children.

[Function] gtk-tree-model-iter-n-children (self <gtk-tree-model>)
   (iter <gtk-tree-iter>) ⇒ (ret int)
[Method] iter-n-children

Returns the number of children that iter has. As a special case, if iter is ‘#f’, then the number of toplevel nodes is returned.

tree-model

          A <gtk-tree-model>.
iter  The <gtk-tree-iter>, or ‘#f’.

ret The number of children of iter.

[Function] gtk-tree-model-iter-nth-child (self <gtk-tree-model>)
   (parent <gtk-tree-iter>) (n int) ⇒ (ret <gtk-tree-iter>)
[Method] iter-nth-child

Sets iter to be the child of parent, using the given index. The first index is 0. If n is too big, or parent has no children, iter is set to an invalid iterator and ‘#f’ is returned. parent will remain a valid node after this function has been called. As a special case, if parent is ‘#f’, then the nth root node is set.

tree-model

          A <gtk-tree-model>.

iter The <gtk-tree-iter> to set to the nth child.

parent The <gtk-tree-iter> to get the child from, or ‘#f’.

n Then index of the desired child.

ret ‘#t’, if parent has an nth child.

[Function] gtk-tree-model-iter-parent (self <gtk-tree-model>)
   (child <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)
[Method] iter-parent

Sets iter to be the parent of child. If child is at the toplevel, and doesn’t have a parent, then iter is set to an invalid iterator and ‘#f’ is returned. child will remain a valid node after this function has been called.

tree-model

          A <gtk-tree-model>

iter The new <gtk-tree-iter> to set to the parent.

child  The <gtk-tree-iter>.

ret ‘#t’, if iter is set to the parent of child.

[Function] gtk-tree-model-get-string-from-iter (self <gtk-tree-model>)
   (iter <gtk-tree-iter>) ⇒ (ret mchars)
[Method] get-string-from-iter

Generates a string representation of the iter. This string is a ’:’ separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.

tree-model

          A <gtk-tree-model>.
iter  An <gtk-tree-iter>.

ret A newly-allocated string. Must be freed with g-free.

Since 2.2

[Function] gtk-tree-model-ref-node (self <gtk-tree-model>)
   (iter <gtk-tree-iter>)
[Method] ref-node

Lets the tree ref the node. 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 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 an iter independent of its reffed state.

tree-model

          A <gtk-tree-model>.
iter  The <gtk-tree-iter>.
[Function] gtk-tree-model-unref-node (self <gtk-tree-model>)
   (iter <gtk-tree-iter>)
[Method] unref-node

Lets the tree unref the node. 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 gtk-tree-model-ref-node. Please note that nodes that are deleted are not unreffed.

tree-model

          A <gtk-tree-model>.
iter  The <gtk-tree-iter>.
[Function] gtk-tree-model-row-changed (self <gtk-tree-model>)
   (path <gtk-tree-path>) (iter <gtk-tree-iter>)
[Method] row-changed

Emits the "row changed" signal on tree-model.

tree-model

          A <gtk-tree-model>

path A <gtk-tree-path> pointing to the changed row

iter A valid <gtk-tree-iter> pointing to the changed row

[Function] gtk-tree-model-row-inserted (self <gtk-tree-model>)
   (path <gtk-tree-path>) (iter <gtk-tree-iter>)
[Method] row-inserted

Emits the "row inserted" signal on tree-model

tree-model

          A <gtk-tree-model>

path A <gtk-tree-path> pointing to the inserted row

iter A valid <gtk-tree-iter> pointing to the inserted row

[Function] gtk-tree-model-row-deleted (self <gtk-tree-model>)
   (path <gtk-tree-path>)
[Method] row-deleted

Emits the "row deleted" signal on tree-model. This should be called by models after a row has been removed. The location pointed to by path should be the location that the row previously was at. It may not be a valid location anymore. tree-model

          A <gtk-tree-model>

path A <gtk-tree-path> pointing to the previous location of the deleted row.

[Function] gtk-tree-model-rows-reordered (self <gtk-tree-model>)
   (path <gtk-tree-path>) (iter <gtk-tree-iter>) ⇒ (new order int)
[Method] rows-reordered

Emits the "rows reordered" signal on tree-model. This should be called by models when their rows have been reordered.

tree-model

          A <gtk-tree-model>

path A <gtk-tree-path> pointing to the tree node whose children have been reordered

iter A valid <gtk-tree-iter> pointing to the node whose children have been reordered, or ‘#f’ if the depth of path is 0.

new-order an array of integers mapping the current position of each child to its old position before the re-ordering, i.e. new-order‘[newpos] = oldpos’.

33 GtkTreeSelection

The selection object for

33.1 Overview

The <gtk-tree-selection> object is a helper object to manage the selection for a <gtktree-view> widget. The <gtk-tree-selection> object is automatically created when a new <gtk-tree-view> widget is created, and cannot exist independentally of this widget. The primary reason the <gtk-tree-selection> objects 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-tree-view> widget instead of a separate function.

   The <gtk-tree-selection> object is gotten from a <gtk-tree-view> by calling gtk-

tree-view-get-selection. It can be manipulated to check the selection status of the tree, as well as select and deselect individual rows. Selection is done completely 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 select row on an already selected row).

33.2 Usage

[Class] <gtk-tree-selection>

Derives from <gobject>.

This class defines no direct slots.

[Signal on <gtk-tree-selection>] changed

Emitted whenever the selection has (possibly) changed. Please note that this signal is mostly a hint. It may only be emitted once when a range of rows are selected, and it may occasionally be emitted when nothing has happened.

[Function] gtk-tree-selection-set-mode (self <gtk-tree-selection>)
        (type <gtk-selection-mode>)
[Method] set-mode

Sets the selection mode of the selection. If the previous type was <gtk-selection-multiple>, then the anchor is kept selected, if it was previously selected.

     selection A <gtk-tree-selection>.

type The selection mode

[Function] gtk-tree-selection-get-mode (self <gtk-tree-selection>)
        ⇒ (ret <gtk-selection-mode>)
[Method] get-mode

Gets the selection mode for selection. See gtk-tree-selection-set-mode.

selection a <gtk-tree-selection>

ret the current selection mode

[Function] gtk-tree-selection-get-tree-view (self <gtk-tree-selection>)
   ⇒ (ret <gtk-tree-view>)
[Method] get-tree-view

Returns the tree view associated with selection.

selection A <gtk-tree-selection>
ret  A <gtk-tree-view>
[Function] gtk-tree-selection-get-selected (self <gtk-tree-selection>)
   ⇒ (model <gtk-tree-model>) (iter <gtk-tree-iter>)
[Method] get-selected
[Method] get-selected

Retrieve the current selection, if selection is set to <gtk-selection-single> or <gtk-

selection-browse>.

This function will not work if you use selection is <gtk-selection-multiple>.

selection A <gtk-tree-selection>.

model A pointer to set to the <gtk-tree-model>, or NULL.

iter  The <gtk-tree-iter>, or NULL.
[Function] gtk-tree-selection-select-path (self <gtk-tree-selection>)
   (path <gtk-tree-path>)
[Method] select-path

Select the row at path.

selection A <gtk-tree-selection>.

path The <gtk-tree-path> to be selected.

[Function] gtk-tree-selection-unselect-path (self <gtk-tree-selection>)
   (path <gtk-tree-path>)
[Method] unselect-path

Unselects the row at path.

selection A <gtk-tree-selection>.

path The <gtk-tree-path> to be unselected.

[Function] gtk-tree-selection-path-is-selected
   (self <gtk-tree-selection>) (path <gtk-tree-path>) ⇒ (ret bool)
[Method] path-is-selected

Returns ‘#t’ if the row pointed to by path is currently selected. If path does not point to a valid location, ‘#f’ is returned

selection A <gtk-tree-selection>.

path A <gtk-tree-path> to check selection on.

ret ‘#t’ if path is selected.

[Function] gtk-tree-selection-select-iter (self <gtk-tree-selection>)
   (iter <gtk-tree-iter>)
[Method] select-iter

Selects the specified iterator.

selection A <gtk-tree-selection>.

iter The <gtk-tree-iter> to be selected.

[Function] gtk-tree-selection-unselect-iter (self <gtk-tree-selection>)
   (iter <gtk-tree-iter>)
[Method] unselect-iter

Unselects the specified iterator.

selection A <gtk-tree-selection>.

iter The <gtk-tree-iter> to be unselected.

[Function] gtk-tree-selection-iter-is-selected
   (self <gtk-tree-selection>) (iter <gtk-tree-iter>) ⇒ (ret bool)
[Method] iter-is-selected

Returns ‘#t’ if the row at iter is currently selected.

selection A <gtk-tree-selection>
iter  A valid <gtk-tree-iter>

ret ‘#t’, if iter is selected

[Function] gtk-tree-selection-select-all (self <gtk-tree-selection>)
[Method] select-all

Selects all the nodes. selection must be set to <gtk-selection-multiple> mode.

selection A <gtk-tree-selection>.
[Function] gtk-tree-selection-unselect-all (self <gtk-tree-selection>)
[Method] unselect-all

Unselects all the nodes.

selection A <gtk-tree-selection>.
[Function] gtk-tree-selection-select-range (self <gtk-tree-selection>)
   (start path <gtk-tree-path>) (end path <gtk-tree-path>)
[Method] select-range

Selects a range of nodes, determined by start-path and end-path inclusive. selection

must be set to <gtk-selection-multiple> mode.
selection A <gtk-tree-selection>.

start-path The initial node of the range.

end-path The final node of the range.

[Function] gtk-tree-selection-unselect-range (self <gtk-tree-selection>)
   (start path <gtk-tree-path>) (end path <gtk-tree-path>)
[Method] unselect-range

Unselects a range of nodes, determined by start-path and end-path inclusive.

selection A <gtk-tree-selection>.

start-path The initial node of the range. end-path The initial node of the range. Since 2.2

34 GtkTreeViewColumn

A visible column in a widget

34.1 Overview

The GtkTreeViewColumn object represents a visible column in a <gtk-tree-view> widget. It allows to set properties of the column header, and functions as a holding pen for the cell renderers which determine how the data in the column is displayed.

Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.

34.2 Usage

[Class] <gtk-tree-view-column>
Derives from <gtk-buildable>, <gtk-cell-layout>, <gtk-object>.

This class defines the following slots: visible Whether to display the column

resizable

Column is user-resizable

width Current width of the column spacing Space which is inserted between cells sizing Resize mode of the column

fixed-width

Current fixed width of the column

min-width

Minimum allowed width of the column

max-width

Maximum allowed width of the column

title Title to appear in column header expand Column gets share of extra width allocated to the widget

clickable

Whether the header can be clicked

widget Widget to put in column header button instead of column title

alignment

X Alignment of the column header text or widget

reorderable

Whether the column can be reordered around the headers

sort-indicator

Whether to show a sort indicator

sort-order

Sort direction the sort indicator should indicate

[Signal on <gtk-tree-view-column>] clicked
[Function] gtk-tree-view-column-new ⇒ (ret <gtk-tree-view-column>)
Creates a new <gtk-tree-view-column>.
ret  A newly created <gtk-tree-view-column>.
[Function] gtk-tree-view-column-pack-start (self <gtk-tree-view-column>)
   (cell <gtk-cell-renderer>) (expand bool)
[Method] pack-start

Packs the cell into the beginning of the column. If expand is ‘#f’, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is ‘#t’.

tree-column

          A <gtk-tree-view-column>.
cell  The <gtk-cell-renderer>.

expand ‘#t’ if cell is to be given extra space allocated to tree-column.

[Function] gtk-tree-view-column-pack-end (self <gtk-tree-view-column>)
   (cell <gtk-cell-renderer>) (expand bool)
[Method] pack-end

Adds the cell to end of the column. If expand is ‘#f’, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is ‘#t’.

tree-column

          A <gtk-tree-view-column>.
cell  The <gtk-cell-renderer>.

expand ‘#t’ if cell is to be given extra space allocated to tree-column.

[Function] gtk-tree-view-column-clear (self <gtk-tree-view-column>)

[Method] clear

Unsets all the mappings on all renderers on the tree-column.

tree-column

          A <gtk-tree-view-column>
[Function] gtk-tree-view-column-add-attribute
   (self <gtk-tree-view-column>) (cell renderer <gtk-cell-renderer>)

(attribute mchars) (column int)

[Method] add-attribute

Adds an attribute mapping to the list in tree-column. The column is the column of the 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-cell-renderer-text> get its values from column 2.

tree-column

          A <gtk-tree-view-column>.

cell-renderer the <gtk-cell-renderer> to set attributes on

attribute An attribute on the renderer

column The column position on the model to get the attribute from.

[Function] gtk-tree-view-column-set-spacing
   (self <gtk-tree-view-column>) (spacing int)
[Method] set-spacing

Sets the spacing field of tree-column, which is the number of pixels to place between cell renderers packed into it.

tree-column

          A <gtk-tree-view-column>.

spacing distance between cell renderers in pixels.

[Function] gtk-tree-view-column-get-spacing
   (self <gtk-tree-view-column>) ⇒ (ret int)
[Method] get-spacing

Returns the spacing of tree-column.

tree-column

          A <gtk-tree-view-column>.

ret the spacing of tree-column.

[Function] gtk-tree-view-column-set-visible
   (self <gtk-tree-view-column>) (visible bool)
[Method] set-visible

Sets the visibility of tree-column.

tree-column

          A <gtk-tree-view-column>.

visible ‘#t’ if the tree-column is visible.

[Function] gtk-tree-view-column-get-visible
   (self <gtk-tree-view-column>) ⇒ (ret bool)
[Method] get-visible

Returns ‘#t’ if tree-column is visible.

tree-column

          A <gtk-tree-view-column>.

ret whether the column is visible or not. If it is visible, then the tree will show the column.

[Function] gtk-tree-view-column-set-resizable
   (self <gtk-tree-view-column>) (resizable bool)
[Method] set-resizable

If resizable is ‘#t’, then the user can explicitly resize the column by grabbing the outer edge of the column button. If resizable is ‘#t’ and sizing mode of the column

is <gtk-tree-view-column-autosize>, then the sizing mode is changed to <gtk-
tree-view-column-grow-only>.

tree-column

          A <gtk-tree-view-column>

resizable ‘#t’, if the column can be resized

[Function] gtk-tree-view-column-get-resizable
   (self <gtk-tree-view-column>) ⇒ (ret bool)
[Method] get-resizable

Returns ‘#t’ if the tree-column can be resized by the end user.

tree-column

          A <gtk-tree-view-column>

ret ‘#t’, if the tree-column can be resized.

[Function] gtk-tree-view-column-set-sizing (self <gtk-tree-view-column>)
   (type <gtk-tree-view-column-sizing>)
[Method] set-sizing

Sets the growth behavior of tree-column to type.

tree-column

          A <gtk-tree-view-column>.
type  The <gtk-tree-view-column-sizing>.
[Function] gtk-tree-view-column-get-sizing (self <gtk-tree-view-column>)
   ⇒ (ret <gtk-tree-view-column-sizing>)
[Method] get-sizing

Returns the current type of tree-column.

tree-column

          A <gtk-tree-view-column>.

ret The type of tree-column.

[Function] gtk-tree-view-column-get-width (self <gtk-tree-view-column>)

⇒ (ret int)

[Method] get-width

Returns the current size of tree-column in pixels.

tree-column

          A <gtk-tree-view-column>.

ret The current width of tree-column.

[Function] gtk-tree-view-column-set-min-width
   (self <gtk-tree-view-column>) (min width int)
[Method] set-min-width

Sets the minimum width of the tree-column. If min-width is -1, then the minimum width is unset.

tree-column

          A <gtk-tree-view-column>.

min-width The minimum width of the column in pixels, or -1.

[Function] gtk-tree-view-column-get-min-width
   (self <gtk-tree-view-column>) ⇒ (ret int)
[Method] get-min-width

Returns the minimum width in pixels of the tree-column, or -1 if no minimum width is set.

tree-column

          A <gtk-tree-view-column>.

ret The minimum width of the tree-column.

[Function] gtk-tree-view-column-set-max-width
   (self <gtk-tree-view-column>) (max width int)
[Method] set-max-width

Sets the maximum width of the tree-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.

tree-column

          A <gtk-tree-view-column>.

max-width The maximum width of the column in pixels, or -1.

[Function] gtk-tree-view-column-get-max-width
   (self <gtk-tree-view-column>) ⇒ (ret int)
[Method] get-max-width

Returns the maximum width in pixels of the tree-column, or -1 if no maximum width is set.

tree-column

          A <gtk-tree-view-column>.

ret The maximum width of the tree-column.

[Function] gtk-tree-view-column-clicked (self <gtk-tree-view-column>)

[Method] clicked

Emits the "clicked" signal on the column. This function will only work if tree-column is clickable.

tree-column

          a <gtk-tree-view-column>
[Function] gtk-tree-view-column-set-title (self <gtk-tree-view-column>)

(title mchars)

[Method] set-title

Sets the title of the tree-column. If a custom widget has been set, then this value is ignored.

tree-column

          A <gtk-tree-view-column>.

title The title of the tree-column.

[Function] gtk-tree-view-column-get-title (self <gtk-tree-view-column>)
   ⇒ (ret mchars)
[Method] get-title

Returns the title of the widget.

tree-column

          A <gtk-tree-view-column>.

ret the title of the column. This string should not be modified or freed.

[Function] gtk-tree-view-column-set-expand (self <gtk-tree-view-column>)

(expand bool)

[Method] set-expand

Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to ‘#t’. If no column has this option set, then the last column gets all extra space. By default, every column is created with this ‘#f’.

tree-column

          A <gtk-tree-view-column>

expand ‘#t’ if the column should take available extra space, ‘#f’ if not

Since 2.4

[Function] gtk-tree-view-column-get-expand (self <gtk-tree-view-column>)

⇒ (ret bool)

[Method] get-expand

Return ‘#t’ if the column expands to take any available space.

tree-column

          a <gtk-tree-view-column>

ret ‘#t’, if the column expands

Since 2.4

[Function] gtk-tree-view-column-set-clickable
   (self <gtk-tree-view-column>) (clickable bool)
[Method] set-clickable

Sets the header to be active if active is ‘#t’. When the header is active, then it can take keyboard focus, and can be clicked.

tree-column

          A <gtk-tree-view-column>.

clickable ‘#t’ if the header is active.

[Function] gtk-tree-view-column-get-clickable
   (self <gtk-tree-view-column>) ⇒ (ret bool)
[Method] get-clickable

Returns ‘#t’ if the user can click on the header for the column.

tree-column

          a <gtk-tree-view-column>

ret ‘#t’ if user can click the column header.

[Function] gtk-tree-view-column-set-widget (self <gtk-tree-view-column>)
   (widget <gtk-widget>)
[Method] set-widget

Sets the widget in the header to be widget. If widget is ‘#f’, then the header button is set with a <gtk-label> set to the title of tree-column.

tree-column

          A <gtk-tree-view-column>.

widget A child <gtk-widget>, or ‘#f’.

[Function] gtk-tree-view-column-get-widget (self <gtk-tree-view-column>)
   ⇒ (ret <gtk-widget>)
[Method] get-widget

Returns the <gtk-widget> in the button on the column header. If a custom widget has not been set then ‘#f’ is returned.

tree-column

          A <gtk-tree-view-column>.

ret The <gtk-widget> in the column header, or ‘#f’

[Function] gtk-tree-view-column-set-alignment
   (self <gtk-tree-view-column>) (xalign float)
[Method] set-alignment

Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button – 0.0 for left, 0.5 for center, 1.0 for right.

tree-column

          A <gtk-tree-view-column>.

xalign The alignment, which is between [0.0 and 1.0] inclusive.

[Function] gtk-tree-view-column-get-alignment
   (self <gtk-tree-view-column>) ⇒ (ret float)
[Method] get-alignment

Returns the current x alignment of tree-column. This value can range between 0.0 and 1.0.

tree-column

          A <gtk-tree-view-column>.

ret The current alignent of tree-column.

[Function] gtk-tree-view-column-set-sort-order
   (self <gtk-tree-view-column>) (order <gtk-sort-type>)
[Method] set-sort-order

Changes the appearance of the sort indicator. This does not actually sort the model. Use gtk-tree-view-column-set-sort-column-id if you want automatic sorting support. This function is primarily for custom sorting behavior, and should be used in conjunction with gtk-tree-sortable-set-sort-column to do that. For custom models, the mechanism will vary.

The sort indicator changes direction to indicate normal sort or reverse sort. Note that you must have the sort indicator enabled to see anything when calling this function;

see gtk-tree-view-column-set-sort-indicator.

tree-column

          a <gtk-tree-view-column>

order sort order that the sort indicator should indicate

[Function] gtk-tree-view-column-get-sort-order
   (self <gtk-tree-view-column>) ⇒ (ret <gtk-sort-type>)
[Method] get-sort-order
Gets the value set by gtk-tree-view-column-set-sort-order.

tree-column

          a <gtk-tree-view-column>

ret the sort order the sort indicator is indicating

[Function] gtk-tree-view-column-focus-cell (self <gtk-tree-view-column>)
   (cell <gtk-cell-renderer>)
[Method] focus-cell

Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells.

tree-column

          A <gtk-tree-view-column>
cell  A <gtk-cell-renderer>

Since 2.2

[Function] gtk-tree-view-column-queue-resize
   (self <gtk-tree-view-column>)
[Method] queue-resize

Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.

tree-column

          A <gtk-tree-view-column>

Since 2.8

35 GtkTreeView

A widget for displaying both trees and lists

35.1 Overview

Widget that displays any object that implements the GtkTreeModel interface.

Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.

35.2 Usage

[Class] <gtk-tree-view>
Derives from <gtk-container>.

This class defines the following slots:

model The model for the tree view

hadjustment

Horizontal Adjustment for the widget

vadjustment

Vertical Adjustment for the widget

headers-visible

Show the column header buttons

headers-clickable

Column headers respond to click events

expander-column

Set the column for the expander column

reorderable

View is reorderable

rules-hint

Set a hint to the theme engine to draw rows in alternating colors

enable-search

View allows user to search through columns interactively

search-column

Model column to search through when searching through code

fixed-height-mode

Speeds up GtkTreeView by assuming that all rows have the same height

hover-selection

Whether the selection should follow the pointer

hover-expand

Whether rows should be expanded/collapsed when the pointer moves over them

show-expanders

View has expanders

level-indentation

Extra indentation for each level

rubber-banding

Whether to enable selection of multiple items by dragging the mouse pointer

enable-grid-lines

Whether grid lines should be drawn in the tree view

enable-tree-lines

Whether tree lines should be drawn in the tree view

tooltip-column

The column in the model containing the tooltip texts for the rows

[Signal on <gtk-tree-view>] move-cursor (arg0 <gtk-movement-step>)
   (arg1 <gint>) ⇒ <gboolean>
[Signal on <gtk-tree-view>] set-scroll-adjustments
   (arg0 <gtk-adjustment>) (arg1 <gtk-adjustment>)
[Signal on <gtk-tree-view>] select-all ⇒ <gboolean>
[Signal on <gtk-tree-view>] unselect-all ⇒ <gboolean>
[Signal on <gtk-tree-view>] row-activated (arg0 <gtk-tree-path>)
   (arg1 <gtk-tree-view-column>)

The "row-activated" signal is emitted when the method gtk-tree-view-row-activated is called or the user double clicks a treeview row. It is also emitted when a non-editable row is selected and one of the keys: Space, Shift+Space, Return or Enter is pressed. For selection handling refer to the tree widget conceptual overview as well as <gtk-

tree-selection>.
[Signal on <gtk-tree-view>] test-expand-row (arg0 <gtk-tree-iter>)
   (arg1 <gtk-tree-path>) ⇒ <gboolean>

The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.

[Signal on <gtk-tree-view>] test-collapse-row (arg0 <gtk-tree-iter>)
   (arg1 <gtk-tree-path>) ⇒ <gboolean>

The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.

[Signal on <gtk-tree-view>] row-expanded (arg0 <gtk-tree-iter>)
   (arg1 <gtk-tree-path>)

The given row has been expanded (child nodes are shown).

[Signal on <gtk-tree-view>] row-collapsed (arg0 <gtk-tree-iter>)
   (arg1 <gtk-tree-path>)

The given row has been collapsed (child nodes are hidden).

[Signal on <gtk-tree-view>] columns-changed

The number of columns of the treeview has changed.

[Signal on <gtk-tree-view>] cursor-changed

The position of the cursor (focused cell) has changed.

[Signal on <gtk-tree-view>] select-cursor-row (arg0 <gboolean>)
        ⇒ <gboolean>
[Signal on <gtk-tree-view>] toggle-cursor-row ⇒ <gboolean>
[Signal on <gtk-tree-view>] expand-collapse-cursor-row (arg0 <gboolean>)
        (arg1 <gboolean>) (arg2 <gboolean>) ⇒ <gboolean>
[Signal on <gtk-tree-view>] select-cursor-parent ⇒ <gboolean>
[Signal on <gtk-tree-view>] start-interactive-search ⇒ <gboolean>
[Function] gtk-tree-view-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-tree-view> widget.

ret A newly created <gtk-tree-view> widget.

[Function] gtk-tree-view-new-with-model (model <gtk-tree-model>)
        ⇒ (ret <gtk-widget>)

Creates a new <gtk-tree-view> widget with the model initialized to model.

model the model.

ret A newly created <gtk-tree-view> widget.

[Function] gtk-tree-view-get-model (self <gtk-tree-view>)
        ⇒ (ret <gtk-tree-model>)
[Method] get-model

Returns the model the <gtk-tree-view> is based on. Returns ‘#f’ if the model is unset.

     tree-view a <gtk-tree-view>

ret A <gtk-tree-model>, or ‘#f’ if none is currently being used.

[Function] gtk-tree-view-set-model (self <gtk-tree-view>)
        (model <gtk-tree-model>)
[Method] set-model

Sets the model for a <gtk-tree-view>. If the tree-view already has a model set, it will remove it before setting the new model. If model is ‘#f’, then it will unset the old model.

     tree-view A <gtk-tree-node>.

model The model.

[Function] gtk-tree-view-get-selection (self <gtk-tree-view>)
        ⇒ (ret <gtk-tree-selection>)
[Method] get-selection

Gets the <gtk-tree-selection> associated with tree-view.

tree-view A <gtk-tree-view>.
ret  A <gtk-tree-selection> object.
[Function] gtk-tree-view-get-hadjustment (self <gtk-tree-view>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-hadjustment

Gets the <gtk-adjustment> currently being used for the horizontal aspect.

tree-view A <gtk-tree-view>

ret A <gtk-adjustment> object, or ‘#f’ if none is currently being used.

[Function] gtk-tree-view-set-hadjustment (self <gtk-tree-view>)
   (adjustment <gtk-adjustment>)
[Method] set-hadjustment

Sets the <gtk-adjustment> for the current horizontal aspect.

tree-view A <gtk-tree-view>

adjustment

          The <gtk-adjustment> to set, or ‘#f’
[Function] gtk-tree-view-get-vadjustment (self <gtk-tree-view>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-vadjustment

Gets the <gtk-adjustment> currently being used for the vertical aspect.

tree-view A <gtk-tree-view>

ret A <gtk-adjustment> object, or ‘#f’ if none is currently being used.

[Function] gtk-tree-view-set-vadjustment (self <gtk-tree-view>)
   (adjustment <gtk-adjustment>)
[Method] set-vadjustment

Sets the <gtk-adjustment> for the current vertical aspect.

tree-view A <gtk-tree-view>

adjustment

          The <gtk-adjustment> to set, or ‘#f’
[Function] gtk-tree-view-get-headers-visible (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-headers-visible

Returns ‘#t’ if the headers on the tree-view are visible.

tree-view A <gtk-tree-view>.

ret Whether the headers are visible or not.

[Function] gtk-tree-view-set-headers-visible (self <gtk-tree-view>)

(headers visible bool)

[Method] set-headers-visible

Sets the visibility state of the headers.

tree-view A <gtk-tree-view>.

headers-visible ‘#t’ if the headers are visible

[Function] gtk-tree-view-columns-autosize (self <gtk-tree-view>)
[Method] columns-autosize

Resizes all columns to their optimal width. Only works after the treeview has been realized.

tree-view A <gtk-tree-view>.
[Function] gtk-tree-view-get-headers-clickable (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-headers-clickable

Returns whether all header columns are clickable.

tree-view A <gtk-tree-view>.

ret ‘#t’ if all header columns are clickable, otherwise ‘#f’

Since 2.10

[Function] gtk-tree-view-set-headers-clickable (self <gtk-tree-view>)

(setting bool)

[Method] set-headers-clickable

Allow the column title buttons to be clicked.

tree-view A <gtk-tree-view>.

setting ‘#t’ if the columns are clickable.

[Function] gtk-tree-view-set-rules-hint (self <gtk-tree-view>)

(setting bool)

[Method] set-rules-hint

This function tells GTK+ that the user interface for your application requires users to read across tree rows and associate cells with one another. By default, GTK+ will then render the tree 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 function 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).

tree-view a <gtk-tree-view>

setting ‘#t’ if the tree requires reading across rows

[Function] gtk-tree-view-get-rules-hint (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-rules-hint
Gets the setting set by gtk-tree-view-set-rules-hint.
tree-view a <gtk-tree-view>

ret ‘#t’ if rules are useful for the user of this tree

[Function] gtk-tree-view-append-column (self <gtk-tree-view>)
   (column <gtk-tree-view-column>) ⇒ (ret int)
[Method] append-column

Appends column to the list of columns. If tree-view has "fixed height" mode enabled, then column must have its "sizing" property set to be GTK TREE VIEW COLUMN FIXED.

tree-view A <gtk-tree-view>.
column  The <gtk-tree-view-column> to add.

ret The number of columns in tree-view after appending.

[Function] gtk-tree-view-remove-column (self <gtk-tree-view>)
   (column <gtk-tree-view-column>) ⇒ (ret int)
[Method] remove-column

Removes column from tree-view.

tree-view A <gtk-tree-view>.
column  The <gtk-tree-view-column> to remove.

ret The number of columns in tree-view after removing.

[Function] gtk-tree-view-insert-column (self <gtk-tree-view>)
   (column <gtk-tree-view-column>) (position int) ⇒ (ret int)
[Method] insert-column

This inserts the column into the tree-view at position. If position is -1, then the column is inserted at the end. If tree-view has "fixed height" mode enabled, then column must have its "sizing" property set to be GTK TREE VIEW COLUMN FIXED.

tree-view A <gtk-tree-view>.
column  The <gtk-tree-view-column> to be inserted.

position The position to insert column in.

ret The number of columns in tree-view after insertion.

[Function] gtk-tree-view-get-column (self <gtk-tree-view>) (n int)
   ⇒ (ret <gtk-tree-view-column>)
[Method] get-column
Gets the <gtk-tree-view-column> at the given position in the <tree-view>.
tree-view A <gtk-tree-view>.

n The position of the column, counting from 0.

ret The <gtk-tree-view-column>, or ‘#f’ if the position is outside the range of columns.

[Function] gtk-tree-view-get-columns (self <gtk-tree-view>)
   ⇒ (ret glist-of)
[Method] get-columns

Returns a <g-list> of all the <gtk-tree-view-column> s currently in tree-view. The returned list must be freed with g-list-free.

tree-view A <gtk-tree-view>
ret  A list of <gtk-tree-view-column> s
[Function] gtk-tree-view-move-column-after (self <gtk-tree-view>)
   (column <gtk-tree-view-column>)
   (base column <gtk-tree-view-column>)
[Method] move-column-after

Moves column to be after to base-column. If base-column is ‘#f’, then column is placed in the first position.

tree-view A <gtk-tree-view>
column  The <gtk-tree-view-column> to be moved.

base-column The <gtk-tree-view-column> to be moved relative to, or ‘#f’.

[Function] gtk-tree-view-set-expander-column (self <gtk-tree-view>)
   (column <gtk-tree-view-column>)
[Method] set-expander-column

Sets the column to draw the expander arrow at. It must be in tree-view. If column is ‘#f’, then the expander arrow is always at the first visible column. If you do not want expander arrow to appear in your tree, set the expander column to a hidden column.

tree-view A <gtk-tree-view>

column ‘#f’, or the column to draw the expander arrow at.

[Function] gtk-tree-view-get-expander-column (self <gtk-tree-view>)
   ⇒ (ret <gtk-tree-view-column>)
[Method] get-expander-column

Returns the column that is the current expander column. This column has the expander arrow drawn next to it.

tree-view A <gtk-tree-view>

ret The expander column.

[Function] gtk-tree-view-scroll-to-point (self <gtk-tree-view>)

(tree x int) (tree y int)

[Method] scroll-to-point

Scrolls the tree view such that the top-left corner of the visible area is tree-x, tree-y, where tree-x and tree-y are specified in tree window coordinates. The tree-view must be realized before this function is called. If it isn’t, you probably want to be using

gtk-tree-view-scroll-to-cell.

If either tree-x or tree-y are -1, then that direction isn’t scrolled.

tree-view a <gtk-tree-view>

tree-x X coordinate of new top-left pixel of visible area, or -1

tree-y Y coordinate of new top-left pixel of visible area, or -1

[Function] gtk-tree-view-scroll-to-cell (self <gtk-tree-view>)
   (path <gtk-tree-path>) (column <gtk-tree-view-column>)

(use align bool) (row align float) (col align float)

[Method] scroll-to-cell

Moves the alignments of tree-view to the position specified by column and path. If column is ‘#f’, then no horizontal scrolling occurs. Likewise, if path is ‘#f’ no vertical scrolling occurs. At a minimum, one of column or path need to be non-‘#f’. 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 ‘#f’, then 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 its current position. If the cell is currently visible on the screen, nothing is done. This function only works if the model is set, and path is a valid row on the model. If the model changes before the tree-view is realized, the centered path will be modified to reflect this change.

tree-view A <gtk-tree-view>.

path The path of the row to move to, or ‘#f’.

column The <gtk-tree-view-column> to move horizontally to, or ‘#f’.

use-align whether to use alignment arguments, or ‘#f’.

row-align The vertical alignment of the row specified by path.

col-align The horizontal alignment of the column specified by column.

[Function] gtk-tree-view-set-cursor (self <gtk-tree-view>)
   (path <gtk-tree-path>) (focus column <gtk-tree-view-column>)

(start editing bool)

[Method] set-cursor

Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user’s attention on a particular row. If focus-column is not ‘#f’, then focus is given to the column specified by it. Additionally, if focus-column is specified, and start-editing is ‘#t’, then editing should be started in the specified cell. This function is often followed by gtk-widget-grab-focus (tree-view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.

tree-view A <gtk-tree-view>
path  A <gtk-tree-path>

focus-column

          A <gtk-tree-view-column>, or ‘#f’

start-editing ‘#t’ if the specified cell should start being edited.

[Function] gtk-tree-view-set-cursor-on-cell (self <gtk-tree-view>)
   (path <gtk-tree-path>) (focus column <gtk-tree-view-column>)

(focus cell <gtk-cell-renderer>) (start editing bool)

[Method] set-cursor-on-cell

Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user’s attention on a particular row. If focus-column is not ‘#f’, then focus is given to the column specified by it. If focus-column and focus-cell are not ‘#f’, 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 ‘#t’, then editing should be started in the specified cell. This function is often followed by gtk-widget-grab-focus (tree-view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.

tree-view A <gtk-tree-view>
path  A <gtk-tree-path>

focus-column

          A <gtk-tree-view-column>, or ‘#f’
focus-cell A <gtk-cell-renderer>, or ‘#f’

start-editing ‘#t’ if the specified cell should start being edited.

Since 2.2

[Function] gtk-tree-view-row-activated (self <gtk-tree-view>)
   (path <gtk-tree-path>) (column <gtk-tree-view-column>)
[Method] row-activated

Activates the cell determined by path and column.

tree-view A <gtk-tree-view>

path The <gtk-tree-path> to be activated.

column The <gtk-tree-view-column> to be activated.

[Function] gtk-tree-view-expand-all (self <gtk-tree-view>)
[Method] expand-all

Recursively expands all nodes in the tree-view.

tree-view A <gtk-tree-view>.
[Function] gtk-tree-view-collapse-all (self <gtk-tree-view>)
[Method] collapse-all

Recursively collapses all visible, expanded nodes in tree-view.

tree-view A <gtk-tree-view>.
[Function] gtk-tree-view-expand-to-path (self <gtk-tree-view>)
   (path <gtk-tree-path>)
[Method] expand-to-path

Expands the row at path. This will also expand all parent rows of path as necessary.

tree-view A <gtk-tree-view>.

path path to a row.

Since 2.2

[Function] gtk-tree-view-expand-row (self <gtk-tree-view>)
   (path <gtk-tree-path>) (open all bool) ⇒ (ret bool)
[Method] expand-row

Opens the row so its children are visible.

tree-view a <gtk-tree-view>

path path to a row

open-all whether to recursively expand, or just expand immediate children

ret ‘#t’ if the row existed and had children

[Function] gtk-tree-view-collapse-row (self <gtk-tree-view>)
   (path <gtk-tree-path>) ⇒ (ret bool)
[Method] collapse-row

Collapses a row (hides its child rows, if they exist).

tree-view a <gtk-tree-view>

path path to a row in the tree-view

ret ‘#t’ if the row was collapsed.

[Function] gtk-tree-view-row-expanded (self <gtk-tree-view>)
   (path <gtk-tree-path>) ⇒ (ret bool)
[Method] row-expanded

Returns ‘#t’ if the node pointed to by path is expanded in tree-view.

tree-view A <gtk-tree-view>.

path A <gtk-tree-path> to test expansion state.

ret ‘#t’ if <path> is expanded.

[Function] gtk-tree-view-set-reorderable (self <gtk-tree-view>)

(reorderable bool)

[Method] set-reorderable

This function is a convenience function to allow you to reorder models that support

the <gtk-drag-source-iface> and the <gtk-drag-dest-iface>. Both <gtk-tree-

store> and <gtk-list-store> support these. If reorderable is ‘#t’, then 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 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.

tree-view A <gtk-tree-view>.

reorderable ‘#t’, if the tree can be reordered.

[Function] gtk-tree-view-get-reorderable (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-reorderable

Retrieves whether the user can reorder the tree via drag-and-drop. See gtk-tree-

view-set-reorderable.
tree-view a <gtk-tree-view>

ret ‘#t’ if the tree can be reordered.

[Function] gtk-tree-view-get-bin-window (self <gtk-tree-view>)
   ⇒ (ret <gdk-window>)
[Method] get-bin-window

Returns the window that tree-view renders to. This is used primarily to compare to ‘event->window’ to confirm that the event on tree-view is on the right window.

tree-view A <gtk-tree-view>

ret A <gdk-window>, or ‘#f’ when tree-view hasn’t been realized yet

[Function] gtk-tree-view-widget-to-tree-coords (self <gtk-tree-view>)

(wx int) (wy int) ⇒ (tx int) (ty int)

[Method] widget-to-tree-coords

Converts widget coordinates to coordinates for the tree window (the full scrollable area of the tree).

tree-view a <gtk-tree-view>

wx widget X coordinate

wy widget Y coordinate

tx return location for tree X coordinate

ty return location for tree Y coordinate

[Function] gtk-tree-view-tree-to-widget-coords (self <gtk-tree-view>)

(tx int) (ty int) ⇒ (wx int) (wy int)

[Method] tree-to-widget-coords

Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.

tree-view a <gtk-tree-view>

tx tree X coordinate

ty tree Y coordinate

wx return location for widget X coordinate

wy return location for widget Y coordinate

[Function] gtk-tree-view-unset-rows-drag-dest (self <gtk-tree-view>)
[Method] unset-rows-drag-dest
Undoes the effect of gtk-tree-view-enable-model-drag-dest.
tree-view a <gtk-tree-view>

[Function] gtk-tree-view-set-drag-dest-row (self <gtk-tree-view>)
   (path <gtk-tree-path>) (pos <gtk-tree-view-drop-position>)
[Method] set-drag-dest-row

Sets the row that is highlighted for feedback.

tree-view a <gtk-tree-view>

path The path of the row to highlight, or ‘#f’.

pos Specifies whether to drop before, after or into the row

[Function] gtk-tree-view-create-row-drag-icon (self <gtk-tree-view>)
   (path <gtk-tree-path>) ⇒ (ret <gdk-pixmap>)
[Method] create-row-drag-icon

Creates a <gdk-pixmap> representation of the row at path. This image is used for a drag icon.

tree-view a <gtk-tree-view>

path a <gtk-tree-path> in tree-view

ret a newly-allocated pixmap of the drag icon.

[Function] gtk-tree-view-set-enable-search (self <gtk-tree-view>)

(enable search bool)

[Method] set-enable-search

If enable-search is set, then the user can type in text to search through the tree interactively (this is sometimes called "typeahead find"). Note that even if this is ‘#f’, the user can still initiate a search using the "startinteractive-search" key binding.

tree-view A <gtk-tree-view>

enable-search ‘#t’, if the user can search interactively

[Function] gtk-tree-view-get-enable-search (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-enable-search

Returns whether or not the tree allows to start interactive searching by typing in text.

tree-view A <gtk-tree-view>

ret whether or not to let the user search interactively

[Function] gtk-tree-view-get-search-column (self <gtk-tree-view>)

⇒ (ret int)

[Method] get-search-column

Gets the column searched on by the interactive search code.

tree-view A <gtk-tree-view>

ret the column the interactive search code searches in.

[Function] gtk-tree-view-set-search-column (self <gtk-tree-view>)

(column int)

[Method] set-search-column

Sets column as the column where the interactive search code should search in. If the sort column is set, users can use the "start-interactive-search" key binding to bring up search popup. The enable-search property controls whether simply typing text will also start an interactive search. Note that column refers to a column of the model.

tree-view A <gtk-tree-view>

column the column of the model to search in, or -1 to disable searching

[Function] gtk-tree-view-get-search-entry (self <gtk-tree-view>)
   ⇒ (ret <gtk-entry>)
[Method] get-search-entry

Returns the GtkEntry which is currently in use as interactive search entry for treeview. In case the built-in entry is being used, ‘#f’ will be returned.

tree-view A <gtk-tree-view>

ret the entry currently in use as search entry.

Since 2.10

[Function] gtk-tree-view-set-search-entry (self <gtk-tree-view>)
   (entry <gtk-entry>)
[Method] set-search-entry

Sets the entry which the interactive search code will use for this tree-view. This is useful when you want to provide a search entry in our interface at all time at a fixed position. Passing ‘#f’ for entry will make the interactive search code use the built-in popup entry again.

tree-view A <gtk-tree-view>

entry the entry the interactive search code of tree-view should use or ‘#f’

Since 2.10

[Function] gtk-tree-view-get-fixed-height-mode (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-fixed-height-mode

Returns whether fixed height mode is turned on for tree-view.

tree-view a <gtk-tree-view>

ret ‘#t’ if tree-view is in fixed height mode

Since 2.6

[Function] gtk-tree-view-set-fixed-height-mode (self <gtk-tree-view>)

(enable bool)

[Method] set-fixed-height-mode

Enables or disables the fixed height mode of tree-view. Fixed height mode speeds up <gtk-tree-view> by assuming that all rows have the same height. Only enable this option if all rows are the same height and all columns are of type

‘GTK_TREE_VIEW_COLUMN_FIXED’.
tree-view a <gtk-tree-view>

enable ‘#t’ to enable fixed height mode

Since 2.6

[Function] gtk-tree-view-get-hover-selection (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-hover-selection

Returns whether hover selection mode is turned on for tree-view.

tree-view a <gtk-tree-view>

ret ‘#t’ if tree-view is in hover selection mode

Since 2.6

[Function] gtk-tree-view-set-hover-selection (self <gtk-tree-view>)

(hover bool)

[Method] set-hover-selection

Enables of disables the hover selection mode of tree-view. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes

‘GTK_SELECTION_SINGLE’ and ‘GTK_SELECTION_BROWSE’.
tree-view a <gtk-tree-view>

hover ‘#t’ to enable hover selection mode

Since 2.6

[Function] gtk-tree-view-get-hover-expand (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-hover-expand

Returns whether hover expansion mode is turned on for tree-view.

tree-view a <gtk-tree-view>

ret ‘#t’ if tree-view is in hover expansion mode

Since 2.6

[Function] gtk-tree-view-set-hover-expand (self <gtk-tree-view>)

(expand bool)

[Method] set-hover-expand

Enables of disables the hover expansion mode of tree-view. Hover expansion makes rows expand or collaps if the pointer moves over them.

tree-view a <gtk-tree-view>

expand ‘#t’ to enable hover selection mode

[Function] gtk-tree-view-get-rubber-banding (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-rubber-banding

Returns whether rubber banding is turned on for tree-view. If the selection mode is <gtk-selection-multiple>, rubber banding will allow the user to select multiple rows by dragging the mouse.

tree-view a <gtk-tree-view>

ret ‘#t’ if rubber banding in tree-view is enabled.

Since 2.10

[Function] gtk-tree-view-set-rubber-banding (self <gtk-tree-view>)

(enable bool)

[Method] set-rubber-banding

Enables or disables rubber banding in tree-view. If the selection mode is <gtkselection-multiple>, rubber banding will allow the user to select multiple rows by dragging the mouse.

tree-view a <gtk-tree-view>

enable ‘#t’ to enable rubber banding

Since 2.10

[Function] gtk-tree-view-get-enable-tree-lines (self <gtk-tree-view>)

⇒ (ret bool)

[Method] get-enable-tree-lines

Returns whether or not tree lines are drawn in tree-view.

tree-view a <gtk-tree-view>.

ret ‘#t’ if tree lines are drawn in tree-view, ‘#f’ otherwise.

Since 2.10

[Function] gtk-tree-view-set-enable-tree-lines (self <gtk-tree-view>)

(enabled bool)

[Method] set-enable-tree-lines

Sets whether to draw lines interconnecting the expanders in tree-view. This does not have any visible effects for lists.

tree-view a <gtk-tree-view>

enabled ‘#t’ to enable tree line drawing, ‘#f’ otherwise.

Since 2.10

[Function] gtk-tree-view-get-grid-lines (self <gtk-tree-view>)
   ⇒ (ret <gtk-tree-view-grid-lines>)
[Method] get-grid-lines

Returns which grid lines are enabled in tree-view.

tree-view a <gtk-tree-view>

ret a <gtk-tree-view-grid-lines> value indicating which grid lines are enabled.

Since 2.10

[Function] gtk-tree-view-set-grid-lines (self <gtk-tree-view>)
   (grid lines <gtk-tree-view-grid-lines>)
[Method] set-grid-lines

Sets which grid lines to draw in tree-view.

tree-view a <gtk-tree-view>

grid-lines a <gtk-tree-view-grid-lines> value indicating which grid lines to enable.

Since 2.10

36 GtkTreeView drag-and-drop

Interfaces for drag-and-drop support in GtkTreeView

36.1 Overview

GTK+ supports Drag-and-Drop in tree views with a high-level and a low-level API.

The low-level API consists of the GTK+ DND API, augmented by some treeview utility

functions: gtk-tree-view-set-drag-dest-row, gtk-tree-view-get-drag-dest-row,
gtk-tree-view-get-dest-row-at-pos,  gtk-tree-view-create-row-drag-icon,
gtk-tree-set-row-drag-data and gtk-tree-get-row-drag-data. This API leaves a lot

of flexibility, but nothing is done automatically, and implementing advanced features like hover-to-open-rows or autoscrolling on top of this API is a lot of work.

On the other hand, if you write to the high-level API, then all the bookkeeping of rows is done for you, as well as things like hover-to-open and auto-scroll, but your models have

to implement the <gtk-tree-drag-source> and <gtk-tree-drag-dest> interfaces.

36.2 Usage

[Class] <gtk-tree-drag-source>
Derives from <ginterface>.

This class defines no direct slots.

[Class] <gtk-tree-drag-dest>
Derives from <ginterface>.

This class defines no direct slots.

[Function] gtk-tree-drag-source-drag-data-get
   (self <gtk-tree-drag-source>) (path <gtk-tree-path>)
   (selection data <gtk-selection-data>) ⇒ (ret bool)
[Method] drag-data-get

Asks the <gtk-tree-drag-source> to fill in selection-data with a representation of the row at path. selection-data->target gives the required type of the data. Should robustly handle a path no longer found in the model!

drag-source

          a <gtk-tree-drag-source>

path row that was dragged

selection-data a <gtk-selection-data> to fill with data from the dragged row

ret ‘#t’ if data of the required type was provided

[Function] gtk-tree-drag-source-row-draggable
   (self <gtk-tree-drag-source>) (path <gtk-tree-path>) ⇒ (ret bool)
[Method] row-draggable

Asks the <gtk-tree-drag-source> whether a particular row can be used as the source of a DND operation. If the source doesn’t implement this interface, the row is assumed draggable. drag-source

          a <gtk-tree-drag-source>

path row on which user is initiating a drag

ret ‘#t’ if the row can be dragged

[Function] gtk-tree-set-row-drag-data (self <gtk-selection-data>)
   (tree model <gtk-tree-model>) (path <gtk-tree-path>) ⇒ (ret bool)

Sets selection data of target type ‘GTK_TREE_MODEL_ROW’. Normally used in a drag data get handler.

selection-data

          some <gtk-selection-data>

tree-model

          a <gtk-tree-model>

path a row in tree-model

ret ‘#t’ if the <gtk-selection-data> had the proper target type to allow us to set a tree row

37 GtkCellView

A widget displaying a single row of a GtkTreeModel

37.1 Overview

A <gtk-cell-view> displays a single row of a <gtk-tree-model>, using cell renderers just like <gtk-tree-view>. <gtk-cell-view> doesn’t support some of the more complex features of <gtk-tree-view>, like cell editing and drag and drop.

37.2 Usage

[Class] <gtk-cell-view>
Derives from <gtk-cell-layout>, <gtk-widget>.

This class defines the following slots:

background

Background color as a string

background-gdk

Background color as a GdkColor

background-set

Whether this tag affects the background color

model The model for cell view

[Function] gtk-cell-view-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-cell-view> widget.

ret A newly created <gtk-cell-view> widget.

Since 2.6

[Function] gtk-cell-view-new-with-text (text mchars) ⇒ (ret <gtk-widget>)
Creates a new <gtk-cell-view> widget, adds a <gtk-cell-renderer-text> to it,

and makes its show text.

text the text to display in the cell view

ret A newly created <gtk-cell-view> widget.

Since 2.6

[Function] gtk-cell-view-new-with-markup (markup mchars)
   ⇒ (ret <gtk-widget>)
Creates a new <gtk-cell-view> widget, adds a <gtk-cell-renderer-text> to it,

and makes its show markup. The text can text can be marked up with the Pango text markup language.

markup the text to display in the cell view

ret A newly created <gtk-cell-view> widget.

Since 2.6

[Function] gtk-cell-view-new-with-pixbuf (pixbuf <gdk-pixbuf>)
   ⇒ (ret <gtk-widget>)
Creates a new <gtk-cell-view> widget, adds a <gtk-cell-renderer-pixbuf> to

it, and makes its show pixbuf.

pixbuf the image to display in the cell view

ret A newly created <gtk-cell-view> widget.

Since 2.6

[Function] gtk-cell-view-set-model (self <gtk-cell-view>)
   (model <gtk-tree-model>)
[Method] set-model

Sets the model for cell-view. If cell-view already has a model set, it will remove it before setting the new model. If model is ‘#f’, then it will unset the old model.

cell-view a <gtk-cell-view>
model  a <gtk-tree-model>

Since 2.6

[Function] gtk-cell-view-set-displayed-row (self <gtk-cell-view>)
   (path <gtk-tree-path>)
[Method] set-displayed-row

Sets the row of the model that is currently displayed by the <gtk-cell-view>. If the path is unset, then the contents of the cellview "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 <gtk-cell-view> becomes temporarily empty.

cell-view a <gtk-cell-view>
path  a <gtk-tree-path> or ‘#f’ to unset.

Since 2.6

[Function] gtk-cell-view-get-displayed-row (self <gtk-cell-view>)
   ⇒ (ret <gtk-tree-path>)
[Method] get-displayed-row

Returns a <gtk-tree-path> referring to the currently displayed row. If no row is currently displayed, ‘#f’ is returned.

cell-view a <gtk-cell-view>

ret the currently displayed row or ‘#f’

Since 2.6

[Function] gtk-cell-view-get-size-of-row (self <gtk-cell-view>)
   (path <gtk-tree-path>) (requisition <gtk-requisition>) ⇒ (ret bool)
[Method] get-size-of-row

Sets requisition to the size needed by cell-view to display the model row pointed to by path.

cell-view a <gtk-cell-view>

path  a <gtk-tree-path>

requisition return location for the size ret ‘#t’ Since 2.6

[Function] gtk-cell-view-set-background-color (self <gtk-cell-view>)
   (color <gdk-color>)
[Method] set-background-color

Sets the background color of view.

cell-view a <gtk-cell-view>

color the new background color Since 2.6

[Function] gtk-cell-view-get-cell-renderers (self <gtk-cell-view>)
   ⇒ (ret glist-of)
[Method] get-cell-renderers

Returns the cell renderers which have been added to cell-view.

cell-view a <gtk-cell-view>

ret a list of cell renderers. The list, but not the renderers has been newly

allocated and should be freed with g-list-free when no longer needed.

Since 2.6

38 GtkIconView

A widget which displays a list of icons in a grid

38.1 Overview

<gtk-icon-view> provides an alternative view on a list model. It displays the model as a grid of icons with labels. Like <gtk-tree-view>, it allows to select one or multiple items (depending on the selection mode, see gtk-icon-view-set-selection-mode). In addition to selection with the arrow keys, <gtk-icon-view> supports rubberband selection, which is controlled by dragging the pointer.

38.2 Usage

[Class] <gtk-icon-view>
Derives from <gtk-cell-layout>, <gtk-container>.

This class defines the following slots:

pixbuf-column

Model column used to retrieve the icon pixbuf from

text-column

Model column used to retrieve the text from

markup-column

Model column used to retrieve the text if using Pango markup

selection-mode

The selection mode

orientation

How the text and icon of each item are positioned relative to each other

model The model for the icon view

columns Number of columns to display

item-width

The width used for each item

spacing Space which is inserted between cells of an item

row-spacing

Space which is inserted between grid rows

column-spacing

Space which is inserted between grid columns

margin Space which is inserted at the edges of the icon view

reorderable

View is reorderable

tooltip-column

The column in the model containing the tooltip texts for the items

[Signal on <gtk-icon-view>] move-cursor (arg0 <gtk-movement-step>)
        (arg1 <gint>) ⇒ <gboolean>
[Signal on <gtk-icon-view>] selection-changed
[Signal on <gtk-icon-view>] set-scroll-adjustments
        (arg0 <gtk-adjustment>) (arg1 <gtk-adjustment>)
[Signal on <gtk-icon-view>] item-activated (arg0 <gtk-tree-path>)
[Signal on <gtk-icon-view>] select-all
[Signal on <gtk-icon-view>] unselect-all
[Signal on <gtk-icon-view>] select-cursor-item
[Signal on <gtk-icon-view>] toggle-cursor-item
[Signal on <gtk-icon-view>] activate-cursor-item ⇒ <gboolean>
[Function] gtk-icon-view-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-icon-view> widget

ret A newly created <gtk-icon-view> widget

Since 2.6

[Function] gtk-icon-view-new-with-model (model <gtk-tree-model>)
        ⇒ (ret <gtk-widget>)

Creates a new <gtk-icon-view> widget with the model model.

model The model.

ret A newly created <gtk-icon-view> widget.

Since 2.6

[Function] gtk-icon-view-set-model (self <gtk-icon-view>)
        (model <gtk-tree-model>)
[Method] set-model

Sets the model for a <gtk-icon-view>. If the icon-view already has a model set, it will remove it before setting the new model. If model is ‘#f’, then it will unset the old model.

     icon-view A <gtk-icon-view>.

model The model.

Since 2.6

[Function] gtk-icon-view-get-model (self <gtk-icon-view>)
        ⇒ (ret <gtk-tree-model>)
[Method] get-model

Returns the model the <gtk-icon-view> is based on. Returns ‘#f’ if the model is unset.

     icon-view a <gtk-icon-view>

ret A <gtk-tree-model>, or ‘#f’ if none is currently being used.

Since 2.6

[Function] gtk-icon-view-set-text-column (self <gtk-icon-view>)

(column int)

[Method] set-text-column

Sets the column with text for icon-view to be column. The text column must be of

type <g-type-string>.
icon-view A <gtk-icon-view>.

column A column in the currently used model.

Since 2.6

[Function] gtk-icon-view-get-text-column (self <gtk-icon-view>)

⇒ (ret int)

[Method] get-text-column

Returns the column with text for icon-view.

icon-view A <gtk-icon-view>.

ret the text column, or -1 if it’s unset.

Since 2.6

[Function] gtk-icon-view-set-markup-column (self <gtk-icon-view>)

(column int)

[Method] set-markup-column

Sets the column with markup information for icon-view to be column. The markup column must be of type <g-type-string>. If the markup column is set to something, it overrides the text column set by gtk-icon-view-set-text-column.

icon-view A <gtk-icon-view>.

column A column in the currently used model.

Since 2.6

[Function] gtk-icon-view-get-markup-column (self <gtk-icon-view>)

⇒ (ret int)

[Method] get-markup-column

Returns the column with markup text for icon-view.

icon-view A <gtk-icon-view>.

ret the markup column, or -1 if it’s unset.

Since 2.6

[Function] gtk-icon-view-set-pixbuf-column (self <gtk-icon-view>)

(column int)

[Method] set-pixbuf-column

Sets the column with pixbufs for icon-view to be column. The pixbuf column must

be of type <gdk-type-pixbuf>
icon-view A <gtk-icon-view>.

column A column in the currently used model.

Since 2.6

[Function] gtk-icon-view-get-pixbuf-column (self <gtk-icon-view>)

⇒ (ret int)

[Method] get-pixbuf-column

Returns the column with pixbufs for icon-view.

icon-view A <gtk-icon-view>.

ret the pixbuf column, or -1 if it’s unset.

Since 2.6

[Function] gtk-icon-view-get-path-at-pos (self <gtk-icon-view>) (x int)
   (y int) ⇒ (ret <gtk-tree-path>)
[Method] get-path-at-pos

Finds the path at the point (x, y), relative to widget coordinates. See gtk-icon-view-get-item-at-pos, if you are also interested in the cell at the specified position.

icon-view A <gtk-icon-view>.

x The x position to be identified

y The y position to be identified

ret The <gtk-tree-path> corresponding to the icon or ‘#f’ if no icon exists at that position.

Since 2.6

[Function] gtk-icon-view-set-cursor (self <gtk-icon-view>)
   (path <gtk-tree-path>) (cell <gtk-cell-renderer>) (start editing bool)
[Method] set-cursor

Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user’s attention on a particular item. If cell is not ‘#f’, then focus is given to the cell specified by it. Additionally, if start-editing is ‘#t’, then editing should be started in the specified cell. This function is often followed by ‘gtk_widget_grab_focus (icon_view)’ in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.

icon-view A <gtk-icon-view>
path  A <gtk-tree-path>

cell One of the cell renderers of icon-view, or ‘#f’

start-editing ‘#t’ if the specified cell should start being edited.

Since 2.8

[Function] gtk-icon-view-set-selection-mode (self <gtk-icon-view>)
   (mode <gtk-selection-mode>)
[Method] set-selection-mode

Sets the selection mode of the icon-view.

icon-view A <gtk-icon-view>.

mode The selection mode

Since 2.6

[Function] gtk-icon-view-get-selection-mode (self <gtk-icon-view>)
   ⇒ (ret <gtk-selection-mode>)
[Method] get-selection-mode

Gets the selection mode of the icon-view.

icon-view A <gtk-icon-view>.

ret the current selection mode

Since 2.6

[Function] gtk-icon-view-set-orientation (self <gtk-icon-view>)
   (orientation <gtk-orientation>)
[Method] set-orientation

Sets the ::orientation property which determines whether the labels are drawn beside the icons instead of below.

icon-view a <gtk-icon-view>

orientation the relative position of texts and icons

Since 2.6

[Function] gtk-icon-view-get-orientation (self <gtk-icon-view>)
   ⇒ (ret <gtk-orientation>)
[Method] get-orientation

Returns the value of the ::orientation property which determines whether the labels are drawn beside the icons instead of below.

icon-view a <gtk-icon-view>

ret the relative position of texts and icons

Since 2.6

[Function] gtk-icon-view-set-columns (self <gtk-icon-view>) (columns int)
[Method] set-columns

Sets the ::columns property which determines in how many columns the icons are arranged. If columns is -1, the number of columns will be chosen automatically to fill the available area.

icon-view a <gtk-icon-view>

columns the number of columns

Since 2.6

[Function] gtk-icon-view-get-columns (self <gtk-icon-view>) ⇒ (ret int)
[Method] get-columns

Returns the value of the ::columns property.

icon-view a <gtk-icon-view>

ret the number of columns, or -1

Since 2.6

[Function] gtk-icon-view-set-item-width (self <gtk-icon-view>)

(item width int)

[Method] set-item-width

Sets the ::item-width property which specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.

icon-view a <gtk-icon-view>

item-width the width for each item

Since 2.6

[Function] gtk-icon-view-get-item-width (self <gtk-icon-view>)

⇒ (ret int)

[Method] get-item-width

Returns the value of the ::item-width property.

icon-view a <gtk-icon-view>

ret the width of a single item, or -1

Since 2.6

[Function] gtk-icon-view-set-spacing (self <gtk-icon-view>) (spacing int)
[Method] set-spacing

Sets the ::spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.

icon-view a <gtk-icon-view>

spacing the spacing

Since 2.6

[Function] gtk-icon-view-get-spacing (self <gtk-icon-view>) ⇒ (ret int)
[Method] get-spacing

Returns the value of the ::spacing property.

icon-view a <gtk-icon-view>

ret the space between cells

Since 2.6

[Function] gtk-icon-view-set-row-spacing (self <gtk-icon-view>)

(row spacing int)

[Method] set-row-spacing

Sets the ::row-spacing property which specifies the space which is inserted between the rows of the icon view.

icon-view a <gtk-icon-view>

row-spacing

the row spacing

Since 2.6

[Function] gtk-icon-view-get-row-spacing (self <gtk-icon-view>)

⇒ (ret int)

[Method] get-row-spacing

Returns the value of the ::row-spacing property.

icon-view a <gtk-icon-view>

ret the space between rows Since 2.6

[Function] gtk-icon-view-set-column-spacing (self <gtk-icon-view>)

(column spacing int)

[Method] set-column-spacing

Sets the ::column-spacing property which specifies the space which is inserted between the columns of the icon view.

icon-view a <gtk-icon-view>

column-spacing

the column spacing

Since 2.6

[Function] gtk-icon-view-get-column-spacing (self <gtk-icon-view>)

⇒ (ret int)

[Method] get-column-spacing

Returns the value of the ::column-spacing property.

icon-view a <gtk-icon-view>

ret the space between columns Since 2.6

[Function] gtk-icon-view-set-margin (self <gtk-icon-view>) (margin int)
[Method] set-margin

Sets the ::margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.

icon-view a <gtk-icon-view>

margin the margin Since 2.6

[Function] gtk-icon-view-get-margin (self <gtk-icon-view>) ⇒ (ret int)
[Method] get-margin

Returns the value of the ::margin property.

icon-view a <gtk-icon-view>

ret the space at the borders

Since 2.6

[Function] gtk-icon-view-select-path (self <gtk-icon-view>)
   (path <gtk-tree-path>)
[Method] select-path

Selects the row at path.

icon-view A <gtk-icon-view>.

path The <gtk-tree-path> to be selected.

Since 2.6

[Function] gtk-icon-view-unselect-path (self <gtk-icon-view>)
   (path <gtk-tree-path>)
[Method] unselect-path

Unselects the row at path.

icon-view A <gtk-icon-view>.

path The <gtk-tree-path> to be unselected.

Since 2.6

[Function] gtk-icon-view-path-is-selected (self <gtk-icon-view>)
   (path <gtk-tree-path>) ⇒ (ret bool)
[Method] path-is-selected

Returns ‘#t’ if the icon pointed to by path is currently selected. If icon does not point to a valid location, ‘#f’ is returned.

icon-view A <gtk-icon-view>.

path A <gtk-tree-path> to check selection on.

ret ‘#t’ if path is selected.

Since 2.6

[Function] gtk-icon-view-get-selected-items (self <gtk-icon-view>)
   ⇒ (ret glist-of)
[Method] get-selected-items

Creates a list of paths of all selected items. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of <gtk-tree-row-reference>s. To do this, you can use gtk-tree-

row-reference-new.

To free the return value, use:

     g_list_foreach (list, gtk_tree_path_free, NULL);
     g_list_free (list);
icon-view A <gtk-icon-view>.

ret A <g-list> containing a <gtk-tree-path> for each selected row.

Since 2.6

[Function] gtk-icon-view-select-all (self <gtk-icon-view>)
[Method] select-all

Selects all the icons. icon-view must has its selection mode set to <gtk-selection-

multiple>.
icon-view A <gtk-icon-view>.

Since 2.6

[Function] gtk-icon-view-unselect-all (self <gtk-icon-view>)
[Method] unselect-all

Unselects all the icons.

icon-view A <gtk-icon-view>.

Since 2.6

[Function] gtk-icon-view-item-activated (self <gtk-icon-view>)
   (path <gtk-tree-path>)
[Method] item-activated

Activates the item determined by path.

icon-view A <gtk-icon-view>

path The <gtk-tree-path> to be activated

Since 2.6

[Function] gtk-icon-view-scroll-to-path (self <gtk-icon-view>)

(path <gtk-tree-path>) (use align bool) (row align float)

(col align float)

[Method] scroll-to-path

Moves the alignments of 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 ‘#f’, then the alignment arguments are ignored, and the tree 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 function 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.

icon-view A <gtk-icon-view>.

path The path of the item to move to.

use-align whether to use alignment arguments, or ‘#f’.

row-align The vertical alignment of the item specified by path. col-align The horizontal alignment of the item specified by path.

Since 2.8

[Function] gtk-icon-view-unset-model-drag-dest (self <gtk-icon-view>)
[Method] unset-model-drag-dest
Undoes the effect of gtk-icon-view-enable-model-drag-dest.
icon-view a <gtk-icon-view>

Since 2.8

[Function] gtk-icon-view-set-reorderable (self <gtk-icon-view>)

(reorderable bool)

[Method] set-reorderable

This function is a convenience function to allow you to reorder models that support

the <gtk-tree-drag-source-iface> and the <gtk-tree-drag-dest-iface>. Both

<gtk-tree-store> and <gtk-list-store> support these. If reorderable is ‘#t’, then 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 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.

icon-view A <gtk-icon-view>.

reorderable ‘#t’, if the list of items can be reordered.

Since 2.8

[Function] gtk-icon-view-get-reorderable (self <gtk-icon-view>)

⇒ (ret bool)

[Method] get-reorderable

Retrieves whether the user can reorder the list via drag-and-drop. See gtk-icon-

view-set-reorderable.
icon-view a <gtk-icon-view>

ret ‘#t’ if the list can be reordered.

Since 2.8

[Function] gtk-icon-view-set-drag-dest-item (self <gtk-icon-view>)
   (path <gtk-tree-path>) (pos <gtk-icon-view-drop-position>)
[Method] set-drag-dest-item

Sets the item that is highlighted for feedback.

icon-view a <gtk-icon-view>

path The path of the item to highlight, or ‘#f’.

pos Specifies where to drop, relative to the item

Since 2.8

[Function] gtk-icon-view-create-drag-icon (self <gtk-icon-view>)
   (path <gtk-tree-path>) ⇒ (ret <gdk-pixmap>)
[Method] create-drag-icon

Creates a <gdk-pixmap> representation of the item at path. This image is used for a drag icon.

icon-view a <gtk-icon-view>

path a <gtk-tree-path> in icon-view

ret a newly-allocated pixmap of the drag icon.

Since 2.8

39 GtkTreeSortable

The interface for sortable models used by GtkTreeView

39.1 Overview

<gtk-tree-sortable> is an interface to be implemented by tree models which support sorting. The <gtk-tree-view> uses the methods provided by this interface to sort the model.

39.2 Usage

[Class] <gtk-tree-sortable>
     Derives from <ginterface>.

This class defines no direct slots.

[Signal on <gtk-tree-sortable>] sort-column-changed

40 GtkTreeModelSort

A GtkTreeModel which makes an underlying tree model sortable

40.1 Overview

The <gtk-tree-model-sort> is a model which implements the <gtk-tree-sortable> in-

terface. It does not hold any data itself, but rather is created with a child model and proxies its data. It has identical column types to this child model, and the changes in the child are propagated. The primary purpose of this model is to provide a way to sort a different model without modifying it. Note that the sort function used by <gtk-tree-model-sort> is not guaranteed to be stable.

The use of this is best demonstrated through an example. In the following sample code we create two <gtk-tree-view> widgets each with a view of the same data. As the model

is wrapped here by a <gtk-tree-model-sort>, the two <gtk-tree-view>s can each sort

their view of the data without affecting the other. By contrast, if we simply put the same model in each widget, then sorting the first would sort the second.

{
GtkTreeView *tree_view1;
GtkTreeView *tree_view2;
GtkTreeModel *sort_model1;
GtkTreeModel *sort_model2;
GtkTreeModel *child_model;
/* get the child model */
child_model = get_my_model ();
/* Create the first tree */
sort_model1 = gtk_tree_model_sort_new_with_model (child_model);
tree_view1 = gtk_tree_view_new_with_model (sort_model1);
/* Create the second tree */
sort_model2 = gtk_tree_model_sort_new_with_model (child_model);
tree_view2 = gtk_tree_view_new_with_model (sort_model2);
/* Now we can sort the two models independently */
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model1),
                                      COLUMN_1, GTK_SORT_ASCENDING);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model2),
                                      COLUMN_1, GTK_SORT_DESCENDING);
}

To demonstrate how to access the underlying child model from the sort model, the next example will be a callback for the <gtk-tree-selection> "changed" signal. In this callback, we get a string from COLUMN 1 of the model. We then modify the string, find the same selected row on the child model, and change the row there.

void
selection_changed (GtkTreeSelection *selection, gpointer data)
{
GtkTreeModel *sort_model = NULL;
GtkTreeModel *child_model;
GtkTreeIter sort_iter;
GtkTreeIter child_iter;
char *some_data = NULL;
char *modified_data;
/* Get the current selected row and the model. */
if (! gtk_tree_selection_get_selected (selection,
                                       &sort_model,
                                       &sort_iter))
  return;

/* Look up the current value on the selected row and get a new value
 * to change it to.
 */
gtk_tree_model_get (GTK_TREE_MODEL (sort_model), &sort_iter,
                    COLUMN_1, &some_data,
                    -1);
modified_data = change_the_data (some_data);
g_free (some_data);
/* Get an iterator on the child model, instead of the sort model. */
gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (sort_model),
                                                &child_iter,
                                                &sort_iter);
/* Get the child model and change the value of the row.  In this
 * example, the child model is a GtkListStore.  It could be any other
 * type of model, though.
 */
child_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model));
gtk_list_store_set (GTK_LIST_STORE (child_model), &child_iter,
                    COLUMN_1, &modified_data,
                    -1);
g_free (modified_data);
}

40.2 Usage

[Class] <gtk-tree-model-sort>
Derives from <gtk-tree-model>, <gtk-tree-sortable>, <gtk-tree-drag-source>,
<gobject>.

This class defines the following slots:

model The model for the TreeModelSort to sort

[Function] gtk-tree-model-sort-new-with-model
   (child model <gtk-tree-model>) ⇒ (ret <gtk-tree-model>)

Creates a new <gtk-tree-model>, with child-model as the child model.

child-model

          A <gtk-tree-model>
ret  A new <gtk-tree-model>.
[Function] gtk-tree-model-sort-get-model (self <gtk-tree-model-sort>)
   ⇒ (ret <gtk-tree-model>)
[Method] get-model

Returns the model the <gtk-tree-model-sort> is sorting.

tree-model

          a <gtk-tree-model-sort>

ret the "child model" being sorted

[Function] gtk-tree-model-sort-clear-cache (self <gtk-tree-model-sort>)
[Method] clear-cache

This function should almost never be called. It clears the tree-model-sort of any cached iterators that haven’t been reffed with gtk-tree-model-ref-node. 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 iters will be invalid.

tree-model-sort

          A <gtk-tree-model-sort>
[Function] gtk-tree-model-sort-iter-is-valid
   (self <gtk-tree-model-sort>) (iter <gtk-tree-iter>) ⇒ (ret bool)
[Method] iter-is-valid

This function is slow. Only use it for debugging and/or testing purposes. Checks if the given iter is a valid iter for this <gtk-tree-model-sort>.

tree-model-sort

          A <gtk-tree-model-sort>.
iter  A <gtk-tree-iter>.

ret ‘#t’ if the iter is valid, ‘#f’ if the iter is invalid.

Since 2.2

41 GtkTreeModelFilter

A GtkTreeModel which hides parts of an underlying tree model

41.1 Overview

A <gtk-tree-model-filter> 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 model based on the given child model.

Set a different root node, also known as a "virtual root". You can pass in a <gtk-tree-path> indicating the root node for the filter at construction time.

41.2 Usage

[Class] <gtk-tree-model-filter>
Derives from <gtk-tree-model>, <gtk-tree-drag-source>, <gobject>.

This class defines the following slots:

child-model

The model for the filtermodel to filter

virtual-root

The virtual root (relative to the child model) for this filtermodel

[Function] gtk-tree-model-filter-new (self <gtk-tree-model>)
   (root <gtk-tree-path>) ⇒ (ret <gtk-tree-model>)
[Method] filter-new

Creates a new <gtk-tree-model>, with child-model as the child model and root as the virtual root.

child-model

          A <gtk-tree-model>.
root  A <gtk-tree-path> or ‘#f’.
ret  A new <gtk-tree-model>.

Since 2.4

[Function] gtk-tree-model-filter-get-model
   (self <gtk-tree-model-filter>) ⇒ (ret <gtk-tree-model>)
[Method] get-model

Returns a pointer to the child model of filter.

filter  A <gtk-tree-model-filter>.

ret  A pointer to a <gtk-tree-model>.

Since 2.4

[Function] gtk-tree-model-filter-refilter (self <gtk-tree-model-filter>)
[Method] refilter

Emits ::row changed for each row in the child model, which causes the filter to reevaluate whether a row is visible or not.

filter  A <gtk-tree-model-filter>.

Since 2.4

[Function] gtk-tree-model-filter-clear-cache
   (self <gtk-tree-model-filter>)
[Method] clear-cache

This function should almost never be called. It clears the filter of any cached iterators that haven’t been reffed with gtk-tree-model-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.

filter  A <gtk-tree-model-filter>.

Since 2.4

42 GtkCellLayout

An interface for packing cells

42.1 Overview

<gtk-cell-layout> is an interface to be implemented by all objects which want to provide a <gtk-tree-view-column-like> API for packing cells, setting attributes and data funcs.

One of the notable features provided by implementations of GtkCellLayout are attributes. Attributes let you set the properties in flexible ways. They can just be set to constant values like regular properties. But they can also be mapped to a column of the underlying tree model with gtk-cell-layout-set-attributes, which means that the value of the attribute can change from cell to cell as they are rendered by the cell renderer. Finally, it is possible to specify a function with gtk-cell-layout-set-cell-data-func that is called to determine the value of the attribute for each cell that is rendered.

42.2 Usage

[Class] <gtk-cell-layout>
Derives from <ginterface>.

This class defines no direct slots.

[Function] gtk-cell-layout-pack-start (self <gtk-cell-layout>)
   (cell <gtk-cell-renderer>) (expand bool)
[Method] pack-start

Packs the cell into the beginning of cell-layout. If expand is ‘#f’, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is ‘#t’. Note that reusing the same cell renderer is not supported.

cell-layout A <gtk-cell-layout>.
cell  A <gtk-cell-renderer>.

expand ‘#t’ if cell is to be given extra space allocated to cell-layout.

Since 2.4

[Function] gtk-cell-layout-pack-end (self <gtk-cell-layout>)
   (cell <gtk-cell-renderer>) (expand bool)
[Method] pack-end

Adds the cell to the end of cell-layout. If expand is ‘#f’, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is ‘#t’. Note that reusing the same cell renderer is not supported.

cell-layout A <gtk-cell-layout>.
cell  A <gtk-cell-renderer>.

expand ‘#t’ if cell is to be given extra space allocated to cell-layout.

Since 2.4

[Function] gtk-cell-layout-reorder (self <gtk-cell-layout>)
   (cell <gtk-cell-renderer>) (position int)

[Method] reorder

Re-inserts cell at position. Note that cell has already to be packed into cell-layout for this to function properly.

cell-layout A <gtk-cell-layout>.
cell  A <gtk-cell-renderer> to reorder.

position New position to insert cell at.

Since 2.4

[Function] gtk-cell-layout-clear (self <gtk-cell-layout>)

[Method] clear

Unsets all the mappings on all renderers on cell-layout and removes all renderers from cell-layout.

cell-layout A <gtk-cell-layout>.

Since 2.4

[Function] gtk-cell-layout-add-attribute (self <gtk-cell-layout>)
   (cell <gtk-cell-renderer>) (attribute mchars) (column int)
[Method] add-attribute

Adds an attribute mapping to the list in cell-layout. The column is the column of the model to get a value from, and the attribute is the parameter on 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-cell-renderer-text> get its values from column 2.

cell-layout A <gtk-cell-layout>.
cell  A <gtk-cell-renderer>.

attribute An attribute on the renderer.

column The column position on the model to get the attribute from.

Since 2.4

[Function] gtk-cell-layout-clear-attributes (self <gtk-cell-layout>)
   (cell <gtk-cell-renderer>)
[Method] clear-attributes

Clears all existing attributes previously set with gtk-cell-layout-set-attributes.

cell-layout A <gtk-cell-layout>.

cell A <gtk-cell-renderer> to clear the attribute mapping on.

Since 2.4

43 GtkCellRenderer

An object for rendering a single cell on a

43.1 Overview

The <gtk-cell-renderer> is a base class of a set of objects used for rendering a cell to a <gdk-drawable>. These objects are used primarily by the <gtk-tree-view> widget, though they aren’t tied to them in any specific way. It is worth noting that <gtk-cell-renderer> is not a <gtk-widget> and cannot be treated as such.

The primary use of a <gtk-cell-renderer> is for drawing a certain graphical elements on a <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 <gobject>s property system. Then, the cell is measured using gtk-cell-renderer-get-size. Finally, the cell is rendered in

the correct location using gtk-cell-renderer-render.

There are a number of rules that must be followed when writing a new <gtk-cell-renderer>. First and formost, it’s important that a certain set of properties will always yield a cell renderer of the same size, barring a <gtk-style> change. The <gtk-cell-renderer> also has a number of generic properties that are expected to be honored by all children.

Beyond merely rendering a cell, cell renderers can optionally provide active user interface elements. A cell renderer can be activatable like <gtk-cell-renderer-toggle>, which toggles when it gets activated by a mouse click, or it can be editable like <gtk-cell-renderer-text>, which allows the user to edit the text using a <gtk-entry>. To make a cell renderer activatable or editable, you have to implement the activate or start-editing virtual functions, respectively.

43.2 Usage

[Class] <gtk-cell-renderer>
     Derives from <gtk-object>.

This class defines the following slots:

mode Editable mode of the CellRenderer

visible Display the cell

     sensitive

Display the cell sensitive

xalign The x-align

yalign The y-align

xpad The xpad

ypad The ypad

width The fixed width height The fixed height

is-expander

Row has children

is-expanded

Row is an expander row, and is expanded

cell-background

Cell background color as a string

cell-background-gdk

Cell background color as a GdkColor

cell-background-set

Whether this tag affects the cell background color

[Signal on <gtk-cell-renderer>] editing-canceled

This signal gets 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.

See also: gtk-cell-renderer-editing-canceled

Since 2.4

[Signal on <gtk-cell-renderer>] editing-started
   (arg0 <gtk-cell-editable>) (arg1 <gchararray>)

This signal gets emitted when a cell starts to be edited. The indended use of this signal is to do special setup on editable, e.g. adding a <gtk-entry-completion> or setting up additional columns in a <gtk-combo-box>. 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:

     static void
     text_editing_started (GtkCellRenderer *cell,
                           GtkCellEditable *editable,
                           const gchar     *path,
                           gpointer         data)
     {
       if (GTK_IS_ENTRY (editable))
         {
           GtkEntry *entry = GTK_ENTRY (editable);
           /* ... create a GtkEntryCompletion */
           gtk_entry_set_completion (entry, completion);
         }
     }

Since 2.6

[Function] gtk-cell-renderer-render (self <gtk-cell-renderer>)
   (window <gdk-window>) (widget <gtk-widget>)
   (background area <gdk-rectangle>) (cell area <gdk-rectangle>)
   (expose area <gdk-rectangle>) (flags <gtk-cell-renderer-state>)

[Method] render

Invokes the virtual render function of the <gtk-cell-renderer>. The three passed-in rectangles are areas of window. Most renderers will draw within cell-area; the xalign, yalign, xpad, and ypad fields of the <gtk-cell-renderer> 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.

cell  a <gtk-cell-renderer>

window a <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

[Function] gtk-cell-renderer-activate (self <gtk-cell-renderer>)
   (event <gdk-event>) (widget <gtk-widget>) (path mchars)
   (background area <gdk-rectangle>) (cell area <gdk-rectangle>)
   (flags <gtk-cell-renderer-state>) ⇒ (ret bool)
[Method] activate

Passes an activate event to the cell renderer for possible processing. Some cell renderers may use events; for example, <gtk-cell-renderer-toggle> toggles when it gets a mouse click.

cell  a <gtk-cell-renderer>
event  a <gdk-event>

widget widget that received the event

path widget-dependent string representation of the event location; e.g. for

          <gtk-tree-view>, a string representation of <gtk-tree-path>

background-area background area as passed to gtk-cell-renderer-render

cell-area cell area as passed to gtk-cell-renderer-render

flags render flags

ret ‘#t’ if the event was consumed/handled

[Function] gtk-cell-renderer-start-editing (self <gtk-cell-renderer>)
   (event <gdk-event>) (widget <gtk-widget>) (path mchars)
   (background area <gdk-rectangle>) (cell area <gdk-rectangle>)
   (flags <gtk-cell-renderer-state>) ⇒ (ret <gtk-cell-editable>)
[Method] start-editing

Passes an activate event to the cell renderer for possible processing.

cell  a <gtk-cell-renderer>
event  a <gdk-event>

widget widget that received the event

path widget-dependent string representation of the event location; e.g. for

          <gtk-tree-view>, a string representation of <gtk-tree-path>

background-area background area as passed to gtk-cell-renderer-render

cell-area cell area as passed to gtk-cell-renderer-render

flags render flags

ret  A new <gtk-cell-editable>, or ‘#f’
[Function] gtk-cell-renderer-editing-canceled (self <gtk-cell-renderer>)
[Method] editing-canceled

‘gtk_cell_renderer_editing_canceled’ has been deprecated since version 2.6 and should not be used in newly-written code. Use gtk-cell-renderer-stop-editing instead Causes the cell renderer to emit the "editing-canceled" signal. This function 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.

cell  A <gtk-cell-renderer>

Since 2.4

[Function] gtk-cell-renderer-stop-editing (self <gtk-cell-renderer>)

(canceled bool)

[Method] stop-editing

Informs the cell renderer that the editing is stopped. If canceled is ‘#t’, the cell renderer will emit the "editing-canceled" signal. This function should be called by cell renderer implementations in response to the "editing-done" signal of <gtk-cell-

editable>.
cell  A <gtk-cell-renderer>

canceled ‘#t’ if the editing has been canceled

Since 2.6

[Function] gtk-cell-renderer-get-fixed-size (self <gtk-cell-renderer>)

⇒ (width int) (height int)

[Method] get-fixed-size

Fills in width and height with the appropriate size of cell.

cell  A <gtk-cell-renderer>

width location to fill in with the fixed width of the widget, or ‘#f’ height location to fill in with the fixed height of the widget, or ‘#f’

[Function] gtk-cell-renderer-set-fixed-size (self <gtk-cell-renderer>)

(width int) (height int)

[Method] set-fixed-size

Sets the renderer size to be explicit, independent of the properties set.

cell  A <gtk-cell-renderer>

width the width of the cell renderer, or -1 height the height of the cell renderer, or -1

44 GtkCellEditable

Interface for widgets which can are used for editing cells

44.1 Overview

The <gtk-cell-editable> interface must be implemented for widgets to be usable when editing the contents of a <gtk-tree-view> cell.

44.2 Usage

[Class] <gtk-cell-editable>
Derives from <ginterface>.

This class defines no direct slots.

[Signal on <gtk-cell-editable>] editing-done
[Signal on <gtk-cell-editable>] remove-widget
[Function] gtk-cell-editable-start-editing (self <gtk-cell-editable>)
   (event <gdk-event>)
[Method] start-editing

Begins editing on a cell-editable. event is the <gdk-event> that began the editing process. It may be ‘#f’, in the instance that editing was initiated through programatic means.

cell-editable

          A <gtk-cell-editable>
event  A <gdk-event>, or ‘#f’
[Function] gtk-cell-editable-editing-done (self <gtk-cell-editable>)
[Method] editing-done

Emits the "editing done" signal. This signal is a sign for the cell renderer to update its value from the cell.

cell-editable

          A <gtk-tree-editable>
[Function] gtk-cell-editable-remove-widget (self <gtk-cell-editable>)
[Method] remove-widget

Emits the "remove widget" signal. This signal is meant to indicate that the cell is finished editing, and the widget may now be destroyed.

cell-editable

          A <gtk-tree-editable>

45 GtkCellRendererAccel

Renders a keyboard accelerator in a cell

45.1 Overview

<gtk-cell-renderer-accel> displays a keyboard accelerator (i.e. a key combination like <Control>-a). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination.

The <gtk-cell-renderer-accel> cell renderer was added in GTK+ 2.10.

45.2 Usage

[Class] <gtk-cell-renderer-accel>
Derives from <gtk-cell-renderer-text>.

This class defines the following slots:

accel-key

The keyval of the accelerator

accel-mods

The modifier mask of the accelerator

keycode The hardware keycode of the accelerator

accel-mode

The type of accelerators

[Signal on <gtk-cell-renderer-accel>] accel-edited (arg0 <gchararray>)
   (arg1 <guint>) (arg2 <gdk-modifier-type>) (arg3 <guint>)

Gets emitted when the user has selected a new accelerator. Since 2.10

[Signal on <gtk-cell-renderer-accel>] accel-cleared (arg0 <gchararray>)

Gets emitted when the user has removed the accelerator. Since 2.10

[Function] gtk-cell-renderer-accel-new ⇒ (ret <gtk-cell-renderer>)
Creates a new <gtk-cell-renderer-accel>.

ret the new cell renderer

Since 2.10

46 GtkCellRendererCombo

Renders a combobox in a cell

46.1 Overview

<gtk-cell-renderer-combo> renders text in a cell like <gtk-cell-renderer-text> from

which it is derived. But while <gtk-cell-renderer-text> offers a simple entry to edit the

text, <gtk-cell-renderer-combo> offers a <gtk-combo-box> or <gtk-combo-box-entry>

widget to edit the text. The values to display in the combo box are taken from the tree model specified in the model property.

The combo cell renderer takes care of adding a text cell renderer to the combo box and sets it to display the column specified by its text-column property. Further properties of the comnbo box can be set in a handler for the editing-started signal.

The <gtk-cell-renderer-combo> cell renderer was added in GTK+ 2.6.

46.2 Usage

[Class] <gtk-cell-renderer-combo>
Derives from <gtk-cell-renderer-text>.

This class defines the following slots:

model The model containing the possible values for the combo box

text-column

A column in the data source model to get the strings from

has-entry

If FALSE, don’t allow to enter strings other than the chosen ones

[Function] gtk-cell-renderer-combo-new ⇒ (ret <gtk-cell-renderer>)

Creates a new <gtk-cell-renderer-combo>. Adjust how text is drawn using object properties. Object properties can be set globally (with g-object-set). Also, with <gtk-tree-view-column>, you can bind a property to a value in a <gtk-tree-model>. 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-

tree-view>.

ret the new cell renderer

Since 2.6

47 GtkCellRendererPixbuf

Renders a pixbuf in a cell

47.1 Overview

A <gtk-cell-renderer-pixbuf> can be used to render an image in a cell. It allows to render either a given <gdk-pixbuf> (set via the pixbuf property) or a stock icon (set via the stock-id property).

To support the tree view, <gtk-cell-renderer-pixbuf> also supports rendering two alternative pixbufs, when the is-expander property is ‘#t’. If the is-expanded property is ‘#t’ and the pixbuf-expander-open property is set to a pixbuf, it renders that pixbuf, if the is-expanded property is ‘#f’ and the pixbuf-expander-closed property is set to a pixbuf, it renders that one.

47.2 Usage

[Class] <gtk-cell-renderer-pixbuf>
Derives from <gtk-cell-renderer>.

This class defines the following slots:

pixbuf The pixbuf to render

pixbuf-expander-open

Pixbuf for open expander

pixbuf-expander-closed

Pixbuf for closed expander

stock-id The stock ID of the stock icon to render

stock-size

The GtkIconSize value that specifies the size of the rendered icon

stock-detail

Render detail to pass to the theme engine

follow-state

Whether the rendered pixbuf should be colorized according to the state

icon-name

The name of the icon from the icon theme

[Function] gtk-cell-renderer-pixbuf-new ⇒ (ret <gtk-cell-renderer>)

Creates a new <gtk-cell-renderer-pixbuf>. Adjust rendering parameters using object properties. Object properties can be set globally (with g-object-set). Also, with <gtk-tree-view-column>, you can bind a property to a value in a <gtk-tree-model>. 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-tree-view>.

ret the new cell renderer

48 GtkCellRendererProgress

Renders numbers as progress bars

48.1 Overview

<gtk-cell-renderer-progress> renders a numeric value as a progress par in a cell. Additionally, it can display a text on top of the progress bar.

The <gtk-cell-renderer-progress> cell renderer was added in GTK+ 2.6.

48.2 Usage

[Class] <gtk-cell-renderer-progress>
Derives from <gtk-cell-renderer>.

This class defines the following slots: value Value of the progress bar text Text on the progress bar pulse Set this to positive values to indicate that some progress is made, but

you don’t know how much.

text-xalign

The horizontal text alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

text-yalign

The vertical text alignment, from 0 (top) to 1 (bottom).

orientation

Orientation and growth direction of the progress bar

[Function] gtk-cell-renderer-progress-new ⇒ (ret <gtk-cell-renderer>)
Creates a new <gtk-cell-renderer-progress>.

ret the new cell renderer Since 2.6

49 GtkCellRendererSpin

Renders a spin button in a cell

49.1 Overview

<gtk-cell-renderer-spin> renders text in a cell like <gtk-cell-renderer-text> from

which it is derived. But while <gtk-cell-renderer-text> offers a simple entry to edit

the text, <gtk-cell-renderer-spin> offers a <gtk-spin-button> 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 cell renders. <gtk-cell-renderer-spin> also has properties for the climb rate and the number of digits to display. Other <gtk-spin-button> properties can be set in a handler for the start-editing signal.

The <gtk-cell-renderer-spin> cell renderer was added in GTK+ 2.10.

49.2 Usage

[Class] <gtk-cell-renderer-spin>
     Derives from <gtk-cell-renderer-text>.

This class defines the following slots:

     adjustment

The adjustment that holds the value of the spinbutton.

     climb-rate

The acceleration rate when you hold down a button

digits The number of decimal places to display

[Function] gtk-cell-renderer-spin-new ⇒ (ret <gtk-cell-renderer>)
     Creates a new <gtk-cell-renderer-spin>.
     ret  a new <gtk-cell-renderer-spin>

Since 2.10

50 GtkCellRendererText

Renders text in a cell

50.1 Overview

A <gtk-cell-renderer-text> renders a given text in its 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.

If the mode is ‘GTK_CELL_RENDERER_MODE_EDITABLE’, the <gtk-cell-renderer-text>

allows to edit its text using an entry.

50.2 Usage

[Class] <gtk-cell-renderer-text>
Derives from <gtk-cell-renderer>.

This class defines the following slots:

text Text to render

markup Marked up text to render

attributes

A list of style attributes to apply to the text of the renderer

single-paragraph-mode

Whether or not to keep all text in a single paragraph

width-chars

The desired width of the label, in characters

wrap-width

The width at which the text is wrapped

alignment

How to align the lines

background

Background color as a string

foreground

Foreground color as a string

background-gdk

Background color as a GdkColor

foreground-gdk

Foreground color as a GdkColor

font Font description as a string, e.g. "Sans Italic 12"

font-desc

Font description as a PangoFontDescription struct

family Name of the font family, e.g. Sans, Helvetica, Times, Monospace style Font style variant Font variant weight Font weight stretch Font stretch size Font size

size-points

Font size in points

scale Font scaling factor editable Whether the text can be modified by the user

strikethrough

Whether to strike through the text

underline

Style of underline for this text

rise Offset of text above the baseline (below the baseline if rise is negative) language 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

ellipsize

The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string

wrap-mode

How to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string

background-set

Whether this tag affects the background color

foreground-set

Whether this tag affects the foreground color

family-set

Whether this tag affects the font family

style-set

Whether this tag affects the font style

variant-set

Whether this tag affects the font variant

weight-set

Whether this tag affects the font weight

stretch-set

Whether this tag affects the font stretch

size-set Whether this tag affects the font size

scale-set

Whether this tag scales the font size by a factor

editable-set

Whether this tag affects text editability

strikethrough-set

Whether this tag affects strikethrough

underline-set

Whether this tag affects underlining

rise-set Whether this tag affects the rise

language-set

Whether this tag affects the language the text is rendered as

ellipsize-set

Whether this tag affects the ellipsize mode

align-set

Whether this tag affects the alignment mode

[Signal on <gtk-cell-renderer-text>] edited (arg0 <gchararray>)
   (arg1 <gchararray>)

This signal is emitted after renderer has been edited.

[Function] gtk-cell-renderer-text-new ⇒ (ret <gtk-cell-renderer>)

Creates a new <gtk-cell-renderer-text>. Adjust how text is drawn using object properties. Object properties can be set globally (with g-object-set). Also, with <gtk-tree-view-column>, you can bind a property to a value in a <gtk-tree-model>. 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-

tree-view>

ret the new cell renderer

51 GtkCellRendererToggle

Renders a toggle button in a cell

51.1 Overview

<gtk-cell-renderer-toggle> renders a toggle button in a cell. The button is drawn as a radio- or checkbutton, depending on the radio property. When activated, it emits the toggled signal.

51.2 Usage

[Class] <gtk-cell-renderer-toggle>
Derives from <gtk-cell-renderer>.

This class defines the following slots:

activatable

The toggle button can be activated

active The toggle state of the button

radio Draw the toggle button as a radio button

inconsistent

The inconsistent state of the button

indicator-size

Size of check or radio indicator

[Signal on <gtk-cell-renderer-toggle>] toggled (arg0 <gchararray>)

The ::toggled signal is emitted when the cell is toggled.

[Function] gtk-cell-renderer-toggle-new ⇒ (ret <gtk-cell-renderer>)

Creates a new <gtk-cell-renderer-toggle>. Adjust rendering parameters using object properties. Object properties can be set globally (with g-object-set). Also, with <gtk-tree-view-column>, you can bind a property to a value in a <gtk-tree-model>. 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.

ret the new cell renderer

[Function] gtk-cell-renderer-toggle-get-radio
   (self <gtk-cell-renderer-toggle>) ⇒ (ret bool)
[Method] get-radio

Returns whether we’re rendering radio toggles rather than checkboxes.

toggle  a <gtk-cell-renderer-toggle>

ret ‘#t’ if we’re rendering radio toggles rather than checkboxes

[Function] gtk-cell-renderer-toggle-set-radio
   (self <gtk-cell-renderer-toggle>) (radio bool)
[Method] set-radio

If radio is ‘#t’, the cell renderer renders a radio toggle (i.e. a toggle in a group of mutually-exclusive toggles). If ‘#f’, 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-tree-view>, you set up a per-row setting using <gtktree-view-column> to associate model columns with cell renderer properties).

toggle  a <gtk-cell-renderer-toggle>

radio ‘#t’ to make the toggle look like a radio button

[Function] gtk-cell-renderer-toggle-get-active
   (self <gtk-cell-renderer-toggle>) ⇒ (ret bool)
[Method] get-active

Returns whether the cell renderer is active. See gtk-cell-renderer-toggle-set-

active.
toggle  a <gtk-cell-renderer-toggle>

ret ‘#t’ if the cell renderer is active.

[Function] gtk-cell-renderer-toggle-set-active
   (self <gtk-cell-renderer-toggle>) (setting bool)
[Method] set-active

Activates or deactivates a cell renderer.

toggle  a <gtk-cell-renderer-toggle>.

setting the value to set.

52 GtkListStore

A list-like data structure that can be used with the

52.1 Overview

The <gtk-list-store> object is a list model for use with a <gtk-tree-view> widget. It implements the <gtk-tree-model> interface, and consequentialy, can use all of the methods available there. It also implements the <gtk-tree-sortable> interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces.

The <gtk-list-store> can accept most GObject types as a column type, though it can’t accept all custom types. Internally, it will keep a copy of data passed in (such as a string or a boxed pointer). Columns that accept <gobject>s are handled a little differently. The <gtk-list-store> will keep a reference to the object instead of copying the value. As a result, if the object is modified, it is up to the application writer to call gtk-tree-model-row-changed to emit the "row changed" signal. This most commonly affects lists

with <gdk-pixbuf>s stored.
     enum {
       COLUMN_STRING,
       COLUMN_INT,
       COLUMN_BOOLEAN,
       N_COLUMNS
     };
     {
       GtkListStore *list_store;
       GtkTreePath *path;
       GtkTreeIter iter;
       gint i;
       list_store = gtk_list_store_new (N_COLUMNS,
                                        G_TYPE_STRING,
                                        G_TYPE_INT,
                                        G_TYPE_BOOLEAN);
       for (i = 0; i < 10; i++)
         {
           gchar *some_data;
           some_data = get_some_data (i);
           /* Add a new row to the model */
           gtk_list_store_append (list_store, &iter);
           gtk_list_store_set (list_store, &iter,
                               COLUMN_STRING, some_data,
                               COLUMN_INT, i,

                               COLUMN_BOOLEAN,  FALSE,
                               -1);
           /* As the store will keep a copy of the string internally, we
            * free some_data.
            */
           g_free (some_data);
         }
       /* Modify a particular row */
       path = gtk_tree_path_new_from_string ("4");
       gtk_tree_model_get_iter (GTK_TREE_MODEL (list_store),
                                &iter,
                                path);
       gtk_tree_path_free (path);
       gtk_list_store_set (list_store, &iter,
                           COLUMN_BOOLEAN, TRUE,
                           -1);
     }

52.2 Performance Considerations

Internally, the <gtk-list-store> was implemented with a linked list with a tail pointer prior to GTK+ 2.6. As a result, it was fast at data insertion and deletion, and not fast at

random data access. The <gtk-list-store> sets the <gtk-tree-model-iters-persist>

flag, which means that <gtk-tree-iter>s can be cached while the row exists. Thus, if access to a particular row is needed often and your code is expected to run on older versions of GTK+, it is worth keeping the iter around.

It is important to note that only the methods gtk-list-store-insert-with-values and gtklist-store-insert-with-valuesv are atomic, in the sense that the row is being appended to the store and the values filled in in a single operation with regard to <gtk-tree-model> signaling. In contrast, using e.g. gtk-list-store-append and then gtk-list-store-set will first create a row, which triggers the "row inserted" <gtk-tree-model> signal on <gtk-list-store>. The row, however, is still empty, and any signal handler connecting to "row inserted" on this particular store should be prepared for the situation that the row might be empty. This is especially important if you are wrapping the <gtk-list-store> inside a <gtk-

tree-model-filter> and are using a <gtk-tree-model-filter-visible-func>. Using

any of the non-atomic operations to append rows to the <gtk-list-store> will cause

the <gtk-tree-model-filter-visible-func> to be visited with an empty row first; the

function must be prepared for that.

52.3 Usage

[Class] <gtk-list-store>
     Derives from <gtk-tree-model>, <gtk-tree-sortable>, <gtk-buildable>, <gtk-
     tree-drag-dest>, <gtk-tree-drag-source>, <gobject>.

This class defines no direct slots.

[Function] gtk-list-store-new (types scm) ⇒ (ret <gtk-list-store>)

Creates a new list store as with n-columns columns each of the types passed in. Note that only types derived from standard GObject fundamental types are supported.

As an example,  ‘gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,

GDK_TYPE_PIXBUF);’ will create a new <gtk-list-store> with three columns, of type int, string and <gdk-pixbuf> respectively.

n-columns number of columns in the list store

... all <g-type> types for the columns, from first to last

ret  a new <gtk-list-store>
[Function] gtk-list-store-set-value (self <gtk-list-store>)
   (iter <gtk-tree-iter>) (column int) (value scm)
[Method] set-value

Sets the data in the cell specified by iter and column. The type of value must be convertible to the type of the column.

list-store A <gtk-list-store>

iter A valid <gtk-tree-iter> for the row being modified

column column number to modify

value new value for the cell

[Function] gtk-list-store-remove (self <gtk-list-store>)
   (iter <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)

[Method] remove

Removes the given row from the list store. After being removed, iter is set to be the next valid row, or invalidated if it pointed to the last row in list-store.

list-store A <gtk-list-store>
iter  A valid <gtk-tree-iter>

ret ‘#t’ if iter is valid, ‘#f’ if not.

[Function] gtk-list-store-insert (self <gtk-list-store>) (position int)
   ⇒ (ret <gtk-tree-iter>)

[Method] insert

Creates a new row at position. iter will be changed to point to this new row. 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 after this function is called. To fill in

values, you need to call gtk-list-store-set or gtk-list-store-set-value.
list-store A <gtk-list-store>

iter An unset <gtk-tree-iter> to set to the new row

position position to insert the new row

[Function] gtk-list-store-insert-before (self <gtk-list-store>)
   (sibling <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)
[Method] insert-before

Inserts a new row before sibling. If sibling is ‘#f’, then the row will be appended to the end of the list. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk-list-store-set

or gtk-list-store-set-value.
list-store A <gtk-list-store>

iter An unset <gtk-tree-iter> to set to the new row

sibling A valid <gtk-tree-iter>, or ‘#f’

[Function] gtk-list-store-insert-after (self <gtk-list-store>)
   (sibling <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)
[Method] insert-after

Inserts a new row after sibling. If sibling is ‘#f’, then the row will be prepended to the beginning of the list. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call

gtk-list-store-set or gtk-list-store-set-value.
list-store A <gtk-list-store>

iter An unset <gtk-tree-iter> to set to the new row

sibling A valid <gtk-tree-iter>, or ‘#f’

[Function] gtk-list-store-prepend (self <gtk-list-store>)
   ⇒ (ret <gtk-tree-iter>)

[Method] prepend

Prepends a new row to list-store. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call

gtk-list-store-set or gtk-list-store-set-value.
list-store A <gtk-list-store>

iter An unset <gtk-tree-iter> to set to the prepend row

[Function] gtk-list-store-append (self <gtk-list-store>)
   ⇒ (ret <gtk-tree-iter>)

[Method] append

Appends a new row to list-store. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call

gtk-list-store-set or gtk-list-store-set-value.
list-store A <gtk-list-store>

iter An unset <gtk-tree-iter> to set to the appended row

[Function] gtk-list-store-clear (self <gtk-list-store>)

[Method] clear

Removes all rows from the list store.

list-store a <gtk-list-store>.

[Function] gtk-list-store-iter-is-valid (self <gtk-list-store>)
   (iter <gtk-tree-iter>) ⇒ (ret bool)
[Method] iter-is-valid

purposes.")

Checks if the given iter is a valid iter for this <gtk-list-store>.

list-store A <gtk-list-store>.
iter  A <gtk-tree-iter>.

ret ‘#t’ if the iter is valid, ‘#f’ if the iter is invalid.

Since 2.2

[Function] gtk-list-store-reorder (self <gtk-list-store>)

⇒ (new order int)

[Method] reorder

Reorders store to follow the order indicated by new-order. Note that this function only works with unsorted stores.

store  A <gtk-list-store>.

new-order an array of integers mapping the new position of each child to its old position before the re-ordering, i.e. new-order‘[newpos] = oldpos’.

Since 2.2

[Function] gtk-list-store-swap (self <gtk-list-store>)
   (a <gtk-tree-iter>) (b <gtk-tree-iter>)

[Method] swap

Swaps a and b in store. Note that this function only works with unsorted stores.

store  A <gtk-list-store>.
a  A <gtk-tree-iter>.
b  Another <gtk-tree-iter>.

Since 2.2

[Function] gtk-list-store-move-before (self <gtk-list-store>)
   (iter <gtk-tree-iter>) (position <gtk-tree-iter>)
[Method] move-before

Moves iter in store to the position before position. Note that this function only works with unsorted stores. If position is ‘#f’, iter will be moved to the end of the list.

store  A <gtk-list-store>.
iter  A <gtk-tree-iter>.
position A <gtk-tree-iter>, or ‘#f’.

[Function] gtk-list-store-move-after (self <gtk-list-store>)
   (iter <gtk-tree-iter>) (position <gtk-tree-iter>)
[Method] move-after

Moves iter in store to the position after position. Note that this function only works with unsorted stores. If position is ‘#f’, iter will be moved to the start of the list.

store  A <gtk-list-store>.
iter  A <gtk-tree-iter>.
position A <gtk-tree-iter> or ‘#f’.

Since 2.2

53 GtkTreeStore

A tree-like data structure that can be used with the

53.1 Overview

The <gtk-tree-store> object is a list model for use with a <gtk-tree-view> widget. It implements the <gtk-tree-model> interface, and consequentialy, can use all of the methods available there. It also implements the <gtk-tree-sortable> interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces.

53.2 Usage

[Class] <gtk-tree-store>
Derives from <gtk-tree-model>, <gtk-tree-sortable>, <gtk-buildable>, <gtk-
tree-drag-dest>, <gtk-tree-drag-source>, <gobject>.

This class defines no direct slots.

[Function] gtk-tree-store-new (types scm) ⇒ (ret <gtk-tree-store>)

Creates a new tree store as with n-columns columns each of the types passed in. Note that only types derived from standard GObject fundamental types are supported.

As an example,  ‘gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,

GDK_TYPE_PIXBUF);’ will create a new <gtk-tree-store> with three columns, of

type <int>, <string> and <gdk-pixbuf> respectively.

n-columns number of columns in the tree store

... all <g-type> types for the columns, from first to last

ret  a new <gtk-tree-store>
[Function] gtk-tree-store-set-value (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) (column int) (value scm)
[Method] set-value

Sets the data in the cell specified by iter and column. The type of value must be convertible to the type of the column.

tree-store a <gtk-tree-store>

iter A valid <gtk-tree-iter> for the row being modified

column column number to modify

value new value for the cell

[Function] gtk-tree-store-remove (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)

[Method] remove

Removes iter from tree-store. After being removed, iter is set to the next valid row at that level, or invalidated if it previously pointed to the last one.

tree-store A <gtk-tree-store>

iter  A valid <gtk-tree-iter>

ret ‘#t’ if iter is still valid, ‘#f’ if not.

[Function] gtk-tree-store-insert (self <gtk-tree-store>)
   (parent <gtk-tree-iter>) (position int) ⇒ (ret <gtk-tree-iter>)

[Method] insert

Creates a new row at position. If parent is non-‘#f’, 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. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk-tree-store-set

or gtk-tree-store-set-value.
tree-store A <gtk-tree-store>

iter An unset <gtk-tree-iter> to set to the new row

parent  A valid <gtk-tree-iter>, or ‘#f’

position position to insert the new row

[Function] gtk-tree-store-insert-before (self <gtk-tree-store>)
   (parent <gtk-tree-iter>) (sibling <gtk-tree-iter>)
   ⇒ (ret <gtk-tree-iter>)
[Method] insert-before

Inserts a new row before sibling. If sibling is ‘#f’, then the row will be appended to parent ’s children. If parent and sibling are ‘#f’, then 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. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk-tree-store-set or gtk-

tree-store-set-value.
tree-store A <gtk-tree-store>

iter An unset <gtk-tree-iter> to set to the new row

parent  A valid <gtk-tree-iter>, or ‘#f’

sibling A valid <gtk-tree-iter>, or ‘#f’

[Function] gtk-tree-store-insert-after (self <gtk-tree-store>)
   (parent <gtk-tree-iter>) (sibling <gtk-tree-iter>)
   ⇒ (ret <gtk-tree-iter>)
[Method] insert-after

Inserts a new row after sibling. If sibling is ‘#f’, then the row will be prepended to parent ’s children. If parent and sibling are ‘#f’, then the row will be prepended 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. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk-tree-store-set or gtk-

tree-store-set-value.

tree-store A <gtk-tree-store>

iter An unset <gtk-tree-iter> to set to the new row

parent  A valid <gtk-tree-iter>, or ‘#f’

sibling A valid <gtk-tree-iter>, or ‘#f’

[Function] gtk-tree-store-prepend (self <gtk-tree-store>)
   (parent <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)

[Method] prepend

Prepends a new row to tree-store. If parent is non-‘#f’, then it will prepend the new row before the first child of parent, otherwise it will prepend a row to the top level. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk-tree-store-set or

gtk-tree-store-set-value.
tree-store A <gtk-tree-store>

iter An unset <gtk-tree-iter> to set to the prepended row

parent  A valid <gtk-tree-iter>, or ‘#f’
[Function] gtk-tree-store-append (self <gtk-tree-store>)
   (parent <gtk-tree-iter>) ⇒ (ret <gtk-tree-iter>)

[Method] append

Appends a new row to tree-store. If parent is non-‘#f’, then it will append the new row after the last child of parent, otherwise it will append a row to the top level. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk-tree-store-set or gtk-tree-store-

set-value.
tree-store A <gtk-tree-store>

iter An unset <gtk-tree-iter> to set to the appended row

parent  A valid <gtk-tree-iter>, or ‘#f’
[Function] gtk-tree-store-is-ancestor (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) (descendant <gtk-tree-iter>) ⇒ (ret bool)
[Method] is-ancestor

Returns ‘#t’ if iter is an ancestor of descendant. That is, iter is the parent (or grandparent or great-grandparent) of descendant.

tree-store A <gtk-tree-store>
iter  A valid <gtk-tree-iter>

descendant

          A valid <gtk-tree-iter>

ret ‘#t’, if iter is an ancestor of descendant

[Function] gtk-tree-store-iter-depth (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) ⇒ (ret int)
[Method] iter-depth

Returns the depth of iter. This will be 0 for anything on the root level, 1 for anything down a level, etc.

tree-store A <gtk-tree-store>
iter  A valid <gtk-tree-iter>

ret The depth of iter

[Function] gtk-tree-store-clear (self <gtk-tree-store>)

[Method] clear

Removes all rows from tree-store

tree-store a <gtk-tree-store>
[Function] gtk-tree-store-iter-is-valid (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) ⇒ (ret bool)
[Method] iter-is-valid

WARNING: This function is slow. Only use it for debugging and/or testing purposes. Checks if the given iter is a valid iter for this <gtk-tree-store>.

tree-store A <gtk-tree-store>.
iter  A <gtk-tree-iter>.

ret ‘#t’ if the iter is valid, ‘#f’ if the iter is invalid.

Since 2.2

[Function] gtk-tree-store-reorder (self <gtk-tree-store>)

(parent <gtk-tree-iter>) ⇒ (new order int)

[Method] reorder

Reorders the children of parent in tree-store to follow the order indicated by neworder. Note that this function only works with unsorted stores.

tree-store A <gtk-tree-store>.
parent  A <gtk-tree-iter>.

new-order an array of integers mapping the new position of each child to its old position before the re-ordering, i.e. new-order‘[newpos] = oldpos’.

Since 2.2

[Function] gtk-tree-store-swap (self <gtk-tree-store>)
   (a <gtk-tree-iter>) (b <gtk-tree-iter>)

[Method] swap

Swaps a and b in the same level of tree-store. Note that this function only works with unsorted stores.

tree-store A <gtk-tree-store>.
a  A <gtk-tree-iter>.

b  Another <gtk-tree-iter>.

Since 2.2

[Function] gtk-tree-store-move-before (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) (position <gtk-tree-iter>)
[Method] move-before

Moves iter in tree-store to the position before position. iter and position should be in the same level. Note that this function only works with unsorted stores. If position is ‘#f’, iter will be moved to the end of the level.

tree-store A <gtk-tree-store>.
iter  A <gtk-tree-iter>.
position A <gtk-tree-iter> or ‘#f’.

Since 2.2

[Function] gtk-tree-store-move-after (self <gtk-tree-store>)
   (iter <gtk-tree-iter>) (position <gtk-tree-iter>)
[Method] move-after

Moves iter in tree-store to the position after position. iter and position should be in the same level. Note that this function only works with unsorted stores. If position is ‘#f’, iter will be moved to the start of the level.

tree-store A <gtk-tree-store>.
iter  A <gtk-tree-iter>.
position A <gtk-tree-iter>.

Since 2.2

54 GtkComboBox

A widget used to choose from a list of items

54.1 Overview

A <gtk-combo-box> is a widget that allows the user to choose from a list of valid choices. The <gtk-combo-box> displays the selected choice. When activated, the <gtk-combo-box> displays a popup which allows the user to make a new choice. The style in which the selected value is displayed, and the style of the popup is determined by the current theme. It may be similar to a <gtk-option-menu>, or similar to a Windows-style combo box.

   Unlike its predecessors <gtk-combo> and <gtk-option-menu>, the <gtk-combo-box>

uses the model-view pattern; the list of valid choices is specified in the form of a tree model, and the display of the choices can be adapted to the data in the model by using cell renderers, as you would in a tree view. This is possible since <gtk-combo-box> implements the <gtk-cell-layout> interface. The tree model holding the valid choices is not restricted to a flat list, it can be a real tree, and the popup will reflect the tree structure.

In addition to the model-view API, <gtk-combo-box> offers a simple API which is suitable for text-only combo boxes, and hides the complexity of managing the data in a model. It consists of the functions gtk-combo-box-new-text, gtk-combo-

box-append-text,  gtk-combo-box-insert-text,  gtk-combo-box-prepend-text,
gtk-combo-box-remove-text and gtk-combo-box-get-active-text.

54.2 Usage

[Class] <gtk-combo-box>
     Derives from <gtk-cell-layout>, <gtk-cell-editable>, <gtk-bin>.

This class defines the following slots:

model The model for the combo box

     wrap-width

Wrap width for laying out the items in a grid

     row-span-column

TreeModel column containing the row span values

     column-span-column

TreeModel column containing the column span values

active The item which is currently active

     add-tearoffs

Whether dropdowns should have a tearoff menu item

     tearoff-title

A title that may be displayed by the window manager when the popup is torn-off

     has-frame

Whether the combo box draws a frame around the child

focus-on-click

Whether the combo box grabs focus when it is clicked with the mouse

popup-shown

Whether the combo’s dropdown is shown

[Signal on <gtk-combo-box>] changed

The changed signal is emitted when the active item is changed. The can be due to the user selecting a different item from the list, or due to a call to gtk-combo-box-set-active-iter. It will also be emitted while typing into a GtkComboBoxEntry, as well as when selecting an item from the GtkComboBoxEntry’s list.

Since 2.4

[Signal on <gtk-combo-box>] move-active (arg0 <gtk-scroll-type>)

undocumented

[Signal on <gtk-combo-box>] popup

undocumented

[Signal on <gtk-combo-box>] popdown ⇒ <gboolean>

undocumented

[Function] gtk-combo-box-new ⇒ (ret <gtk-widget>)

Creates a new empty <gtk-combo-box>.

ret  A new <gtk-combo-box>.

Since 2.4

[Function] gtk-combo-box-new-with-model (model <gtk-tree-model>)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-combo-box> with the model initialized to model.

model  A <gtk-tree-model>.
ret  A new <gtk-combo-box>.

Since 2.4

[Function] gtk-combo-box-get-wrap-width (self <gtk-combo-box>)

⇒ (ret int)

[Method] get-wrap-width

Returns the wrap width which is used to determine the number of columns for the popup menu. If the wrap width is larger than 1, the combo box is in table mode.

combo-box

          A <gtk-combo-box>.

ret the wrap width.

[Function] gtk-combo-box-set-wrap-width (self <gtk-combo-box>) (width int)
[Method] set-wrap-width

Sets the wrap width of combo-box to be width. The wrap width is basically the preferred number of columns when you want the popup to be layed out in a table.

combo-box

          A <gtk-combo-box>.

width Preferred number of columns.

Since 2.4

[Function] gtk-combo-box-get-row-span-column (self <gtk-combo-box>)

⇒ (ret int)

[Method] get-row-span-column

Returns the column with row span information for combo-box.

combo-box

          A <gtk-combo-box>.

ret the row span column.

Since 2.6

[Function] gtk-combo-box-set-row-span-column (self <gtk-combo-box>)

(row span int)

[Method] set-row-span-column

Sets the column with row span information for combo-box to be row-span. The row span column contains integers which indicate how many rows an item should span.

combo-box

          A <gtk-combo-box>.

row-span A column in the model passed during construction.

Since 2.4

[Function] gtk-combo-box-get-active (self <gtk-combo-box>) ⇒ (ret int)
[Method] get-active

Returns the index 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 function returns ‘gtk_tree_path_get_indices (path)[0]’, where ‘path’ is the <gtk-tree-path> of the active item.

combo-box

          A <gtk-combo-box>.

ret An integer which is the index of the currently active item, or -1 if there’s no active item.

Since 2.4

[Function] gtk-combo-box-set-active (self <gtk-combo-box>) (index int)
[Method] set-active

Sets the active item of combo-box to be the item at index. combo-box

          A <gtk-combo-box>.

index An index in the model passed during construction, or -1 to have no active item.

Since 2.4

[Function] gtk-combo-box-get-active-iter (self <gtk-combo-box>)
   (iter <gtk-tree-iter>) ⇒ (ret bool)
[Method] get-active-iter

Sets iter to point to the current active item, if it exists.

combo-box

          A <gtk-combo-box>

iter The uninitialized <gtk-tree-iter>.

ret ‘#t’, if iter was set

Since 2.4

[Function] gtk-combo-box-set-active-iter (self <gtk-combo-box>)
   (iter <gtk-tree-iter>)
[Method] set-active-iter

Sets the current active item to be the one referenced by iter. iter must correspond to a path of depth one.

combo-box

          A <gtk-combo-box>
iter  The <gtk-tree-iter>.

Since 2.4

[Function] gtk-combo-box-get-model (self <gtk-combo-box>)
   ⇒ (ret <gtk-tree-model>)
[Method] get-model

Returns the <gtk-tree-model> which is acting as data source for combo-box.

combo-box

          A <gtk-combo-box>.

ret A <gtk-tree-model> which was passed during construction.

Since 2.4

[Function] gtk-combo-box-set-model (self <gtk-combo-box>)
   (model <gtk-tree-model>)
[Method] set-model

Sets the model used by combo-box to be model. Will unset a previously set model (if applicable). If model is ‘#f’, then it will unset the model. Note that this function does not clear the cell renderers, you have to call gtk-combo-box-cell-layout-clear yourself if you need to set up different cell renderers for the new model. combo-box

          A <gtk-combo-box>.
model  A <gtk-tree-model>.

Since 2.4

[Function] gtk-combo-box-new-text ⇒ (ret <gtk-widget>)

Convenience function which constructs a new text combo box, which is a <gtk-combo-box> 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 functions: gtk-

combo-box-append-text, gtk-combo-box-insert-text, gtk-combo-box-prepend-
text and gtk-combo-box-remove-text.

ret A new text combo box.

Since 2.4

[Function] gtk-combo-box-append-text (self <gtk-combo-box>) (text mchars)
[Method] append-text

Appends string to the list of strings stored in combo-box. Note that you can only use this function with combo boxes constructed with gtk-combo-box-new-text.

combo-box

          A <gtk-combo-box> constructed using gtk-combo-box-new-text.

text A string.

Since 2.4

[Function] gtk-combo-box-insert-text (self <gtk-combo-box>) (position int)
   (text mchars)
[Method] insert-text

Inserts string at position in the list of strings stored in combo-box. Note that you can only use this function with combo boxes constructed with gtk-combo-box-new-text.

combo-box

          A <gtk-combo-box> constructed using gtk-combo-box-new-text.

position An index to insert text.

text A string.

Since 2.4

[Function] gtk-combo-box-prepend-text (self <gtk-combo-box>) (text mchars)
[Method] prepend-text

Prepends string to the list of strings stored in combo-box. Note that you can only use this function with combo boxes constructed with gtk-combo-box-new-text.

combo-box

          A <gtk-combo-box> constructed with gtk-combo-box-new-text.

text A string.

Since 2.4

[Function] gtk-combo-box-remove-text (self <gtk-combo-box>) (position int)
[Method] remove-text

Removes the string at position from combo-box. Note that you can only use this function with combo boxes constructed with gtk-combo-box-new-text.

combo-box

          A <gtk-combo-box> constructed with gtk-combo-box-new-text.

position Index of the item to remove.

Since 2.4

[Function] gtk-combo-box-get-active-text (self <gtk-combo-box>)
   ⇒ (ret mchars)
[Method] get-active-text

Returns the currently active string in combo-box or ‘#f’ if none is selected. Note that you can only use this function with combo boxes constructed with gtk-combo-box-

new-text and with <gtk-combo-box-entry>s.

combo-box

          A <gtk-combo-box> constructed with gtk-combo-box-new-text.

ret a newly allocated string containing the currently active text.

Since 2.6

[Function] gtk-combo-box-popup (self <gtk-combo-box>)

[Method] popup

Pops up the menu or dropdown list of combo-box. This function is mostly intended for use by accessibility technologies; applications should have little use for it.

combo-box

          a <gtk-combo-box>

Since 2.4

[Function] gtk-combo-box-popdown (self <gtk-combo-box>)

[Method] popdown

Hides the menu or dropdown list of combo-box. This function is mostly intended for use by accessibility technologies; applications should have little use for it.

combo-box

          a <gtk-combo-box>

Since 2.4

[Function] gtk-combo-box-get-popup-accessible (self <gtk-combo-box>)
   ⇒ (ret <atk-object>)
[Method] get-popup-accessible

Gets the accessible object corresponding to the combo box’s popup. This function is mostly intended for use by accessibility technologies; applications should have little use for it. combo-box

          a <gtk-combo-box>

ret the accessible object corresponding to the combo box’s popup.

Since 2.6

[Function] gtk-combo-box-set-add-tearoffs (self <gtk-combo-box>)

(add tearoffs bool)

[Method] set-add-tearoffs

Sets whether the popup menu should have a tearoff menu item.

combo-box

          a <gtk-combo-box>

add-tearoffs ‘#t’ to add tearoff menu items

Since 2.6

[Function] gtk-combo-box-get-add-tearoffs (self <gtk-combo-box>)

⇒ (ret bool)

[Method] get-add-tearoffs

Gets the current value of the :add-tearoffs property.

combo-box

          a <gtk-combo-box>

ret the current value of the :add-tearoffs property.

[Function] gtk-combo-box-set-title (self <gtk-combo-box>) (title mchars)
[Method] set-title

Sets the menu’s title in tearoff mode.

combo-box

          a <gtk-combo-box>

title a title for the menu in tearoff mode.

Since 2.10

[Function] gtk-combo-box-get-title (self <gtk-combo-box>) ⇒ (ret mchars)
[Method] get-title

Gets the current title of the menu in tearoff mode. See gtk-combo-box-set-add-

tearoffs.

combo-box

          a <gtk-combo-box>

ret the menu’s title in tearoff mode. This is an internal copy of the string which must not be freed.

[Function] gtk-combo-box-set-focus-on-click (self <gtk-combo-box>)

(focus on click bool)

[Method] set-focus-on-click

Sets whether the combo box 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.

combo  a <gtk-combo-box>

focus-on-click whether the combo box grabs focus when clicked with the mouse

Since 2.6

[Function] gtk-combo-box-get-focus-on-click (self <gtk-combo-box>)

⇒ (ret bool)

[Method] get-focus-on-click

Returns whether the combo box grabs focus when it is clicked with the mouse. See

gtk-combo-box-set-focus-on-click.
combo  a <gtk-combo-box>

ret ‘#t’ if the combo box grabs focus when it is clicked with the mouse.

Since 2.6

55 GtkComboBoxEntry

A text entry field with a dropdown list

55.1 Overview

A <gtk-combo-box-entry> is a widget that allows the user to choose from a list of valid choices or enter a different value. It is very similar to a <gtk-combo-box>, but it displays the selected value in an entry to allow modifying it.

   In contrast to a <gtk-combo-box>, the underlying model of a <gtk-combo-box-entry>

must always have a text column (see gtk-combo-box-entry-set-text-column), and the entry will show the content of the text column in the selected row. To get the text from

the entry, use gtk-combo-box-get-active-text.

The changed signal will be emitted while typing into a GtkComboBoxEntry, as well as when selecting an item from the GtkComboBoxEntry’s list. Use gtk-combo-box-get-active or gtk-combo-box-get-active-iter to discover whether an item was actually selected from the list.

Connect to the activate signal of the GtkEntry (use gtk-bin-get-child) to detect when the user actually finishes entering text.

The convenience API to construct simple text-only <gtk-combo-box>es can also be used

with <gtk-combo-box-entry>s which have been constructed with gtk-combo-box-entry-
new-text.

55.2 Usage

[Class] <gtk-combo-box-entry>
     Derives from <gtk-combo-box>.

This class defines the following slots:

     text-column

A column in the data source model to get the strings from

[Function] gtk-combo-box-entry-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-combo-box-entry> which has a <gtk-entry> as child. Af-

ter construction, you should set a model using gtk-combo-box-set-model and a

     text column * using gtk-combo-box-entry-set-text-column.
     ret  A new <gtk-combo-box-entry>.

Since 2.4

[Function] gtk-combo-box-entry-new-with-model (model <gtk-tree-model>)

(text column int) ⇒ (ret <gtk-widget>) Creates a new <gtk-combo-box-entry> which has a <gtk-entry> as child and a list of strings as popup. You can get the <gtk-entry> from a <gtk-combo-box-entry> using GTK ENTRY (GTK BIN (combo box entry)->child). To add and remove strings from the list, just modify model using its data manipulation API.

     model  A <gtk-tree-model>.

text-column A column in model to get the strings from.

ret  A new <gtk-combo-box-entry>.

Since 2.4

[Function] gtk-combo-box-entry-new-text ⇒ (ret <gtk-widget>)

Convenience function which constructs a new editable text combo box, which is a <gtk-combo-box-entry> just displaying strings. If you use this function to create a text combo box, you should only manipulate its data source with the follow-

ing convenience functions: gtk-combo-box-append-text, gtk-combo-box-insert-
text, gtk-combo-box-prepend-text and gtk-combo-box-remove-text.
ret  A new text <gtk-combo-box-entry>.

Since 2.4

[Function] gtk-combo-box-entry-set-text-column
   (self <gtk-combo-box-entry>) (text column int)
[Method] set-text-column

Sets the model column which entry-box should use to get strings from to be textcolumn.

entry-box A <gtk-combo-box-entry>.

text-column A column in model to get the strings from.

Since 2.4

[Function] gtk-combo-box-entry-get-text-column
   (self <gtk-combo-box-entry>) ⇒ (ret int)
[Method] get-text-column

Returns the column which entry-box is using to get the strings from.

entry-box A <gtk-combo-box-entry>.

ret A column in the data source model of entry-box.

Since 2.4

56 GtkMenu

A menu widget

56.1 Overview

A <gtk-menu> is a <gtk-menu-shell> that implements a drop down menu consisting of a list of <gtk-menu-item> 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-menu-item> in a

<gtk-menu-bar> or popped up by activating a <gtk-menu-item> in another <gtk-menu>.

A <gtk-menu> can also be popped up by activating a <gtk-option-menu>. 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 gtk-menu-popup function. The example below shows how an application can pop up a menu when the 3rd mouse button is pressed.

  /* connect our handler which will popup the menu */
  g_signal_connect_swapped (window, "button_press_event",
G_CALLBACK (my_popup_handler), menu);
static gint
my_popup_handler (GtkWidget *widget, GdkEvent *event)
{
GtkMenu *menu;
GdkEventButton *event_button;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
/* The "widget" is the menu that was supplied when
 * g_signal_connect_swapped() was called.
 */
menu = GTK_MENU (widget);
if (event->type == GDK_BUTTON_PRESS)
  {
    event_button = (GdkEventButton *) event;
    if (event_button->button == 3)
{
gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
event_button->button, event_button->time);
return TRUE;
}
  }

  return FALSE;
}

56.2 Usage

[Class] <gtk-menu>
Derives from <gtk-menu-shell>.

This class defines the following slots:

tearoff-state

A boolean that indicates whether the menu is torn-off

tearoff-title

A title that may be displayed by the window manager when this menu is torn-off

[Signal on <gtk-menu>] move-scroll (arg0 <gtk-scroll-type>)
[Function] gtk-menu-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-menu>.

ret  a new <gtk-menu>.
[Function] gtk-menu-set-screen (self <gtk-menu>) (screen <gdk-screen>)
[Method] set-screen

Sets the <gdk-screen> on which the menu will be displayed.

menu  a <gtk-menu>.

screen a <gdk-screen>, or ‘#f’ if the screen should be determined by the widget the menu is attached to.

Since 2.2

[Function] gtk-menu-reorder-child (self <gtk-menu>) (child <gtk-widget>)

(position int)

[Method] reorder-child

Moves a <gtk-menu-item> to a new position within the <gtk-menu>.

menu  a <gtk-menu>.
child  the <gtk-menu-item> to move.

position the new position to place child. Positions are numbered from 0 to n-1.

[Function] gtk-menu-attach (self <gtk-menu>) (child <gtk-widget>)

(left attach unsigned-int) (right attach unsigned-int) (top attach unsigned-int) (bottom attach unsigned-int)

[Method] attach

Adds a new <gtk-menu-item> 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 gtk-menu-detach.

menu  a <gtk-menu>.
child  a <gtk-menu-item>.

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.

Since 2.4

[Function] gtk-menu-popup (self <gtk-menu>) (parent menu shell <gtk-widget>)

(parent menu item <gtk-widget>) (menu position func scm)

   (button unsigned-int) (activate time unsigned-int32)

[Method] popup

Displays a menu and makes it available for selection. Applications can use this function to display context-sensitive menus, and will typically supply ‘#f’ for the parent-menu-shell, parent-menu-item, func and data parameters. The default menu positioning function will position the menu at the current mouse cursor position. The button parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, button should be 0. The activate-time parameter should be the time stamp of the event that initiated the popup. If such an event is not available, use gtk-get-current-event-time instead.

menu  a <gtk-menu>.

parent-menu-shell the menu shell containing the triggering menu item, or ‘#f’

parent-menu-item the menu item whose activation triggered the popup, or ‘#f’

func a user supplied function used to position the menu, or ‘#f’

data user supplied data to be passed to func.

button the mouse button which was pressed to initiate the event.

activate-time the time at which the activation event occurred.

[Function] gtk-menu-set-accel-group (self <gtk-menu>)
   (accel group <gtk-accel-group>)
[Method] set-accel-group

Set the <gtk-accel-group> which holds global accelerators for the menu. This accelerator group needs to also be added to all windows that this menu is being used in with gtk-window-add-accel-group, in order for those windows to support all the accelerators contained in this group.

menu  a <gtk-menu>.

accel-group the <gtk-accel-group> to be associated with the menu.

[Function] gtk-menu-get-accel-group (self <gtk-menu>)
   ⇒ (ret <gtk-accel-group>)
[Method] get-accel-group

Gets the <gtk-accel-group> which holds global accelerators for the menu. See gtk-

menu-set-accel-group.
menu  a <gtk-menu>.

ret the <gtk-accel-group> associated with the menu.

[Function] gtk-menu-set-accel-path (self <gtk-menu>) (accel path mchars)
[Method] set-accel-path

Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed. The main purpose of this function is to spare the programmer the inconvenience of having to call gtk-menu-item-set-accel-path on each menu item that should support runtime user changable accelerators. Instead, by just calling gtk-menu-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, a menu containing menu items "New" and "Exit", will, after ‘gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File");’ has been called, assign its items the accel

paths: ‘"<Gnumeric-Sheet>/File/New"’ and ‘"<Gnumeric-Sheet>/File/Exit"’.

Assigning accel paths to menu items then enables the user to change their accelerators at runtime. More details about accelerator paths and their default

setups can be found at gtk-accel-map-add-entry.
menu  a valid <gtk-menu>

accel-path a valid accelerator path

[Function] gtk-menu-set-title (self <gtk-menu>) (title mchars)
[Method] set-title

Sets the title string for the menu. The title is displayed when the menu is shown as a tearoff menu. If title is ‘#f’, the menu will see if it is attached to a parent menu item, and if so it will try to use the same text as that menu item’s label.

menu  a <gtk-menu>

title a string containing the title for the menu.

[Function] gtk-menu-get-tearoff-state (self <gtk-menu>) ⇒ (ret bool)
[Method] get-tearoff-state

Returns whether the menu is torn off. See gtk-menu-set-tearoff-state.

menu  a <gtk-menu>

ret ‘#t’ if the menu is currently torn off.

[Function] gtk-menu-get-title (self <gtk-menu>) ⇒ (ret mchars)
[Method] get-title

Returns the title of the menu. See gtk-menu-set-title.

menu  a <gtk-menu>

ret the title of the menu, or ‘#f’ if the menu has no title set on it. This string is owned by the widget and should not be modified or freed.

[Function] gtk-menu-popdown (self <gtk-menu>)

[Method] popdown

Removes the menu from the screen.

menu  a <gtk-menu>.
[Function] gtk-menu-reposition (self <gtk-menu>)
[Method] reposition

Repositions the menu according to its position function.

menu  a <gtk-menu>.
[Function] gtk-menu-get-active (self <gtk-menu>) ⇒ (ret <gtk-widget>)
[Method] get-active

Returns the selected menu item from the menu. This is used by the <gtk-option-

menu>.
menu  a <gtk-menu>.

ret the <gtk-menu-item> that was last selected in the menu. If a selection has not yet been made, the first menu item is selected.

[Function] gtk-menu-set-active (self <gtk-menu>) (index unsigned-int)
[Method] set-active

Selects the specified menu item within the menu. This is used by the <gtk-option-menu> and should not be used by anyone else.

menu  a <gtk-menu>.

index the index of the menu item to select. Index values are from 0 to n-1.

[Function] gtk-menu-set-tearoff-state (self <gtk-menu>) (torn off bool)
[Method] set-tearoff-state

Changes the tearoff state of the menu. A menu is normally displayed as drop down menu which persists as long as the menu is active. It can also be displayed as a tearoff menu which persists until it is closed or reattached.

menu  a <gtk-menu>.

torn-off If ‘#t’, menu is displayed as a tearoff menu.

[Function] gtk-menu-detach (self <gtk-menu>)

[Method] detach

Detaches the menu from the widget to which it had been attached. This function will call the callback function, detacher, provided when the gtk-menu-attach-to-widget function was called.

menu  a <gtk-menu>.

[Function] gtk-menu-get-attach-widget (self <gtk-menu>)
   ⇒ (ret <gtk-widget>)
[Method] get-attach-widget

Returns the <gtk-widget> that the menu is attached to.

menu  a <gtk-menu>.

ret the <gtk-widget> that the menu is attached to.

[Function] gtk-menu-get-for-attach-widget (widget <gtk-widget>)
   ⇒ (ret glist-of)

Returns a list of the menus which are attached to this widget. This list is owned by GTK+ and must not be modified.

widget  a <gtk-widget>

ret the list of menus attached to his widget.

Since 2.6

[Function] gtk-menu-set-monitor (self <gtk-menu>) (monitor num int)
[Method] set-monitor

Informs GTK+ on which monitor a menu should be popped up. See gdk-screen-

get-monitor-geometry.

This function should be called from a <gtk-menu-position-func> 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 <gtk-menu-position-func>, since, for very long menus, these coordinates may extend beyond the monitor boundaries or even the screen boundaries.

menu  a <gtk-menu>

monitor-num the number of the monitor on which the menu should be popped up

Since 2.4

57 GtkMenuBar

A subclass widget for which holds widgets

57.1 Overview

The <gtk-menu-bar> is a subclass of <gtk-menu-shell> which contains one to many <gtkmenu-item>. The result is a standard menu bar which can hold many menu items. <gtkmenu-bar> allows for a shadow type to be set for aesthetic purposes. The shadow types are

defined in the <gtk-menu-bar-set-shadow-type> function.

57.2 Usage

[Class] <gtk-menu-bar>
Derives from <gtk-menu-shell>.

This class defines the following slots:

pack-direction

The pack direction of the menubar

child-pack-direction

The child pack direction of the menubar

[Function] gtk-menu-bar-new ⇒ (ret <gtk-widget>)
Creates the new <gtk-menu-bar>
ret  the <gtk-menu-bar>
[Function] gtk-menu-bar-set-pack-direction (self <gtk-menu-bar>)
   (pack dir <gtk-pack-direction>)
[Method] set-pack-direction

Sets how items should be packed inside a menubar.

menubar a <gtk-menu-bar>.
pack-dir a new <gtk-pack-direction>.

Since 2.8

[Function] gtk-menu-bar-get-pack-direction (self <gtk-menu-bar>)
   ⇒ (ret <gtk-pack-direction>)
[Method] get-pack-direction

Retrieves the current pack direction of the menubar. See gtk-menu-bar-set-pack-

direction.
menubar a <gtk-menu-bar>

ret the pack direction

Since 2.8

58 GtkMenuItem

The widget used for item in menus

58.1 Overview

The <gtk-menu-item> widget and the derived widgets are the only valid childs for menus. Their function is to correctly handle highlighting, alignment, events and submenus.

As it derives from <gtk-bin> it can hold any valid child widget, altough only a few are really useful.

58.2 Usage

[Class] <gtk-menu-item>

Derives from <gtk-item>. This class defines the following slots:

submenu The submenu attached to the menu item, or NULL if it has none

[Signal on <gtk-menu-item>] activate

Emitted when the item is activated.

[Signal on <gtk-menu-item>] activate-item

Emitted when the item is activated, but also if the menu item has a submenu. For normal applications, the relevant signal is "activate".

[Signal on <gtk-menu-item>] toggle-size-request (arg0 <gpointer>)
[Signal on <gtk-menu-item>] toggle-size-allocate (arg0 <gint>)
[Function] gtk-menu-item-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-menu-item>.

ret the newly created <gtk-menu-item>

[Function] gtk-menu-item-new-with-label (label mchars)
   ⇒ (ret <gtk-widget>)
Creates a new <gtk-menu-item> whose child is a <gtk-label>.

label the text for the label

ret the newly created <gtk-menu-item>

[Function] gtk-menu-item-new-with-mnemonic (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-menu-item> containing a label. The label will be created using gtk-label-new-with-mnemonic, so underscores in label indicate the mnemonic for the menu item.

label The text of the button, with an underscore in front of the mnemonic character

ret  a new <gtk-menu-item>

[Function] gtk-menu-item-set-right-justified (self <gtk-menu-item>)

(right justified bool)

[Method] set-right-justified

Sets whether the menu item appears justified at the right side of a menu bar. This was traditionally done for "Help" menu items, but is now considered a bad idea. (If the widget layout is reversed for a right-to-left language like Hebrew or Arabic, right-justified-menu-items appear at the left.)

menu-item

          a <gtk-menu-item>.

right-justified if ‘#t’ the menu item will appear at the far right if added to a menu bar.

[Function] gtk-menu-item-set-submenu (self <gtk-menu-item>)
   (submenu <gtk-widget>)
[Method] set-submenu

Sets the widget submenu, or changes it.

menu-item the menu item widget

submenu the submenu

[Function] gtk-menu-item-set-accel-path (self <gtk-menu-item>)

(accel path mchars)

[Method] set-accel-path

Set the accelerator path on menu-item, through which runtime changes of the menu item’s accelerator caused by the user can be identified and saved to persistant storage (see gtk-accel-map-save on this). To setup a default accelerator for this menu item,

call gtk-accel-map-add-entry with the same accel-path. See also gtk-accel-map-

add-entry on the specifics of accelerator paths, and gtk-menu-set-accel-path for a more convenient variant of this function. This function is basically a convenience wrapper that handles calling gtk-widget-set-accel-path with the appropriate accelerator group for the menu item. Note that you do need to set an accelerator on the parent menu with gtk-menu-set-accel-group for this to work.

menu-item

          a valid <gtk-menu-item>

accel-path accelerator path, corresponding to this menu item’s functionality, or ‘#f’ to unset the current path.

[Function] gtk-menu-item-remove-submenu (self <gtk-menu-item>)
[Method] remove-submenu

Removes the widget’s submenu.

menu-item the menu item widget

[Function] gtk-menu-item-select (self <gtk-menu-item>)

[Method] select

Emits the "select" signal on the given item. Behaves exactly like <gtk-item-select>.

menu-item the menu item

[Function] gtk-menu-item-deselect (self <gtk-menu-item>)
[Method] deselect

Emits the "deselect" signal on the given item. Behaves exactly like <gtk-item-

deselect>.

menu-item the menu item

[Function] gtk-menu-item-activate (self <gtk-menu-item>)
[Method] activate

Emits the "activate" signal on the given item

menu-item the menu item

[Function] gtk-menu-item-toggle-size-request (self <gtk-menu-item>)

⇒ (requisition int)

[Method] toggle-size-request

Emits the "toggle size request" signal on the given item.

menu-item the menu item

requisition the requisition to use as signal data.

[Function] gtk-menu-item-toggle-size-allocate (self <gtk-menu-item>)

(allocation int)

[Method] toggle-size-allocate

Emits the "toggle size allocate" signal on the given item.

menu-item the menu item.

allocation the allocation to use as signal data.

[Function] gtk-menu-item-get-right-justified (self <gtk-menu-item>)

⇒ (ret bool)

[Method] get-right-justified

Gets whether the menu item appears justified at the right side of the menu bar.

menu-item

          a <gtk-menu-item>

ret ‘#t’ if the menu item will appear at the far right if added to a menu bar.

[Function] gtk-menu-item-get-submenu (self <gtk-menu-item>)
   ⇒ (ret <gtk-widget>)
[Method] get-submenu

Gets the submenu underneath this menu item, if any. See gtk-menu-item-set-

submenu.

menu-item

          a <gtk-menu-item>

ret submenu for this menu item, or ‘#f’ if none.

59 GtkMenuShell

A base class for menu objects

59.1 Overview

A <gtk-menu-shell> is the abstract base class used to derive the <gtk-menu> and <gtkmenu-bar> subclasses.

A <gtk-menu-shell> is a container of <gtk-menu-item> objects arranged in a list which can be navigated, selected, and activated by the user to perform application functions. A <gtk-menu-item> can have a submenu associated with it, allowing for nested hierarchical menus.

59.2 Usage

[Class] <gtk-menu-shell>
Derives from <gtk-container>.

This class defines the following slots:

take-focus

A boolean that determines whether the menu grabs the keyboard focus

[Signal on <gtk-menu-shell>] deactivate

This signal is emitted when a menu shell is deactivated.

[Signal on <gtk-menu-shell>] selection-done

This signal is emitted when a selection has been completed within a menu shell.

[Signal on <gtk-menu-shell>] move-current
   (arg0 <gtk-menu-direction-type>)

An action signal which moves the current menu item in the direction specified by direction.

[Signal on <gtk-menu-shell>] activate-current (arg0 <gboolean>)

An action signal that activates the current menu item within the menu shell.

[Signal on <gtk-menu-shell>] cancel

An action signal which cancels the selection within the menu shell. Causes the GtkMenuShell::selection-done signal to be emitted.

[Signal on <gtk-menu-shell>] cycle-focus (arg0 <gtk-direction-type>)
[Signal on <gtk-menu-shell>] move-selected (arg0 <gint>) ⇒ <gboolean>

undocumented

[Function] gtk-menu-shell-append (self <gtk-menu-shell>)
   (child <gtk-widget>)

[Method] append

Adds a new <gtk-menu-item> to the end of the menu shell’s item list. menu-shell

          a <gtk-menu-shell>.
child  The <gtk-menu-item> to add.
[Function] gtk-menu-shell-prepend (self <gtk-menu-shell>)
   (child <gtk-widget>)

[Method] prepend

Adds a new <gtk-menu-item> to the beginning of the menu shell’s item list.

menu-shell

          a <gtk-menu-shell>.
child  The <gtk-menu-item> to add.
[Function] gtk-menu-shell-insert (self <gtk-menu-shell>)

(child <gtk-widget>) (position int)

[Method] insert

Adds a new <gtk-menu-item> to the menu shell’s item list at the position indicated by position.

menu-shell

          a <gtk-menu-shell>.
child  The <gtk-menu-item> to add.

position The position in the item list where child is added. Positions are numbered from 0 to n-1.

[Function] gtk-menu-shell-deactivate (self <gtk-menu-shell>)
[Method] deactivate

Deactivates the menu shell. Typically this results in the menu shell being erased from the screen.

menu-shell

          a <gtk-menu-shell>.
[Function] gtk-menu-shell-select-item (self <gtk-menu-shell>)
   (menu item <gtk-widget>)
[Method] select-item

Selects the menu item from the menu shell.

menu-shell

          a <gtk-menu-shell>.

menu-item

          The <gtk-menu-item> to select.
[Function] gtk-menu-shell-select-first (self <gtk-menu-shell>)

(search sensitive bool)

[Method] select-first

Select the first visible or selectable child of the menu shell; don’t select tearoff items unless the only item is a tearoff item. menu-shell

          a <gtk-menu-shell>

search-sensitive if ‘#t’, search for the first selectable menu item, otherwise select nothing if the first item isn’t sensitive. This should be ‘#f’ if the menu is being popped up initially.

Since 2.2

[Function] gtk-menu-shell-deselect (self <gtk-menu-shell>)
[Method] deselect

Deselects the currently selected item from the menu shell, if any.

menu-shell

          a <gtk-menu-shell>.
[Function] gtk-menu-shell-activate-item (self <gtk-menu-shell>)

(menu item <gtk-widget>) (force deactivate bool)

[Method] activate-item

Activates the menu item within the menu shell.

menu-shell

          a <gtk-menu-shell>.

menu-item

          The <gtk-menu-item> to activate.

force-deactivate If TRUE, force the deactivation of the menu shell after the menu item is activated.

[Function] gtk-menu-shell-cancel (self <gtk-menu-shell>)

[Method] cancel

Cancels the selection within the menu shell.

menu-shell

          a <gtk-menu-shell>

Since 2.4

[Function] gtk-menu-shell-set-take-focus (self <gtk-menu-shell>)

(take focus bool)

[Method] set-take-focus

If take-focus is ‘#t’ (the default) the menu shell will take the keyboard focus so that it will receive all keyboard events which is needed to enable keyboard navigation in menus. Setting take-focus to ‘#f’ 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, the take-focus property of the submenu needs to be set explicitely. Note that setting it to ‘#f’ has side-effects: If the focus is in some other app, it keeps the focus and keynav in the menu doesn’t work. Consequently, keynav 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 take-focus set to ‘#f’ should not display mnemonics or accelerators, since it cannot be guaranteed that they will work.

See also gdk-keyboard-grab

menu-shell

          a <gtk-menu-shell>

take-focus ‘#t’ if the menu shell should take the keyboard focus on popup.

Since 2.8

[Function] gtk-menu-shell-get-take-focus (self <gtk-menu-shell>)

⇒ (ret bool)

[Method] get-take-focus

Returns ‘#t’ if the menu shell will take the keyboard focus on popup.

menu-shell

          a <gtk-menu-shell>

ret ‘#t’ if the menu shell will take the keyboard focus on popup.

Since 2.8

60 GtkImageMenuItem

A menu item with an icon

60.1 Overview

A GtkImageMenuItem is a menu item which has an icon next to the text label.

Note that the user can disable display of menu icons, so make sure to still fill in the text label.

60.2 Usage

[Class] <gtk-image-menu-item>
Derives from <gtk-menu-item>.

This class defines the following slots:

image Child widget to appear next to the menu text

[Function] gtk-image-menu-item-set-image (self <gtk-image-menu-item>)
   (image <gtk-widget>)
[Method] set-image

Sets the image of image-menu-item to the given widget. Note that it depends on the show-menu-images setting whether the image will be displayed or not.

image-menu-item

          a <gtk-image-menu-item>.

image a widget to set as the image for the menu item.

[Function] gtk-image-menu-item-get-image (self <gtk-image-menu-item>)
   ⇒ (ret <gtk-widget>)
[Method] get-image

Gets the widget that is currently set as the image of image-menu-item. See gtk-

image-menu-item-set-image.

image-menu-item

          a <gtk-image-menu-item>.

ret the widget set as image of image-menu-item.

[Function] gtk-image-menu-item-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-image-menu-item> with an empty label.

ret  a new <gtk-image-menu-item>.
[Function] gtk-image-menu-item-new-from-stock (stock id mchars)
   (accel group <gtk-accel-group>) ⇒ (ret <gtk-widget>)

Creates a new <gtk-image-menu-item> containing the image and text from a stock item. Some stock ids have preprocessor macros like <gtk-stock-ok> and <gtk-

stock-apply>.

If you want this menu item to have changeable accelerators, then pass in ‘#f’ for accel group. Next call gtk-menu-item-set-accel-path with an appropriate path for the menu item, use gtk-stock-lookup to look up the standard accelerator for the stock item, and if one is found, call gtk-accel-map-add-entry to register it. stock-id the name of the stock item. accel-group

the <gtk-accel-group> to add the menu items accelerator to, or ‘#f’.

ret  a new <gtk-image-menu-item>.
[Function] gtk-image-menu-item-new-with-label (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-image-menu-item> containing a label. label the text of the menu item.

ret  a new <gtk-image-menu-item>.

61 GtkRadioMenuItem

A choice from multiple check menu items

61.1 Overview

A radio menu item is a check menu item that belongs to a group. At each instant exactly one of the radio menu items from a group is selected.

The group list does not need to be freed, as each <gtk-radio-menu-item> will remove itself and its list item when it is destroyed.

The correct way to create a group of radio menu items is approximatively this:

GSList *group = NULL;
GtkWidget *item;
gint i;
for (i = 0; i < 5; i++)
{
  item = gtk_radio_menu_item_new_with_label (group, "This is an example");
  group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
  if (i == 1)
    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
}

61.2 Usage

[Class] <gtk-radio-menu-item>
Derives from <gtk-check-menu-item>.

This class defines the following slots:

group The radio menu item whose group this widget belongs to.

[Signal on <gtk-radio-menu-item>] group-changed
[Function] gtk-radio-menu-item-new (group <gtk-radio-group*>)
   ⇒ (ret <gtk-widget>)
Creates a new <gtk-radio-menu-item>.

group the group to which the radio menu item is to be attached

ret  a new <gtk-radio-menu-item>
[Function] gtk-radio-menu-item-new-with-label
   (group <gtk-radio-group*>) (label mchars) ⇒ (ret <gtk-widget>)
Creates a new <gtk-radio-menu-item> whose child is a simple <gtk-label>.

group the group to which the radio menu item is to be attached

label the text for the label

ret  a new <gtk-radio-menu-item>

[Function] gtk-radio-menu-item-new-from-widget
   (group <gtk-radio-menu-item>) ⇒ (ret <gtk-widget>)

Creates a new <gtk-radio-menu-item> adding it to the same group as group.

group  An existing <gtk-radio-menu-item>
ret  The new <gtk-radio-menu-item>

Since 2.4

[Function] gtk-radio-menu-item-set-group (self <gtk-radio-menu-item>)
   (group <gtk-radio-group*>)
[Method] set-group

Sets the group of a radio menu item, or changes it.

radio-menu-item

          a <gtk-radio-menu-item>.

group the new group.

[Function] gtk-radio-menu-item-get-group (self <gtk-radio-menu-item>)
   ⇒ (ret <gtk-radio-group*>)
[Method] get-group

Returns the group to which the radio menu item belongs, as a <g-list> of <gtkradio-menu-item>. The list belongs to GTK+ and should not be freed.

radio-menu-item

          a <gtk-radio-menu-item>.

ret the group of radio-menu-item.

62 GtkCheckMenuItem

A menu item with a check box

62.1 Overview

A <gtk-check-menu-item> is a menu item that maintains the state of a boolean value in addition to a <gtk-menu-item>’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-menu-item>. Activating the <gtk-menu-item> toggles the value.

62.2 Usage

[Class] <gtk-check-menu-item>
Derives from <gtk-menu-item>.

This class defines the following slots:

active Whether the menu item is checked

inconsistent

Whether to display an "inconsistent" state

draw-as-radio

Whether the menu item looks like a radio menu item

[Signal on <gtk-check-menu-item>] toggled

This signal is emitted when the state of the check box is changed. A signal handler can examine the <gtk-check-menu-item> struct to discover the new state.

[Function] gtk-check-menu-item-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-check-menu-item>.
ret  a new <gtk-check-menu-item>.
[Function] gtk-check-menu-item-new-with-label (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new <gtk-check-menu-item> with a label.

label the string to use for the label.

ret  a new <gtk-check-menu-item>.
[Function] gtk-check-menu-item-get-active (self <gtk-check-menu-item>)

⇒ (ret bool)

[Method] get-active

Returns whether the check menu item is active. See gtk-check-menu-item-set-

active.

check-menu-item

          a <gtk-check-menu-item>

ret ‘#t’ if the menu item is checked.

[Function] gtk-check-menu-item-set-active (self <gtk-check-menu-item>)

(is active bool)

[Method] set-active

Sets the active state of the menu item’s check box.

check-menu-item

          a <gtk-check-menu-item>.

is-active boolean value indicating whether the check box is active.

[Function] gtk-check-menu-item-toggled (self <gtk-check-menu-item>)

[Method] toggled

Emits the GtkCheckMenuItem::toggled signal.

check-menu-item

          a <gtk-check-menu-item>.

63 GtkSeparatorMenuItem

A separator used in menus

63.1 Overview

The <gtk-separator-menu-item> 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.

63.2 Usage

[Class] <gtk-separator-menu-item>
     Derives from <gtk-menu-item>.

This class defines no direct slots.

[Function] gtk-separator-menu-item-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-separator-menu-item>.
     ret  a new <gtk-separator-menu-item>.

64 GtkTearoffMenuItem

A menu item used to tear off and reattach its menu

64.1 Overview

A <gtk-tearoff-menu-item> is a special <gtk-menu-item> which is used to tear off and

reattach its menu.

When its menu is shown normally, the <gtk-tearoff-menu-item> 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-tearoff-menu-item> is drawn as a dotted line which has a left pointing arrow graphic indicating that the tearoff menu can be reattached. Activating it will erase the tearoff menu window.

64.2 Usage

[Class] <gtk-tearoff-menu-item>
     Derives from <gtk-menu-item>.

This class defines no direct slots.

[Function] gtk-tearoff-menu-item-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-tearoff-menu-item>.
     ret  a new <gtk-tearoff-menu-item>.

65 GtkToolbar

Create bars of buttons and other widgets

65.1 Overview

A toolbar is created with a call to gtk-toolbar-new.

A toolbar can contain instances of a subclass of <gtk-tool-item>. To add a <gtktool-item> to the a toolbar, use gtk-toolbar-insert. To remove an item from the toolbar use gtk-container-remove. To add a button to the toolbar, add an instance of

<gtk-tool-button>.

Toolbar items can be visually grouped by adding instances of <gtk-separator-tool-item> to the toolbar. If a <gtk-separator-tool-item> has the "expand" property set to #t and the "draw" property set to #f 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 <gtk-

toolbar::popup-context-menu> signal.

65.2 Usage

[Class] <gtk-toolbar>
Derives from <gtk-container>.

This class defines the following slots:

orientation

The orientation of the toolbar

toolbar-style

How to draw the toolbar

show-arrow

If an arrow should be shown if the toolbar doesn’t fit

tooltips If the tooltips of the toolbar should be active or not

icon-size

Size of icons in this toolbar

icon-size-set

Whether the icon-size property has been set

[Signal on <gtk-toolbar>] orientation-changed (arg0 <gtk-orientation>)

Emitted when the orientation of the toolbar changes.

[Signal on <gtk-toolbar>] style-changed (arg0 <gtk-toolbar-style>)

Emitted when the style of the toolbar changes.

[Signal on <gtk-toolbar>] popup-context-menu (arg0 <gint>) (arg1 <gint>)
   (arg2 <gint>) ⇒ <gboolean>

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 keybaord, button is -1.

[Signal on <gtk-toolbar>] focus-home-or-end (arg0 <gboolean>)
   ⇒ <gboolean>

A keybinding signal used internally by GTK+. This signal can’t be used in application code

[Function] gtk-toolbar-new ⇒ (ret <gtk-widget>)

Creates a new toolbar.

ret the newly-created toolbar.

[Function] gtk-toolbar-insert (self <gtk-toolbar>) (item <gtk-tool-item>)

(pos int)

[Method] insert

Insert a <gtk-tool-item> into the toolbar at position pos. If pos is 0 the item is prepended to the start of the toolbar. If pos is negative, the item is appended to the end of the toolbar.

toolbar  a <gtk-toolbar>
item  a <gtk-tool-item>

pos the position of the new item

Since 2.4

[Function] gtk-toolbar-get-item-index (self <gtk-toolbar>)
   (item <gtk-tool-item>) ⇒ (ret int)
[Method] get-item-index

Returns the position of item on the toolbar, starting from 0. It is an error if item is not a child of the toolbar.

toolbar  a <gtk-toolbar>

item a <gtk-tool-item> that is a child of toolbar

ret the position of item on the toolbar.

Since 2.4

[Function] gtk-toolbar-get-n-items (self <gtk-toolbar>) ⇒ (ret int)
[Method] get-n-items

Returns the number of items on the toolbar.

toolbar  a <gtk-toolbar>

ret the number of items on the toolbar

[Function] gtk-toolbar-get-nth-item (self <gtk-toolbar>) (n int)
   ⇒ (ret <gtk-tool-item>)
[Method] get-nth-item

Returns the n’th item on toolbar, or ‘#f’ if the toolbar does not contain an n’th item.

toolbar  a <gtk-toolbar>

n A position on the toolbar

ret The n’th <gtk-tool-item> on toolbar, or ‘#f’ if there isn’t an n’th item.

Since 2.4

[Function] gtk-toolbar-get-drop-index (self <gtk-toolbar>) (x int) (y int)

⇒ (ret int)

[Method] get-drop-index

Returns the position corresponding to the indicated point on toolbar. This is useful when dragging items to the toolbar: this function returns the position a new item should be inserted. x and y are in toolbar coordinates.

toolbar  a <gtk-toolbar>

x x coordinate of a point on the toolbar

y y coordinate of a point on the toolbar

ret The position corresponding to the point (x, y) on the toolbar.

Since 2.4

[Function] gtk-toolbar-set-drop-highlight-item (self <gtk-toolbar>)
   (tool item <gtk-tool-item>) (index int)
[Method] set-drop-highlight-item

Highlights toolbar to give an idea of what it would look like if item was added to toolbar at the position indicated by index. If item is ‘#f’, highlighting is turned off. In that case index is ignored. The tool-item passed to this function 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.

toolbar  a <gtk-toolbar>

tool-item a <gtk-tool-item>, or ‘#f’ to turn of highlighting

index a position on toolbar

Since 2.4

[Function] gtk-toolbar-set-show-arrow (self <gtk-toolbar>)

(show arrow bool)

[Method] set-show-arrow

Sets whether to show an overflow menu when toolbar doesn’t have room for all items on it. If ‘#t’, items that there are not room are available through an overflow menu.

toolbar  a <gtk-toolbar>

show-arrow Whether to show an overflow menu

Since 2.4

[Function] gtk-toolbar-set-orientation (self <gtk-toolbar>)
   (orientation <gtk-orientation>)
[Method] set-orientation

Sets whether a toolbar should appear horizontally or vertically.

toolbar  a <gtk-toolbar>.

orientation

          a new <gtk-orientation>.
[Function] gtk-toolbar-set-tooltips (self <gtk-toolbar>) (enable bool)
[Method] set-tooltips

Sets if the tooltips of a toolbar should be active or not.

toolbar  a <gtk-toolbar>.

enable set to ‘#f’ to disable the tooltips, or ‘#t’ to enable them.

[Function] gtk-toolbar-get-show-arrow (self <gtk-toolbar>) ⇒ (ret bool)
[Method] get-show-arrow

Returns whether the toolbar has an overflow menu. See gtk-toolbar-set-show-

arrow.
toolbar  a <gtk-toolbar>

ret ‘#t’ if the toolbar has an overflow menu.

Since 2.4

[Function] gtk-toolbar-get-orientation (self <gtk-toolbar>)
   ⇒ (ret <gtk-orientation>)
[Method] get-orientation

Retrieves the current orientation of the toolbar. See gtk-toolbar-set-orientation.

toolbar  a <gtk-toolbar>

ret the orientation

[Function] gtk-toolbar-get-style (self <gtk-toolbar>)
   ⇒ (ret <gtk-toolbar-style>)
[Method] get-style

Retrieves whether the toolbar has text, icons, or both . See gtk-toolbar-set-style.

toolbar  a <gtk-toolbar>

ret the current style of toolbar

[Function] gtk-toolbar-get-icon-size (self <gtk-toolbar>)
   ⇒ (ret <gtk-icon-size>)
[Method] get-icon-size

Retrieves the icon size for the toolbar. See gtk-toolbar-set-icon-size.

toolbar  a <gtk-toolbar>

ret the current icon size for the icons on the toolbar.

[Function] gtk-toolbar-get-tooltips (self <gtk-toolbar>) ⇒ (ret bool)
[Method] get-tooltips

Retrieves whether tooltips are enabled. See gtk-toolbar-set-tooltips.

toolbar  a <gtk-toolbar>

ret ‘#t’ if tooltips are enabled

[Function] gtk-toolbar-get-relief-style (self <gtk-toolbar>)
   ⇒ (ret <gtk-relief-style>)
[Method] get-relief-style

Returns the relief style of buttons on toolbar. See gtk-button-set-relief.

toolbar  a <gtk-toolbar>

ret The relief style of buttons on toolbar.

Since 2.4

[Function] gtk-toolbar-set-style (self <gtk-toolbar>)
   (style <gtk-toolbar-style>)
[Method] set-style

Alters the view of toolbar to display either icons only, text only, or both.

toolbar  a <gtk-toolbar>.

style the new style for toolbar.

[Function] gtk-toolbar-unset-style (self <gtk-toolbar>)
[Method] unset-style

Unsets a toolbar style set with gtk-toolbar-set-style, so that user preferences will be used to determine the toolbar style.

toolbar  a <gtk-toolbar>

66 GtkToolItem

The base class of widgets that can be added to GtkToolbar

66.1 Overview

<gtk-tool-item>s are widgets that can appear on a toolbar. To create a toolbar item that contain something else than a button, use gtk-tool-item-new. Use gtk-container-add to add a child widget to the tool item.

For toolbar items that contain buttons, see the <gtk-tool-button>, <gtk-toggle-

tool-button> and <gtk-radio-tool-button> classes.

66.2 Usage

[Class] <gtk-tool-item>

Derives from <gtk-bin>. This class defines the following slots:

visible-horizontal

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

visible-vertical

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

is-important

Whether the toolbar item is considered important. When TRUE, toolbar buttons show text in GTK TOOLBAR BOTH HORIZ mode

[Signal on <gtk-tool-item>] create-menu-proxy ⇒ <gboolean>

This signal is emitted when the toolbar needs information from tool-item about whether the item should appear in the toolbar overflow menu. In response the tool item should either

  • call gtk-tool-item-set-proxy-menu-item with a ‘#f’ pointer and return ‘#t’

to indicate that the item should not appear in the overflow menu

  • call gtk-tool-item-set-proxy-menu-item with a new menu item and return

‘#t’, or

• return ‘#f’ 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 gtk-tool-item-rebuild-menu to invalidate the cache and ensure that the toolbar rebuilds its overflow menu.

[Signal on <gtk-tool-item>] toolbar-reconfigured

This signal is emitted when some property of the toolbar that the item is a child of changes. For custom subclasses of <gtk-tool-item>, the default handler of this signal use the functions to find out what the toolbar should look like and change themselves accordingly.

  • gtk-toolbar-get-orientation
  • gtk-toolbar-get-style
  • gtk-toolbar-get-icon-size
  • gtk-toolbar-get-relief-style
[Signal on <gtk-tool-item>] set-tooltip (arg0 <gtk-tooltips>)
   (arg1 <gchararray>) (arg2 <gchararray>) ⇒ <gboolean>

This signal is emitted when the toolitem’s tooltip changes. Application developers can use gtk-tool-item-set-tooltip to set the item’s tooltip.

[Function] gtk-tool-item-new ⇒ (ret <gtk-tool-item>)
Creates a new <gtk-tool-item>
ret  the new <gtk-tool-item>

Since 2.4

[Function] gtk-tool-item-set-homogeneous (self <gtk-tool-item>)

(homogeneous bool)

[Method] set-homogeneous

Sets whether 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.

tool-item a <gtk-tool-item:>

homogeneous whether tool-item is the same size as other homogeneous items

Since 2.4

[Function] gtk-tool-item-get-homogeneous (self <gtk-tool-item>)

⇒ (ret bool)

[Method] get-homogeneous

Returns whether tool-item is the same size as other homogeneous items. See gtk-

tool-item-set-homogeneous.
tool-item a <gtk-tool-item:>

ret ‘#t’ if the item is the same size as other homogeneous item.s

Since 2.4

[Function] gtk-tool-item-set-expand (self <gtk-tool-item>) (expand bool)
[Method] set-expand

Sets whether tool-item is allocated extra space when there is more room on the toolbar then needed for the items. The effect is that the item gets bigger when the toolbar gets bigger and smaller when the toolbar gets smaller.

tool-item a <gtk-tool-item:>

expand Whether tool-item is allocated extra space

Since 2.4

[Function] gtk-tool-item-get-expand (self <gtk-tool-item>) ⇒ (ret bool)
[Method] get-expand

Returns whether tool-item is allocated extra space. See gtk-tool-item-set-expand.

tool-item a <gtk-tool-item:>

ret ‘#t’ if tool-item is allocated extra space.

Since 2.4

[Function] gtk-tool-item-set-tooltip (self <gtk-tool-item>)

(tooltips <gtk-tooltips>) (tip text mchars) (tip private mchars)

[Method] set-tooltip

Sets the <gtk-tooltips> object to be used for tool-item, the text to be displayed as tooltip on the item and the private text to be used. See gtk-tooltips-set-tip.

tool-item a <gtk-tool-item:>

tooltips The <gtk-tooltips> object to be used

tip-text text to be used as tooltip text for tool-item

tip-private text to be used as private tooltip text

Since 2.4

[Function] gtk-tool-item-set-use-drag-window (self <gtk-tool-item>)

(use drag window bool)

[Method] set-use-drag-window

Sets whether toolitem has a drag window. When ‘#t’ the toolitem can be used as a drag source through gtk-drag-source-set. When toolitem has a drag window it will intercept all events, even those that would otherwise be sent to a child of toolitem.

toolitem a <gtk-tool-item>

use-drag-window Whether toolitem has a drag window.

Since 2.4

[Function] gtk-tool-item-get-use-drag-window (self <gtk-tool-item>)

⇒ (ret bool)

[Method] get-use-drag-window

Returns whether toolitem has a drag window. See gtk-tool-item-set-use-drag-

window.
toolitem a <gtk-tool-item>

ret ‘#t’ if toolitem uses a drag window.

[Function] gtk-tool-item-set-visible-vertical (self <gtk-tool-item>)

(visible vertical bool)

[Method] set-visible-vertical

Sets whether toolitem 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 ‘#f’toolitem will not appear on toolbars that are docked vertically.

toolitem a <gtk-tool-item>

visible-vertical whether toolitem is visible when the toolbar is in vertical mode

Since 2.4

[Function] gtk-tool-item-get-visible-vertical (self <gtk-tool-item>)

⇒ (ret bool)

[Method] get-visible-vertical

Returns whether toolitem is visible when the toolbar is docked vertically. See gtk-

tool-item-set-visible-vertical.
toolitem a <gtk-tool-item>

ret Whether toolitem is visible when the toolbar is docked vertically

Since 2.4

[Function] gtk-tool-item-set-is-important (self <gtk-tool-item>)

(is important bool)

[Method] set-is-important

Sets whether tool-item should be considered important. The <gtk-tool-button> class uses this property to determine whether to show or hide 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"

tool-item a <gtk-tool-item>

is-important whether the tool item should be considered important

Since 2.4

[Function] gtk-tool-item-get-is-important (self <gtk-tool-item>)

⇒ (ret bool)

[Method] get-is-important

Returns whether tool-item is considered important. See gtk-tool-item-set-is-

important
tool-item a <gtk-tool-item>

ret ‘#t’ if tool-item is considered important.

[Function] gtk-tool-item-get-icon-size (self <gtk-tool-item>)
   ⇒ (ret <gtk-icon-size>)
[Method] get-icon-size

Returns the icon size used for tool-item. Custom subclasses of <gtk-tool-item> should call this function to find out what size icons they should use.

tool-item a <gtk-tool-item:>

ret a <gtk-icon-size> indicating the icon size used for tool-item

Since 2.4

[Function] gtk-tool-item-get-orientation (self <gtk-tool-item>)
   ⇒ (ret <gtk-orientation>)
[Method] get-orientation

Returns the orientation used for tool-item. Custom subclasses of <gtk-tool-item> should call this function to find out what size icons they should use.

tool-item a <gtk-tool-item:>

ret a <gtk-orientation> indicating the orientation used for tool-item

Since 2.4

[Function] gtk-tool-item-get-toolbar-style (self <gtk-tool-item>)
   ⇒ (ret <gtk-toolbar-style>)
[Method] get-toolbar-style

Returns the toolbar style used for tool-item. Custom subclasses of <gtk-tool-item> should call this function in the handler of the GtkToolItem::toolbar reconfigured signal 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 (however, note the <gtk-tool-button::has-text-horizontally> that makes tool buttons not show labels when the toolbar style is GTK TOOLBAR BOTH HORIZ.

tool-item a <gtk-tool-item:>

ret A <gtk-toolbar-style> indicating the toolbar style used for tool-item.

Since 2.4

[Function] gtk-tool-item-get-relief-style (self <gtk-tool-item>)
   ⇒ (ret <gtk-relief-style>)
[Method] get-relief-style

Returns the relief style of tool-item. See gtk-button-set-relief-style. Custom subclasses of <gtk-tool-item> should call this function in the handler of the <gtktool-item::toolbar-reconfigured> signal to find out the relief style of buttons.

tool-item a <gtk-tool-item:>

ret a <gtk-relief-style> indicating the relief style used for tool-item.

Since 2.4

[Function] gtk-tool-item-get-proxy-menu-item (self <gtk-tool-item>)
   (menu item id mchars) ⇒ (ret <gtk-widget>)
[Method] get-proxy-menu-item

If menu-item-id matches the string passed to gtk-tool-item-set-proxy-menu-item return the corresponding <gtk-menu-item>. Custom subclasses of <gtk-tool-item> should use this function to update their menu item when the <gtk-tool-item> changes. That the menu-item-ids must match ensures that a <gtk-tool-item> will not inadvertently change a menu item that they did not create.

tool-item a <gtk-tool-item:>

menu-item-id a string used to identify the menu item

ret  The <gtk-menu-item> passed to gtk-tool-item-set-proxy-menu-

item, if the menu-item-ids match.

Since 2.4

[Function] gtk-tool-item-set-proxy-menu-item (self <gtk-tool-item>)

(menu item id mchars) (menu item <gtk-widget>)

[Method] set-proxy-menu-item

Sets the <gtk-menu-item> used in the toolbar overflow menu. The menu-item-id is used to identify the caller of this function and should also be used with gtk-tool-

item-get-proxy-menu-item.
tool-item a <gtk-tool-item:>

menu-item-id a string used to identify menu-item

menu-item a <gtk-menu-item> to be used in the overflow menu

Since 2.4

[Function] gtk-tool-item-rebuild-menu (self <gtk-tool-item>)
[Method] rebuild-menu

Calling this function signals to the toolbar that the overflow menu item for tool-item has changed. If the overflow menu is visible when this function it called, the menu will be rebuilt. The function must be called when the tool item changes what it will do in response to the "create menu proxy" signal.

tool-item a <gtk-tool-item>

Since 2.6

67 GtkSeparatorToolItem

A toolbar item that separates groups of other toolbar items

67.1 Overview

A <gtk-separator-item> is a <gtk-tool-item> that separates groups of other <gtk-
tool-items>. Depending on the theme, a <gtk-separator-tool-item> will often look

like a vertical line on horizontally docked toolbars.

If the property "expand" is #t and the property "draw" is #f, a <gtk-separator-tool-item> will act as a "spring" that forces other items to the ends of the toolbar.

Use gtk-separator-tool-item-new to create a new <gtk-separator-tool-item>.

67.2 Usage

[Class] <gtk-separator-tool-item>
Derives from <gtk-tool-item>.

This class defines the following slots:

draw Whether the separator is drawn, or just blank

[Function] gtk-separator-tool-item-new ⇒ (ret <gtk-tool-item>)
Create a new <gtk-separator-tool-item>
ret  the new <gtk-separator-tool-item>

Since 2.4

[Function] gtk-separator-tool-item-set-draw
   (self <gtk-separator-tool-item>) (draw bool)
[Method] set-draw

When separator-tool-items is drawn as a vertical line, or just blank. Setting this #f along with gtk-tool-item-set-expand is useful to create an item that forces following items to the end of the toolbar.

item  a <gtk-separator-tool-item>

draw whether separator-tool-item is drawn as a vertical line

Since 2.4

[Function] gtk-separator-tool-item-get-draw
   (self <gtk-separator-tool-item>) ⇒ (ret bool)
[Method] get-draw

Returns whether separator-tool-item is drawn as a line, or just blank. See gtk-

separator-tool-item-set-draw.
item  a <gtk-separator-tool-item>

ret #t if separator-tool-item is drawn as a line, or just blank.

Since 2.4

68 GtkToolButton

A GtkToolItem subclass that displays buttons

68.1 Overview

<gtk-tool-button>s are <gtk-tool-items> containing buttons.
   Use gtk-tool-button-new to create a new <gtk-tool-button>.  Use gtk-
tool-button-new-with-stock to create a <gtk-tool-button> containing a stock

item.

The label of a <gtk-tool-button> is determined by the properties "label widget", "label", and "stock id". If "label widget" is non-‘#f’, then that widget is used as the label. Otherwise, if "label" is non-‘#f’, that string is used as the label. Otherwise, if "stock id" is non-‘#f’, the label is determined by the stock item. Otherwise, the button does not have a label.

The icon of a <gtk-tool-button> is determined by the properties "icon widget" and "stock id". If "icon widget" is non-‘#f’, then that widget is used as the icon. Otherwise, if "stock id" is non-‘#f’, the icon is determined by the stock item. Otherwise, the button does not have a label.

68.2 Usage

[Class] <gtk-tool-button>
     Derives from <gtk-tool-item>.

This class defines the following slots:

label Text to show in the item.

     use-underline

If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu

     label-widget

Widget to use as the item label

stock-id The stock icon displayed on the item

     icon-name

The name of the themed icon displayed on the item

     icon-widget

Icon widget to display in the item

[Signal on <gtk-tool-button>] clicked

This signal is emitted when the tool button is clicked with the mouse or activated with the keyboard.

[Function] gtk-tool-button-new (icon widget <gtk-widget>) (label mchars)
        ⇒ (ret <gtk-tool-item>)

Creates a new ‘GtkToolButton’ using icon-widget as icon and label as label. icon-widget

a widget that will be used as icon widget, or ‘#f’

label a string that will be used as label, or ‘#f’

ret  A new <gtk-tool-button>

Since 2.4

[Function] gtk-tool-button-new-from-stock (stock id mchars)
   ⇒ (ret <gtk-tool-item>)

Creates a new <gtk-tool-button> containing the image and text from a stock item. Some stock ids have preprocessor macros like <gtk-stock-ok> and <gtk-stock-

apply>.

It is an error if stock-id is not a name of a stock item.

stock-id the name of the stock item

ret  A new <gtk-tool-button>

Since 2.4

[Function] gtk-tool-button-set-label (self <gtk-tool-button>)

(label mchars)

[Method] set-label

Sets label as the label used for the tool button. The "label" property only has an effect if not overridden by a non-‘#f’ "label widget" property. If both the "label widget" and "label" properties are ‘#f’, the label is determined by the "stock id" property. If the "stock id" property is also ‘#f’, button will not have a label.

button  a <gtk-tool-button>

label a string that will be used as label, or ‘#f’.

Since 2.4

[Function] gtk-tool-button-get-label (self <gtk-tool-button>)
   ⇒ (ret mchars)
[Method] get-label

Returns the label used by the tool button, or ‘#f’ if the tool button doesn’t have a label. or uses a the label from a stock item. The returned string is owned by GTK+, and must not be modified or freed.

button  a <gtk-tool-button>

ret The label, or ‘#f’

Since 2.4

[Function] gtk-tool-button-set-use-underline (self <gtk-tool-button>)

(use underline bool)

[Method] set-use-underline

If set, 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 ‘#t’, 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.

button  a <gtk-tool-button>

use-underline whether the button label has the form " Open"

Since 2.4

[Function] gtk-tool-button-get-use-underline (self <gtk-tool-button>)

⇒ (ret bool)

[Method] get-use-underline

Returns whether underscores in the label property are used as mnemonics on menu

items on the overflow menu. See gtk-tool-button-set-use-underline.
button  a <gtk-tool-button>

ret ‘#t’ if underscores in the label property are used as mnemonics on menu items on the overflow menu.

Since 2.4

[Function] gtk-tool-button-set-stock-id (self <gtk-tool-button>)

(stock id mchars)

[Method] set-stock-id

Sets the name of the stock item. See gtk-tool-button-new-from-stock. The stock id property only has an effect if not overridden by non-‘#f’ "label" and "icon widget" properties.

button  a <gtk-tool-button>

stock-id a name of a stock item, or ‘#f’

Since 2.4

[Function] gtk-tool-button-get-stock-id (self <gtk-tool-button>)
   ⇒ (ret mchars)
[Method] get-stock-id

Returns the name of the stock item. See gtk-tool-button-set-stock-id. The returned string is owned by GTK+ and must not be freed or modifed.

button  a <gtk-tool-button>

ret the name of the stock item for button.

Since 2.4

[Function] gtk-tool-button-set-icon-name (self <gtk-tool-button>)

(icon name mchars)

[Method] set-icon-name

Sets the icon for the tool button from a named themed icon. See the docs for <gtkicon-theme> for more details. The "icon name" property only has an effect if not overridden by non-‘#f’ "label", "icon widget" and "stock id" properties.

button  a <gtk-tool-button>

icon-name the name of the themed icon

Since 2.8

[Function] gtk-tool-button-get-icon-name (self <gtk-tool-button>)
   ⇒ (ret mchars)
[Method] get-icon-name

Returns the name of the themed icon for the tool button, see gtk-tool-button-set-

icon-name.
button  a <gtk-tool-button>

ret the icon name or ‘#f’ if the tool button has no themed icon

Since 2.8

[Function] gtk-tool-button-set-icon-widget (self <gtk-tool-button>)
   (icon widget <gtk-widget>)
[Method] set-icon-widget

Sets icon as the widget used as icon on button. If icon-widget is ‘#f’ the icon is determined by the "stock id" property. If the "stock id" property is also ‘#f’, button will not have an icon.

button  a <gtk-tool-button>

icon-widget the widget used as icon, or ‘#f’

Since 2.4

[Function] gtk-tool-button-get-icon-widget (self <gtk-tool-button>)
   ⇒ (ret <gtk-widget>)
[Method] get-icon-widget

Return the widget used as icon widget on button. See gtk-tool-button-set-icon-

widget.
button  a <gtk-tool-button>

ret The widget used as icon on button, or ‘#f’.

Since 2.4

[Function] gtk-tool-button-set-label-widget (self <gtk-tool-button>)

(label widget <gtk-widget>)

[Method] set-label-widget

Sets label-widget as the widget that will be used as the label for button. If labelwidget is ‘#f’ the "label" property is used as label. If "label" is also ‘#f’, the label in the stock item determined by the "stock id" property is used as label. If "stock id" is also ‘#f’, button does not have a label.

button  a <gtk-tool-button>

label-widget the widget used as label, or ‘#f’

Since 2.4

[Function] gtk-tool-button-get-label-widget (self <gtk-tool-button>)
   ⇒ (ret <gtk-widget>)
[Method] get-label-widget

Returns the widget used as label on button. See gtk-tool-button-set-label-

widget.
button  a <gtk-tool-button>

ret The widget used as label on button, or ‘#f’.

Since 2.4

69 GtkMenuToolButton

A GtkToolItem containing a button with an additional dropdown menu

69.1 Overview

A <gtk-menu-tool-button> is a <gtk-tool-item> that contains a button and a small

additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Use gtk-menu-tool-button-new to create a new <gtk-menu-tool-button>. Use gtk-
menu-tool-button-new-from-stock to create a new <gtk-menu-tool-button> containing

a stock item.

69.2 Usage

[Class] <gtk-menu-tool-button>
Derives from <gtk-tool-button>.

This class defines the following slots:

menu The dropdown menu

[Signal on <gtk-menu-tool-button>] show-menu
[Function] gtk-menu-tool-button-new (icon widget <gtk-widget>)
   (label mchars) ⇒ (ret <gtk-tool-item>)

Creates a new <gtk-menu-tool-button> using icon-widget as icon and label as label.

icon-widget a widget that will be used as icon widget, or ‘#f’

label a string that will be used as label, or ‘#f’

ret  the new <gtk-menu-tool-button>

Since 2.6

[Function] gtk-menu-tool-button-new-from-stock (stock id mchars)
   ⇒ (ret <gtk-tool-item>)
Creates a new <gtk-menu-tool-button>. The new <gtk-menu-tool-button> will

contain an icon and label from the stock item indicated by stock-id.

stock-id the name of a stock item

ret  the new <gtk-menu-tool-button>

Since 2.6

[Function] gtk-menu-tool-button-set-menu (self <gtk-menu-tool-button>)
   (menu <gtk-widget>)
[Method] set-menu

Sets the <gtk-menu> that is popped up when the user clicks on the arrow. If menu is NULL, the arrow button becomes insensitive.

button  a <gtk-menu-tool-button>
menu  the <gtk-menu> associated with <gtk-menu-tool-button>

Since 2.6

[Function] gtk-menu-tool-button-get-menu (self <gtk-menu-tool-button>)
   ⇒ (ret <gtk-widget>)
[Method] get-menu
Gets the <gtk-menu> associated with <gtk-menu-tool-button>.
button  a <gtk-menu-tool-button>
ret  the <gtk-menu> associated with <gtk-menu-tool-button>

Since 2.6

70 GtkToggleToolButton

A GtkToolItem containing a toggle button

70.1 Overview

A <gtk-toggle-tool-button> is a <gtk-tool-item> that contains a toggle button.
Use gtk-toggle-tool-button-new to create a new <gtk-toggle-tool-button>. Use
gtk-toggle-tool-button-new-from-stock to create a new <gtk-toggle-tool-button>

containing a stock item.

70.2 Usage

[Class] <gtk-toggle-tool-button>
Derives from <gtk-tool-button>.

This class defines the following slots:

active If the toggle button should be pressed in or not

[Signal on <gtk-toggle-tool-button>] toggled

Emitted whenever the toggle tool button changes state.

[Function] gtk-toggle-tool-button-new ⇒ (ret <gtk-tool-item>)
Returns a new <gtk-toggle-tool-button>
ret  a newly created <gtk-toggle-tool-button>

Since 2.4

[Function] gtk-toggle-tool-button-set-active
   (self <gtk-toggle-tool-button>) (is active bool)
[Method] set-active

Sets the status of the toggle tool button. Set to ‘#t’ if you want the GtkToggleButton to be ’pressed in’, and ‘#f’ to raise it. This action causes the toggled signal to be emitted.

button  a <gtk-toggle-tool-button>

is-active whether button should be active

Since 2.4

[Function] gtk-toggle-tool-button-get-active
   (self <gtk-toggle-tool-button>) ⇒ (ret bool)
[Method] get-active

Queries a <gtk-toggle-tool-button> and returns its current state. Returns ‘#t’ if the toggle button is pressed in and ‘#f’ if it is raised.

button  a <gtk-toggle-tool-button>

ret ‘#t’ if the toggle tool button is pressed in, ‘#f’ if not

Since 2.4

71 GtkRadioToolButton

A toolbar item that contains a radio button

71.1 Overview

A <gtk-radio-tool-button> is a <gtk-tool-item> 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 gtk-radio-tool-button-new to create a new <gtk-radio-tool-button>. use
gtk-radio-tool-button-new-from-widget to create a new <gtk-radio-tool-button>

that is part of the same group as an existing <gtk-radio-tool-button>. Use

gtk-radio-tool-button-new-from-stock or gtk-radio-tool-button-new-from-
widget-with-stock to create a new <gtk-radio-tool-button> containing a stock

item.

71.2 Usage

[Class] <gtk-radio-tool-button>
Derives from <gtk-toggle-tool-button>.

This class defines the following slots:

group The radio tool button whose group this button belongs to.

[Function] gtk-radio-tool-button-new (group <gtk-radio-group*>)
   ⇒ (ret <gtk-tool-item>)

Creates a new <gtk-radio-tool-button>, adding it to group.

group An existing radio button group, or ‘#f’ if you are creating a new group

ret  The new <gtk-radio-tool-button>

Since 2.4

[Function] gtk-radio-tool-button-get-group
   (self <gtk-radio-tool-button>) ⇒ (ret <gtk-radio-group*>)
[Method] get-group

Returns the radio button group button belongs to.

button  a <gtk-radio-tool-button>

ret The group button belongs to.

Since 2.4

[Function] gtk-radio-tool-button-set-group
   (self <gtk-radio-tool-button>) (group <gtk-radio-group*>)
[Method] set-group

Adds button to group, removing it from the group it belonged to before.

button  a <gtk-radio-tool-button>

group an existing radio button group

Since 2.4

72 GtkUIManager

Constructing menus and toolbars from an XML description

72.1 Overview

A <gtk-ui-manager> constructs a user interface (menus and toolbars) from one or more UI definitions, which reference actions from one or more action groups.

72.2 UI Definitions

The UI definitions are specified in an XML format which can be roughly described by the following DTD. There are some additional restrictions beyond those specified in the DTD, e.g. every toolitem must have a toolbar in its anchestry and every menuitem must have a menubar or popup in its anchestry. Since a <g-markup> parser is used to parse the UI description, it must not only be valid XML, but valid <g-markup>.

<!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     (menu?) >
<!ELEMENT separator    EMPTY >
<!ELEMENT accelerator  EMPTY >
<!ATTLIST menubar      name                  &#x0023;IMPLIED
                       action                &#x0023;IMPLIED >
<!ATTLIST toolbar      name                  &#x0023;IMPLIED
                       action                &#x0023;IMPLIED >
<!ATTLIST popup        name                  &#x0023;IMPLIED
                       action                &#x0023;IMPLIED >
<!ATTLIST placeholder  name                  &#x0023;IMPLIED
                       action                &#x0023;IMPLIED >
<!ATTLIST separator    name                  &#x0023;IMPLIED
                       action                &#x0023;IMPLIED
                       expand   (true|false) &#x0023;IMPLIED >
<!ATTLIST menu         name                  &#x0023;IMPLIED
                       action                &#x0023;REQUIRED
                       position (top|bot)    &#x0023;IMPLIED >
<!ATTLIST menuitem     name                  &#x0023;IMPLIED
                       action                &#x0023;REQUIRED
                       position (top|bot)    &#x0023;IMPLIED >
<!ATTLIST toolitem     name                  &#x0023;IMPLIED
                       action                &#x0023;REQUIRED
                       position (top|bot)    &#x0023;IMPLIED >

     <!ATTLIST accelerator  name                  &#x0023;IMPLIED
                            action                &#x0023;REQUIRED >

If a name is not specified, it defaults to the action. If an action is not specified either, the element name is used. The name and action attributes must not contain ’/’ characters after parsing (since that would mess up path lookup) and must be usable as XML attributes when enclosed in doublequotes, thus they must not ’"’ characters or references to the &quot; entity.

     <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:

toolbar

popup

menu

menuitem

toolitem

separator

accelerator

   a <gtk-menu-bar>

   a <gtk-toolbar>
   a toplevel <gtk-menu>

a <gtk-menu> attached to a menuitem

a <gtk-menu-item> subclass, the exact type depends on the action

a <gtk-tool-item> subclass, the exact type depends on the action. Note that toolitem elements may contain a menu element, but only if their associated action specifies a <gtk-

menu-tool-button> as proxy.
   a <gtk-separator-menu-item> or <gtk-separator-tool-item>

a keyboard accelerator

The "position" attribute determines where a constructed widget is positioned wrt. to its siblings in the partially constructed tree. If it is "top", the widget is prepended, otherwise it is appended.

72.3 UI Merging

The most remarkable feature of <gtk-ui-manager> is that it can overlay a set of menuitems and toolitems over another one, and demerge them later.

Merging is done based on the names of the XML elements. Each element is identified by a path which consists of the names of its anchestors, 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’.

72.4 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.

72.5 Smart Separators

The separators created by <gtk-ui-manager> 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.

For separators in toolbars, you can set ‘expand="true"’ to turn them from a small, visible separator to an expanding, invisible one. Toolitems following an expanding separator are effectively right-aligned.

72.6 Empty Menus

Submenus pose similar problems to separators inconnection with merging. It is impossible to know in advance whether they will end up empty after merging. <gtk-ui-manager> offers two ways to treat empty submenus: The behaviour is chosen based on the "hide if empty" property of the action to which the submenu is associated.

make them disappear by hiding the menu item they’re attached to

add an insensitive "Empty" item

72.7 Usage

[Class] <gtk-ui-manager>
Derives from <gtk-buildable>, <gobject>.

This class defines the following slots:

add-tearoffs

Whether tearoff menu items should be added to menus

ui An XML string describing the merged UI

[Signal on <gtk-ui-manager>] connect-proxy (arg0 <gtk-action>)
   (arg1 <gtk-widget>)

The connect proxy signal is emitted after connecting a proxy to an 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.

Since 2.4

[Signal on <gtk-ui-manager>] disconnect-proxy (arg0 <gtk-action>)
   (arg1 <gtk-widget>)

The disconnect proxy signal is emitted after disconnecting a proxy from an action in the group.

Since 2.4

[Signal on <gtk-ui-manager>] pre-activate (arg0 <gtk-action>)

The pre activate signal is emitted just before the action is activated.

This is intended for applications to get notification just before any action is activated.

Since 2.4

[Signal on <gtk-ui-manager>] post-activate (arg0 <gtk-action>)

The post activate signal is emitted just after the action is activated.

This is intended for applications to get notification just after any action is activated.

Since 2.4

[Signal on <gtk-ui-manager>] add-widget (arg0 <gtk-widget>)

The add widget signal is emitted for each generated menubar and toolbar. It is not emitted for generated popup menus, which can be obtained by gtk-ui-manager-get-

widget.

Since 2.4

[Signal on <gtk-ui-manager>] actions-changed

The "actions-changed" signal is emitted whenever the set of actions changes.

Since 2.4

[Function] gtk-ui-manager-new ⇒ (ret <gtk-ui-manager>)

Creates a new ui manager object.

ret a new ui manager object.

Since 2.4

[Function] gtk-ui-manager-set-add-tearoffs (self <gtk-ui-manager>)

(add tearoffs bool)

[Method] set-add-tearoffs

Sets the "add tearoffs" property, which controls whether menus generated by this <gtk-ui-manager> will have tearoff menu items.

Note that this only affects regular menus. Generated popup menus never have tearoff menu items.

self  a <gtk-ui-manager>

add-tearoffs whether tearoff menu items are added

Since 2.4

[Function] gtk-ui-manager-get-add-tearoffs (self <gtk-ui-manager>)

⇒ (ret bool)

[Method] get-add-tearoffs

Returns whether menus generated by this <gtk-ui-manager> will have tearoff menu items.

self  a <gtk-ui-manager>

ret whether tearoff menu items are added

Since 2.4

[Function] gtk-ui-manager-insert-action-group (self <gtk-ui-manager>)
   (action group <gtk-action-group>) (pos int)
[Method] insert-action-group

Inserts an action group into the list of action groups associated with self. Actions in earlier groups hide actions with the same name in later groups.

self  a <gtk-ui-manager> object

action-group the action group to be inserted

pos the position at which the group will be inserted.

[Function] gtk-ui-manager-remove-action-group (self <gtk-ui-manager>)
   (action group <gtk-action-group>)
[Method] remove-action-group

Removes an action group from the list of action groups associated with self.

self  a <gtk-ui-manager> object

action-group the action group to be removed

Since 2.4

[Function] gtk-ui-manager-get-action-groups (self <gtk-ui-manager>)
   ⇒ (ret glist-of)
[Method] get-action-groups

Returns the list of action groups associated with self.

self  a <gtk-ui-manager> object

ret a <g-list> of action groups. The list is owned by GTK+ and should not be modified.

Since 2.4

[Function] gtk-ui-manager-get-accel-group (self <gtk-ui-manager>)
   ⇒ (ret <gtk-accel-group>)
[Method] get-accel-group

Returns the <gtk-accel-group> associated with self.

self  a <gtk-ui-manager> object
ret  the <gtk-accel-group>.

Since 2.4

[Function] gtk-ui-manager-get-widget (self <gtk-ui-manager>) (path mchars)
   ⇒ (ret <gtk-widget>)
[Method] get-widget

Looks up a widget by following a path. The path consists of the names specified in the XML description of the UI. separated by ’/’. Elements which 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. Note that the widget found by following a path that ends in a <menu> element is the menuitem to which the menu is attached, not the menu itself. Also note that the widgets constructed by a ui manager are not tied to the lifecycle of the ui manager. If you add the widgets returned by this function to some container or explicitly ref them, they will survive the destruction of the ui manager.

self  a <gtk-ui-manager>

path a path

ret the widget found by following the path, or ‘#f’ if no widget was found.

Since 2.4

[Function] gtk-ui-manager-get-toplevels (self <gtk-ui-manager>)
   (types <gtk-ui-manager-item-type>) ⇒ (ret gslist-of)
[Method] get-toplevels

Obtains a list of all toplevel widgets of the requested types.

self  a <gtk-ui-manager>

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>.

ret a newly-allocated of all toplevel widgets of the requested types.

Since 2.4

[Function] gtk-ui-manager-get-action (self <gtk-ui-manager>) (path mchars)
   ⇒ (ret <gtk-action>)
[Method] get-action

Looks up an action by following a path. See gtk-ui-manager-get-widget for more information about paths.

self  a <gtk-ui-manager>

path a path

ret the action whose proxy widget is found by following the path, or ‘#f’ if no widget was found.

Since 2.4

[Function] gtk-ui-manager-add-ui-from-string (self <gtk-ui-manager>)
   (buffer mchars) ⇒ (ret unsigned-int)
[Method] add-ui-from-string

Parses a string containing a UI definition and merges it with the current contents of self. An enclosing <ui> element is added if it is missing.

self  a <gtk-ui-manager> object

buffer the string to parse

length the length of buffer (may be -1 if buffer is nul-terminated)

error return location for an error

ret The merge id for the merged UI. The merge id can be used to unmerge the UI with gtk-ui-manager-remove-ui. If an error occurred, the return value is 0.

Since 2.4

[Function] gtk-ui-manager-add-ui-from-file (self <gtk-ui-manager>)
   (filename mchars) ⇒ (ret unsigned-int)
[Method] add-ui-from-file

Parses a file containing a UI definition and merges it with the current contents of self.

self  a <gtk-ui-manager> object

filename the name of the file to parse error return location for an error ret The merge id for the merged UI. The merge id can be used to unmerge

the UI with gtk-ui-manager-remove-ui. If an error occurred, the return value is 0.

Since 2.4

[Function] gtk-ui-manager-new-merge-id (self <gtk-ui-manager>)
   ⇒ (ret unsigned-int)
[Method] new-merge-id

Returns an unused merge id, suitable for use with gtk-ui-manager-add-ui.

self  a <gtk-ui-manager>

ret an unused merge id. Since 2.4

[Function] gtk-ui-manager-add-ui (self <gtk-ui-manager>)
   (merge id unsigned-int) (path mchars) (name mchars) (action mchars)
   (type <gtk-ui-manager-item-type>) (top bool)

[Method] add-ui

Adds a UI element to the current contents of self. If type is ‘GTK_UI_MANAGER_AUTO’, GTK+ inserts a menuitem, toolitem or separator if such an element can be inserted at the place determined by path. Otherwise type must indicate an element that can be inserted at the place determined by path. If path points to a menuitem or toolitem, the new element will be inserted before or after this item, depending on top.

self  a <gtk-ui-manager>

merge-id the merge id for the merged UI, see gtk-ui-manager-new-merge-id path a path name the name for the added UI element action the name of the action to be proxied, or ‘#f’ to add a separator type the type of UI element to add. top if ‘#t’, the UI element is added before its siblings, otherwise it is added

after its siblings.

Since 2.4

[Function] gtk-ui-manager-remove-ui (self <gtk-ui-manager>)
   (merge id unsigned-int)
[Method] remove-ui

Unmerges the part of self s content identified by merge-id.

self  a <gtk-ui-manager> object
merge-id a merge id as returned by gtk-ui-manager-add-ui-from-string

Since 2.4

[Function] gtk-ui-manager-get-ui (self <gtk-ui-manager>) ⇒ (ret mchars)

[Method] get-ui

Creates a UI definition of the merged UI.

self  a <gtk-ui-manager>

ret A newly allocated string containing an XML representation of the merged UI.

Since 2.4

[Function] gtk-ui-manager-ensure-update (self <gtk-ui-manager>)
[Method] ensure-update

Makes sure that all pending updates to the UI have been completed. This may occasionally be necessary, since <gtk-ui-manager> updates the UI in an idle function. A typical example where this function is useful is to enforce that the menubar and toolbar have been added to the main window before showing it:

     gtk_container_add (GTK_CONTAINER (window), vbox);
     g_signal_connect (merge, "add_widget",
                       G_CALLBACK (add_widget), vbox);
     gtk_ui_manager_add_ui_from_file (merge, "my-menus");
     gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
     gtk_ui_manager_ensure_update (merge);
     gtk_widget_show (window);
self  a <gtk-ui-manager>

Since 2.4

73 GtkActionGroup

A group of actions

73.1 Overview

Actions are organised into groups. An action group is essentially 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 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, one group holding global actions (e.g. quit, about, new), and one group per document holding actions that act on that document (eg. save, cut/copy/paste, etc). Each window’s menus would be constructed from a combination of two action groups.

Accelerators are handled by the GTK+ accelerator map. All actions are assigned an accelerator path (which normally has the form ‘<Actions>//’) 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.

73.2 Usage

[Class] <gtk-action-group>
     Derives from <gtk-buildable>, <gobject>.

This class defines the following slots:

name A name for the action group.

     sensitive

Whether the action group is enabled.

visible Whether the action group is visible.

[Signal on <gtk-action-group>] connect-proxy (arg0 <gtk-action>)
        (arg1 <gtk-widget>)

The connect proxy signal is emitted after connecting a proxy to an action in the group. Note that the proxy may have been connected to a different action before. 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. <gtk-ui-manager> proxies the signal and provides global notification just before any action is connected to a proxy, which is probably more convenient to use. Since 2.4

[Signal on <gtk-action-group>] disconnect-proxy (arg0 <gtk-action>)
        (arg1 <gtk-widget>)

The disconnect proxy signal is emitted after disconnecting a proxy from an action in the group.

<gtk-ui-manager> proxies the signal and provides global notification just before any action is connected to a proxy, which is probably more convenient to use. Since 2.4

[Signal on <gtk-action-group>] pre-activate (arg0 <gtk-action>)

The pre activate signal is emitted just before the action in the action-group is activated This is intended for <gtk-ui-manager> to proxy the signal and provide global notification just before any action is activated. Since 2.4

[Signal on <gtk-action-group>] post-activate (arg0 <gtk-action>)

The post activate signal is emitted just after the action in the action-group is activated This is intended for <gtk-ui-manager> to proxy the signal and provide global notification just after any action is activated. Since 2.4

[Function] gtk-action-group-new (name mchars) ⇒ (ret <gtk-action-group>)

Creates a new <gtk-action-group> object. The name of the action group is used when associating keybindings with the actions.

name the name of the action group.

ret  the new <gtk-action-group>

Since 2.4

[Function] gtk-action-group-get-name (self <gtk-action-group>)
   ⇒ (ret mchars)
[Method] get-name

Gets the name of the action group.

action-group the action group

ret the name of the action group.

Since 2.4

[Function] gtk-action-group-get-sensitive (self <gtk-action-group>)

⇒ (ret bool)

[Method] get-sensitive

Returns ‘#t’ if the group is sensitive. The constituent actions can only be logically

sensitive (see gtk-action-is-sensitive) if they are sensitive (see gtk-action-get-

sensitive) and their group is sensitive.

action-group the action group

ret ‘#t’ if the group is sensitive.

Since 2.4

[Function] gtk-action-group-set-sensitive (self <gtk-action-group>)

(sensitive bool)

[Method] set-sensitive

Changes the sensitivity of action-group

action-group the action group

sensitive new sensitivity

Since 2.4

[Function] gtk-action-group-get-visible (self <gtk-action-group>)

⇒ (ret bool)

[Method] get-visible

Returns ‘#t’ if the group is visible. The constituent actions can only be logically visible

(see gtk-action-is-visible) if they are visible (see gtk-action-get-visible) and

their group is visible.

action-group the action group

ret ‘#t’ if the group is visible.

Since 2.4

[Function] gtk-action-group-set-visible (self <gtk-action-group>)

(visible bool)

[Method] set-visible

Changes the visible of action-group.

action-group the action group

visible new visiblity

Since 2.4

[Function] gtk-action-group-get-action (self <gtk-action-group>)
   (action name mchars) ⇒ (ret <gtk-action>)
[Method] get-action

Looks up an action in the action group by name.

action-group the action group

action-name the name of the action

ret the action, or ‘#f’ if no action by that name exists

[Function] gtk-action-group-list-actions (self <gtk-action-group>)
   ⇒ (ret glist-of)
[Method] list-actions

Lists the actions in the action group.

action-group the action group

ret an allocated list of the action objects in the action group

Since 2.4

[Function] gtk-action-group-add-action (self <gtk-action-group>)
   (action <gtk-action>)
[Method] add-action

Adds an action object to the action group. Note that this function does not set up the accel path of the action, which can lead to problems if a user tries to modify the accelerator of a menuitem associated with the action. Therefore you must either set the accel path yourself with gtk-action-set-accel-path, or use

‘gtk_action_group_add_action_with_accel (..., NULL)’.

action-group the action group

action an action

Since 2.4

[Function] gtk-action-group-remove-action (self <gtk-action-group>)
   (action <gtk-action>)
[Method] remove-action

Removes an action object from the action group.

action-group the action group

action an action

Since 2.4

[Function] gtk-action-group-add-actions (self <gtk-action-group>)

(entries scm)

[Method] add-actions

This is a convenience function to create a number of actions and add them to the action group. The "activate" signals of the actions are connected to the callbacks and their accel paths are set to ‘<Actions>//’.

action-group The action group

scm An list of actions. The actions are of the form (name stock-id label accelerator tooltip proc?). All values are strings except the proc, which should be a procedure suitable for connecting to the activate signal on the action. stock-id, label, accelerator, tooltip, and proc may be #f.

Since 2.4

[Function] gtk-action-group-add-toggle-actions (self <gtk-action-group>)

(entries scm)

[Method] add-toggle-actions

This is a convenience function to create a number of toggle actions and add them to the action group. The "activate" signals of the actions are connected to the callbacks and their accel

paths are set to ‘<Actions>/group-name/action-name’.

action-group the action group

entries an array of toggle action descriptions

n-entries the number of entries

user-data data to pass to the action callbacks

Since 2.4

[Function] gtk-action-group-add-radio-actions (self <gtk-action-group>)

(entries scm) (value int) (on change scm)

[Method] add-radio-actions

This is a convenience routine to create a group of radio actions and add them to the action group. The "changed" signal of the first radio action is connected to the on-change callback and the accel paths of the actions are set to ‘<Actions>/group-name/action-name’.

action-group the action group

entries an array of radio action descriptions

n-entries the number of entries

value the value of the action to activate initially, or -1 if no action should be activated

on-change the callback to connect to the changed signal

user-data data to pass to the action callbacks

Since 2.4

[Function] gtk-action-group-translate-string (self <gtk-action-group>)

(string mchars) ⇒ (ret mchars)

[Method] translate-string

Translates a string using the specified translate-func. This is mainly intended for language bindings.

action-group

          a <gtk-action-group>

string a string ret the translation of string Since 2.6

74 GtkAction

An action which can be triggered by a menu or toolbar item

74.1 Overview

Actions represent operations that the user can be perform, along with some information how it should be presented in the interface. Each 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: The action will also have some state information:

a name (not translated, for path lookup)

a label (translated, for display)

an accelerator

whether label indicates a stock id

a tooltip (optional, translated)

a toolbar label (optional, shorter than label)

visible (shown/hidden)

sensitive (enabled/disabled)

Apart from regular actions, there are toggle actions, which can be toggled between two states and radio actions, of which only one in a group can be in the "active" state. Other actions can be implemented as <gtk-action> subclasses.

Each action can have one or more proxy menu item, toolbar button 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.

74.2 Usage

[Class] <gtk-action>
     Derives from <gtk-buildable>, <gobject>.

This class defines the following slots: name A unique name for the action. label The label used for menu items and buttons that activate this action.

     short-label

A shorter label that may be used on toolbar buttons.

tooltip A tooltip for this action.

stock-id The stock icon displayed in widgets representing this action.

     icon-name

The name of the icon from the icon theme

visible-horizontal

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

visible-vertical

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

visible-overflown

When TRUE, toolitem proxies for this action are represented in the toolbar overflow menu.

is-important

Whether the action is considered important. When TRUE, toolitem proxies for this action show text in GTK TOOLBAR BOTH HORIZ mode.

hide-if-empty

When TRUE, empty menu proxies for this action are hidden.

sensitive

Whether the action is enabled.

visible Whether the action is visible.

action-group

The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).

[Signal on <gtk-action>] activate

The "activate" signal is emitted when the action is activated. Since 2.4

[Function] gtk-action-new (name mchars) (label mchars) (tooltip mchars)
   (stock id mchars) ⇒ (ret <gtk-action>)

Creates a new <gtk-action> object. To add the action to a <gtk-action-group> and

set the accelerator for the action, call gtk-action-group-add-action-with-accel.

See (the missing figure, XML-UI for information on allowed action names.

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

ret  a new <gtk-action>

Since 2.4

[Function] gtk-action-get-name (self <gtk-action>) ⇒ (ret mchars)
[Method] get-name

Returns the name of the action.

action the action object ret the name of the action. The string belongs to GTK+ and should not be

freed.

Since 2.4

[Function] gtk-action-is-sensitive (self <gtk-action>) ⇒ (ret bool)
[Method] is-sensitive

Returns whether the action is effectively sensitive.

action the action object

ret ‘#t’ if the action and its associated action group are both sensitive.

Since 2.4

[Function] gtk-action-get-sensitive (self <gtk-action>) ⇒ (ret bool)
[Method] get-sensitive

Returns whether the action itself is sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk-action-is-sensitive for that.

action the action object

ret ‘#t’ if the action itself is sensitive.

Since 2.4

[Function] gtk-action-set-sensitive (self <gtk-action>) (sensitive bool)
[Method] set-sensitive

Sets the ::sensitive property of the action to sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk-action-is-sensitive for that.

action the action object

sensitive ‘#t’ to make the action sensitive

Since 2.6

[Function] gtk-action-is-visible (self <gtk-action>) ⇒ (ret bool)
[Method] is-visible

Returns whether the action is effectively visible.

action the action object

ret ‘#t’ if the action and its associated action group are both visible.

Since 2.4

[Function] gtk-action-get-visible (self <gtk-action>) ⇒ (ret bool)
[Method] get-visible

Returns whether the action itself is visible. Note that this doesn’t necessarily mean effective visibility. See gtk-action-is-sensitive for that.

action the action object

ret ‘#t’ if the action itself is visible.

Since 2.4

[Function] gtk-action-set-visible (self <gtk-action>) (visible bool)
[Method] set-visible

Sets the ::visible property of the action to visible. Note that this doesn’t necessarily mean effective visibility. See gtk-action-is-visible for that.

action the action object

visible ‘#t’ to make the action visible

Since 2.6

[Function] gtk-action-activate (self <gtk-action>)
[Method] activate

Emits the "activate" signal on the specified 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.

action the action object

Since 2.4

[Function] gtk-action-create-icon (self <gtk-action>)
   (icon size <gtk-icon-size>) ⇒ (ret <gtk-widget>)
[Method] create-icon

This function is intended for use by action implementations to create icons displayed in the proxy widgets.

action the action object

icon-size the size of the icon that should be created.

ret a widget that displays the icon for this action.

Since 2.4

[Function] gtk-action-create-menu-item (self <gtk-action>)
   ⇒ (ret <gtk-widget>)
[Method] create-menu-item

Creates a menu item widget that proxies for the given action.

action the action object

ret a menu item connected to the action.

Since 2.4

[Function] gtk-action-create-tool-item (self <gtk-action>)
   ⇒ (ret <gtk-widget>)
[Method] create-tool-item

Creates a toolbar item widget that proxies for the given action.

action the action object

ret a toolbar item connected to the action.

Since 2.4

[Function] gtk-action-connect-proxy (self <gtk-action>)
   (proxy <gtk-widget>)
[Method] connect-proxy

Connects a widget to an action object as a proxy. Synchronises various properties of the action with the widget (such as label text, icon, tooltip, etc), and attaches a callback so that the action gets activated when the proxy widget does. If the widget is already connected to an action, it is disconnected first.

action the action object

proxy the proxy widget

Since 2.4

[Function] gtk-action-disconnect-proxy (self <gtk-action>)
   (proxy <gtk-widget>)
[Method] disconnect-proxy

Disconnects a proxy widget from an action. Does not destroy the widget, however.

action the action object

proxy the proxy widget

Since 2.4

[Function] gtk-action-get-proxies (self <gtk-action>) ⇒ (ret gslist-of)
[Method] get-proxies

Returns the proxy widgets for an action. See also gtk-widget-get-action.

action the action object

ret a <gs-list> of proxy widgets. The list is owned by GTK+ and must not be modified.

Since 2.4

[Function] gtk-action-connect-accelerator (self <gtk-action>)
[Method] connect-accelerator

Installs the accelerator for action if action has an accel path and group. See gtk-

action-set-accel-path and gtk-action-set-accel-group

Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and doesn’t remove the accelerator until gtk-action-disconnect-accelerator has been called as many times.

action  a <gtk-action>

Since 2.4

[Function] gtk-action-disconnect-accelerator (self <gtk-action>)
[Method] disconnect-accelerator
Undoes the effect of one call to gtk-action-connect-accelerator.
action  a <gtk-action>

Since 2.4

[Function] gtk-action-block-activate-from (self <gtk-action>)
   (proxy <gtk-widget>)
[Method] block-activate-from

Disables calls to the gtk-action-activate function by signals on the given proxy widget. This is used to break notification loops for things like check or radio actions. This function is intended for use by action implementations.

action the action object

proxy a proxy widget

Since 2.4

[Function] gtk-action-unblock-activate-from (self <gtk-action>)
   (proxy <gtk-widget>)
[Method] unblock-activate-from

Re-enables calls to the gtk-action-activate function by signals on the given proxy widget. This undoes the blocking done by gtk-action-block-activate-from. This function is intended for use by action implementations.

action the action object

proxy a proxy widget

Since 2.4

[Function] gtk-action-get-accel-path (self <gtk-action>) ⇒ (ret mchars)
[Method] get-accel-path

Returns the accel path for this action.

action the action object

ret the accel path for this action, or ‘#f’ if none is set. The returned string is owned by GTK+ and must not be freed or modified.

Since 2.6

[Function] gtk-action-set-accel-path (self <gtk-action>)

(accel path mchars)

[Method] set-accel-path

Sets the accel path for this action. All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent.

action the action object

accel-path the accelerator path

Since 2.4

[Function] gtk-action-get-accel-closure (self <gtk-action>)
   ⇒ (ret <gclosure>)
[Method] get-accel-closure

Returns the accel closure for this action.

action the action object ret the accel closure for this action. The returned closure is owned by GTK+

and must not be unreffed or modified.

Since 2.8

[Function] gtk-action-set-accel-group (self <gtk-action>)
   (accel group <gtk-accel-group>)
[Method] set-accel-group

Sets the <gtk-accel-group> in which the accelerator for this action will be installed.

action the action object

accel-group

          a <gtk-accel-group> or ‘#f’

Since 2.4

75 GtkToggleAction

An action which can be toggled between two states

75.1 Overview

A <gtk-toggle-action> corresponds roughly to a <gtk-check-menu-item>. It has an

"active" state specifying whether the action has been checked or not.

75.2 Usage

[Class] <gtk-toggle-action>
Derives from <gtk-action>.

This class defines the following slots:

draw-as-radio

Whether the proxies for this action look like radio action proxies

active If the toggle action should be active in or not

[Signal on <gtk-toggle-action>] toggled
[Function] gtk-toggle-action-new (name mchars) (label mchars)
   (tooltip mchars) (stock id mchars) ⇒ (ret <gtk-toggle-action>)

Creates a new <gtk-toggle-action> object. To add the action to a <gtk-action-group> and set the accelerator for the action, call gtk-action-group-add-action-

with-accel.

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

ret  a new <gtk-toggle-action>

Since 2.4

[Function] gtk-toggle-action-toggled (self <gtk-toggle-action>)

[Method] toggled

Emits the "toggled" signal on the toggle action. action the action object Since 2.4

[Function] gtk-toggle-action-set-active (self <gtk-toggle-action>)

(is active bool)

[Method] set-active

Sets the checked state on the toggle action. action the action object is-active whether the action should be checked or not Since 2.4

[Function] gtk-toggle-action-get-active (self <gtk-toggle-action>)

⇒ (ret bool)

[Method] get-active

Returns the checked state of the toggle action. action the action object ret the checked state of the toggle action Since 2.4

[Function] gtk-toggle-action-set-draw-as-radio
   (self <gtk-toggle-action>) (draw as radio bool)
[Method] set-draw-as-radio

Sets whether the action should have proxies like a radio action. action the action object draw-as-radio

whether the action should have proxies like a radio action

Since 2.4

[Function] gtk-toggle-action-get-draw-as-radio
   (self <gtk-toggle-action>) ⇒ (ret bool)
[Method] get-draw-as-radio

Returns whether the action should have proxies like a radio action. action the action object ret whether the action should have proxies like a radio action. Since 2.4

76 GtkRadioAction

An action of which only one in a group can be active

76.1 Overview

A <gtk-radio-action> is similar to <gtk-radio-menu-item>. A number of radio actions

can be linked together so that only one may be active at any one time.

76.2 Usage

[Class] <gtk-radio-action>
Derives from <gtk-toggle-action>.

This class defines the following slots:

value The value returned by gtk radio action get current value() when this action is the current action of its group.

group The radio action whose group this action belongs to.

current-value

The value property of the currently active member of the group to which this action belongs.

[Signal on <gtk-radio-action>] changed (arg0 <gtk-radio-action>)

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.

Since 2.4

[Function] gtk-radio-action-new (name mchars) (label mchars) (tooltip mchars)
   (stock id mchars) (value int) ⇒ (ret <gtk-radio-action>)

Creates a new <gtk-radio-action> object. To add the action to a <gtk-action-group> and set the accelerator for the action, call gtk-action-group-add-action-

with-accel.

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  The value which gtk-radio-action-get-current-value should return

if this action is selected.

ret  a new <gtk-radio-action>

[Function] gtk-radio-action-get-group (self <gtk-radio-action>)
   ⇒ (ret <gtk-radio-group*>)
[Method] get-group

Returns the list representing the radio group for this object. Note that the returned list is only valid until the next change to the group. A common way to set up a group of radio group is the following:

       GSList *group = NULL;
       GtkRadioAction *action;
       while (/* more actions to add */)
         {
            action = gtk_radio_action_new (...);
            gtk_radio_action_set_group (action, group);
            group = gtk_radio_action_get_group (action);
         }

action the action object

ret the list representing the radio group for this object

Since 2.4

[Function] gtk-radio-action-set-group (self <gtk-radio-action>)
   (group <gtk-radio-group*>)
[Method] set-group

Sets the radio group for the radio action object.

action the action object

group a list representing a radio group

Since 2.4

[Function] gtk-radio-action-get-current-value (self <gtk-radio-action>)

⇒ (ret int)

[Method] get-current-value

Obtains the value property of the currently active member of the group to which action belongs.

action  a <gtk-radio-action>

ret The value of the currently active group member

Since 2.4

[Function] gtk-radio-action-set-current-value (self <gtk-radio-action>)

(current value int)

[Method] set-current-value

Sets the currently active group member to the member with value property currentvalue.

action  a <gtk-radio-action>

current-value

the new value

Since 2.10

77 GtkColorButton

A button to launch a color selection dialog

77.1 Overview

The <gtk-color-button> is a button which displays the currently selected color an allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

77.2 Usage

[Class] <gtk-color-button>
Derives from <gtk-button>.

This class defines the following slots:

use-alpha

Whether or not to give the color an alpha value

title The title of the color selection dialog

color The selected color

alpha The selected opacity value (0 fully transparent, 65535 fully opaque)

[Signal on <gtk-color-button>] color-set

The ::color-set signal is emitted when the user selects a color. When handling this sig-

nal, use gtk-color-button-get-color and gtk-color-button-get-alpha to find

out which color was just selected. Note that this signal is only emitted when the user changes the color. If you need to react to programmatic color changes as well, use the notify::color signal. Since 2.4

[Function] gtk-color-button-new ⇒ (ret <gtk-widget>)

Creates a new color button. This returns a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a color-selection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes.

ret a new color button.

Since 2.4

[Function] gtk-color-button-new-with-color (color <gdk-color>)
   ⇒ (ret <gtk-widget>)

Creates a new color button.

color A <gdk-color> to set the current color with.

ret a new color button.

Since 2.4

[Function] gtk-color-button-set-color (self <gtk-color-button>)
   (color <gdk-color>)
[Method] set-color

Sets the current color to be color.

color-button

          a <gtk-color-button>.

color A <gdk-color> to set the current color with.

Since 2.4

[Function] gtk-color-button-get-color (self <gtk-color-button>)
   (color <gdk-color>)
[Method] get-color

Sets color to be the current color in the <gtk-color-button> widget.

color-button

          a <gtk-color-button>.

color a <gdk-color> to fill in with the current color.

Since 2.4

[Function] gtk-color-button-set-alpha (self <gtk-color-button>)
   (alpha unsigned-int16)
[Method] set-alpha

Sets the current opacity to be alpha.

color-button

          a <gtk-color-button>.

alpha an integer between 0 and 65535.

Since 2.4

[Function] gtk-color-button-get-alpha (self <gtk-color-button>)
   ⇒ (ret unsigned-int16)
[Method] get-alpha

Returns the current alpha value.

color-button

          a <gtk-color-button>.

ret an integer between 0 and 65535.

Since 2.4

[Function] gtk-color-button-set-use-alpha (self <gtk-color-button>)

(use alpha bool)

[Method] set-use-alpha

Sets whether or not the color button should use the alpha channel.

color-button

          a <gtk-color-button>.

use-alpha ‘#t’ if color button should use alpha channel, ‘#f’ if not. Since 2.4

[Function] gtk-color-button-get-use-alpha (self <gtk-color-button>)

⇒ (ret bool)

[Method] get-use-alpha

Does the color selection dialog use the alpha channel? color-button

          a <gtk-color-button>.

ret ‘#t’ if the color sample uses alpha channel, ‘#f’ if not. Since 2.4

[Function] gtk-color-button-set-title (self <gtk-color-button>)

(title mchars)

[Method] set-title

Sets the title for the color selection dialog. color-button

          a <gtk-color-button>

title String containing new window title. Since 2.4

[Function] gtk-color-button-get-title (self <gtk-color-button>)
   ⇒ (ret mchars)
[Method] get-title

Gets the title of the color selection dialog. color-button

          a <gtk-color-button>

ret An internal string, do not free the return value Since 2.4

78 GtkColorSelection

A widget used to select a color

78.1 Overview

The <gtk-color-selection> is a widget that is used to select a color. It consists of a color wheel and number of sliders and entry boxes for color parameters such as hue, saturation, value, red, green, blue, and opacity. It is found on the standard color selection dialog box

<gtk-color-selection-dialog>.

78.2 Usage

[Class] <gtk-color-selection>

Derives from <gtk-vbox>. This class defines the following slots:

has-palette

Whether a palette should be used

has-opacity-control

Whether the color selector should allow setting opacity

current-color

The current color

current-alpha

The current opacity value (0 fully transparent, 65535 fully opaque)

[Signal on <gtk-color-selection>] color-changed

This signal is emitted when the color changes in the <gtk-color-selection> according to its update policy.

[Function] gtk-color-selection-new ⇒ (ret <gtk-widget>)

Creates a new GtkColorSelection.

ret  a new <gtk-color-selection>
[Function] gtk-color-selection-set-has-palette
   (self <gtk-color-selection>) (has palette bool)
[Method] set-has-palette

Shows and hides the palette based upon the value of has-palette.

colorsel  a <gtk-color-selection>.

has-palette ‘#t’ if palette is to be visible, ‘#f’ otherwise.

[Function] gtk-color-selection-get-has-palette
   (self <gtk-color-selection>) ⇒ (ret bool)
[Method] get-has-palette

Determines whether the color selector has a color palette.

colorsel  a <gtk-color-selection>.

ret ‘#t’ if the selector has a palette. ‘#f’ if it hasn’t.

[Function] gtk-color-selection-is-adjusting (self <gtk-color-selection>)

⇒ (ret bool)

[Method] is-adjusting

Gets the current state of the colorsel.

colorsel  a <gtk-color-selection>.

ret ‘#t’ if the user is currently dragging a color around, and ‘#f’ if the selection has stopped.

79 GtkColorSelectionDialog

A standard dialog box for selecting a color

79.1 Overview

The <gtk-color-selection-dialog> provides a standard dialog which allows the user to select a color much like the <gtk-file-selection> provides a standard dialog for file selection.

79.2 Usage

[Class] <gtk-color-selection-dialog>
     Derives from <gtk-dialog>.

This class defines no direct slots.

[Function] gtk-color-selection-dialog-new (title mchars)
        ⇒ (ret <gtk-widget>)
     Creates a new <gtk-color-selection-dialog>.

title a string containing the title text for the dialog.

     ret  a <gtk-color-selection-dialog>.

80 GtkFileSelection

Prompt the user for a file or directory name

80.1 Overview

<gtk-file-selection> should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed.

File selection dialogs are created with a call to gtk-file-selection-new.

The default filename can be set using gtk-file-selection-set-filename and the se-

lected filename retrieved using gtk-file-selection-get-filename.

Use gtk-file-selection-complete 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 gtk-file-selection-hide-

fileop-buttons and shown again using gtk-file-selection-show-fileop-buttons.

     /* The file selection widget and the string to store the chosen filename */
     void store_filename (GtkWidget *widget, gpointer user_data) {
        GtkWidget *file_selector = GTK_WIDGET (user_data);
        const gchar *selected_filename;
        selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
        g_print ("Selected filename: %s\n", selected_filename);
     }
     void create_file_selection (void) {
        GtkWidget *file_selector;
        /* Create the selector */
        file_selector = gtk_file_selection_new ("Please select a file for editing.");
        g_signal_connect (GTK_FILE_SELECTION (file_selector)->ok_button,
                          "clicked",
                          G_CALLBACK (store_filename),
                          file_selector);
        /* Ensure that the dialog box is destroyed when the user clicks a button. */

   g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->ok_button,
                             "clicked",
                             G_CALLBACK (gtk_widget_destroy),
                             file_selector);
   g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->cancel_button,
                             "clicked",
                             G_CALLBACK (gtk_widget_destroy),
                             file_selector);
   /* Display that dialog */
   gtk_widget_show (file_selector);
}

80.2 Usage

[Class] <gtk-file-selection>
Derives from <gtk-dialog>.

This class defines the following slots:

show-fileops

Whether buttons for creating/manipulating files should be displayed

filename The currently selected filename

select-multiple

Whether to allow multiple files to be selected

[Function] gtk-file-selection-new (title mchars) ⇒ (ret <gtk-widget>)

Creates a new file selection dialog box. By default it will contain a <gtk-tree-view> of the application’s current working directory, and a file listing. Operation buttons that allow the user to create a directory, delete files and rename files, are also present.

title a message that will be placed in the file requestor’s titlebar.

ret the new file selection.

[Function] gtk-file-selection-set-filename (self <gtk-file-selection>)

(filename mchars)

[Method] set-filename

Sets a default path for the file requestor. If filename includes a directory path, then the requestor will open with that path as its current working directory. This has the consequence that in order to open the requestor with a working directory and an empty filename, filename must have a trailing directory separator. The encoding of filename is preferred GLib file name encoding, which may not be

UTF-8. See g-filename-from-utf8.

filesel  a <gtk-file-selection>.

filename a string to set as the default file name.

[Function] gtk-file-selection-get-filename (self <gtk-file-selection>)
   ⇒ (ret mchars)
[Method] get-filename

This function returns the selected filename in the GLib file name encoding. To convert to UTF-8, call g-filename-to-utf8. The returned string points to a statically allocated buffer and should be copied if you plan to keep it around. If no file is selected then the selected directory path is returned.

filesel  a <gtk-file-selection>

ret currently-selected filename in the on-disk encoding.

[Function] gtk-file-selection-complete (self <gtk-file-selection>)

(pattern mchars)

[Method] complete

Will attempt to match pattern to a 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 "Folders" list those directories which have been partially matched.

filesel  a <gtk-file-selection>.

pattern a string of characters which may or may not match any filenames in the current directory.

81 GtkFileChooser

File chooser interface used by GtkFileChooserWidget and GtkFileChooserDialog

81.1 Overview

<gtk-file-chooser> is an interface that can be implemented by file selection widgets. In GTK+, the main objects that implement this interface are <gtk-file-chooser-widget>,

<gtk-file-chooser-dialog>, and <gtk-file-chooser-button>. You do not need to

write an object that implements the <gtk-file-chooser> interface unless you are trying to adapt an existing file selector to expose a standard programming interface.

<gtk-file-chooser> allows for shortcuts to various places in the filesystem. In the default implementation these are displayed in the left pane. It may be a bit confusing at first taht these shortcuts come from various sources and in various flavours, so lets explain the terminology here:

Shortcuts

Volumes

are created by the user, by dragging folders from the right pane to the left pane, or by using the "Add". Bookmarks can be renamed and deleted by the user.

can be provided by the application or by the underlying filesystem abstraction (e.g. both the gnome-vfs and the Windows filesystems provide "Desktop" shortcuts). Shortcuts cannot be modified by the user.

are provided by the underlying filesystem abstraction. They are the "roots" of the filesystem.

81.2 File Names and Encodings

When the user is finished selecting files in a <gtk-file-chooser>, 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 G_FILENAME_ENCODING environment variable. Please see the Glib documentation for more details about this variable.

This means that while you can pass the result of gtk-file-chooser-get-filename to open(2) or fopen(3), 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 GTK+ widgets expect. You should use g-filename-to-utf8 to convert filenames into strings that can be passed to GTK+ widgets.

81.3 Adding a Preview Widget

You can add a custom preview widget to a file chooser and then get notification about when the preview needs to be updated. To install a preview widget, use gtk-file-chooser-set-

preview-widget. Then, connect to the <gtk-file-chooser::update-preview> signal to

get notified when you need to update the contents of the preview.

   Your callback should use gtk-file-chooser-get-preview-filename to see what needs

previewing. Once you have generated the preview for the corresponding file, you must

call gtk-file-chooser-set-preview-widget-active with a boolean flag that indicates

whether your callback could successfully generate a preview.

{
GtkImage *preview;
...
preview = gtk_image_new ();
gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
g_signal_connect (my_file_chooser, "update-preview",
  G_CALLBACK (update_preview_cb), preview);
}
static void
update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
{
GtkWidget *preview;
char *filename;
GdkPixbuf *pixbuf;
gboolean have_preview;
preview = GTK_WIDGET (data);
filename = gtk_file_chooser_get_preview_filename (file_chooser);
pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
have_preview = (pixbuf != NULL);
g_free (filename);
gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
if (pixbuf)
  gobject_unref (pixbuf);
gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
}

81.4 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 toggle button to give the user the option to open a file in read-only mode. You can use gtk-file-chooser-set-extra-widget to insert additional widgets in a file chooser.

{
GtkWidget *toggle;

  ...
  toggle = gtk_check_button_new_with_label ("Open file read-only");
  gtk_widget_show (toggle);
  gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
}

If you want to set more than one extra widget in the file chooser, you can a container such as a GtkVBox or a GtkTable and include your widgets in it. Then, set the container as the whole extra widget.

81.5 Key Bindings

Internally, GTK+ implements a file chooser’s graphical user interface with the private . This widget 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 are as follows:

Both the individual key and the numeric keypad’s "divide" key are supported.

Both the individual Up key and the numeric keypad’s Up key are supported.

You can change these defaults to something else. For example, to add a modifier to a few of the default bindings, you can include the following fragment in your ‘.gtkrc-2.0’ file:

binding "my-own-gtkfilechooser-bindings" {
bind "<Alt><Shift>Up" {
"up-folder" ()
}
bind "<Alt><Shift>Down" {
"down-folder" ()
}
bind "<Alt><Shift>Home" {
"home-folder" ()
}
}
class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"

81.5.1 The "GtkFileChooserDefault::location-popup" signal

          void user_function (GtkFileChooserDefault *chooser,
                              const char            *path,
                              gpointer user_data);

This 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. The path argument is a string that gets put in the text entry for the file name. By default this is bound to with a path string of "" (the empty string). It is also bound to with a path string of "‘/’" (a slash): this lets you type and immediately type a path name. On Unix systems, this is bound to (tilde) with a path string of "~" itself for access to home directories.

chooser the object which received the signal.

path default contents for the text entry for the file name

user-data user data set when the signal handler was connected.

You can create your own bindings for the signal with custom path strings, and have a crude form of easily-to-type bookmarks. For example, say you access the path ‘/home/username/misc’ very frequently. You could then create an shortcut by including the following in your ‘.gtkrc-2.0’:

     binding "misc-shortcut" {
     bind "<Alt>M" {
     "location-popup" ("/home/username/misc")
     }
     }
     class "GtkFileChooserDefault" binding "misc-shortcut"

81.5.2 The "GtkFileChooserDefault::up-folder" signal

               void user_function (GtkFileChooserDefault *chooser,
                                   gpointer user_data);

This 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 and (the Up key in the numeric keypad also works).

chooser the object which received the signal.

user-data user data set when the signal handler was connected.

81.5.3 The "GtkFileChooserDefault::down-folder" signal

               void user_function (GtkFileChooserDefault *chooser,
                                   gpointer user_data);

This 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 (the Down key in the numeric keypad also works). chooser the object which received the signal.

user-data user data set when the signal handler was connected.

81.5.4 The "GtkFileChooserDefault::home-folder" signal

               void user_function (GtkFileChooserDefault *chooser,
                                   gpointer user_data);

This is used to make the file chooser show the user’s home folder in the file list. By default this is bound to (the Home key in the numeric keypad also works).

chooser the object which received the signal.

user-data user data set when the signal handler was connected.

81.5.5 The "GtkFileChooserDefault::desktop-folder" signal

               void user_function (GtkFileChooserDefault *chooser,
                                   gpointer user_data);

This is used to make the file chooser show the user’s Desktop folder in the file list. By default this is bound to .

chooser the object which received the signal.

user-data user data set when the signal handler was connected.

81.5.6 The "GtkFileChooserDefault::quick-bookmark" signal

               void user_function (GtkFileChooserDefault *chooser,
                                   gint bookmark_index,
                                   gpointer user_data);

This is used to make the file chooser switch to the bookmark specified in the bookmarkindex parameter. For example, if you have three bookmarks, you can pass 0, 1, 2 to this signal to switch to each of them, respectively. By default this is bound to , , etc. until . Note that in the default binding, that is actually defined to switch to the bookmark at index 0, and so on successively; is defined to switch to the bookmark at index 10.

chooser the object which received the signal.

bookmark-indes index of the bookmark to switch to; the indices start at 0.

user-data user data set when the signal handler was connected.

81.6 Usage

[Class] <gtk-file-chooser>
Derives from <ginterface>.

This class defines the following slots:

filter The current filter for selecting which files are displayed

local-only

Whether the selected file(s) should be limited to local file: URLs

use-preview-label

Whether to display a stock label with the name of the previewed file.

preview-widget-active

Whether the application supplied widget for custom previews should be shown.

preview-widget

Application supplied widget for custom previews.

show-hidden

Whether the hidden files and folders should be displayed

do-overwrite-confirmation

Whether a file chooser in save mode will present an overwrite confirmation dialog if necessary.

extra-widget

Application supplied widget for extra options.

file-system-backend

Name of file system backend to use

action The type of operation that the file selector is performing

select-multiple

Whether to allow multiple files to be selected

[Signal on <gtk-file-chooser>] current-folder-changed

This signal is emitted when the current folder in a <gtk-file-chooser> changes. This can happen due to the user performing some action that changes folders, such as selecting a bookmark or visiting a folder on the file list. It can also happen as a result of calling a function to explicitly change the current folder in a file chooser. Normally you do not need to connect to this signal, unless you need to keep track of which folder a file chooser is showing.

See also:  gtk-file-chooser-set-current-folder, gtk-file-chooser-
get-current-folder,  gtk-file-chooser-set-current-folder-uri,
gtk-file-chooser-get-current-folder-uri.
[Signal on <gtk-file-chooser>] selection-changed

This signal is emitted when there is a change in the set of selected files in a <gtkfile-chooser>. This can happen when the user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

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.

See also: gtk-file-chooser-select-filename, gtk-file-chooser-unselect-
filename, gtk-file-chooser-get-filename, gtk-file-chooser-get-filenames,
gtk-file-chooser-select-uri, gtk-file-chooser-unselect-uri, gtk-file-
chooser-get-uri, gtk-file-chooser-get-uris.
[Signal on <gtk-file-chooser>] update-preview

This signal is emitted when the preview in 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 gtk-file-chooser-set-preview-widget, you should update it when this signal is emitted. You can use the functions

gtk-file-chooser-get-preview-filename or gtk-file-chooser-get-preview-

uri to get the name of the file to preview. Your widget may not be able to preview all kinds of files; your callback must call gtk-file-chooser-set-preview-wiget-active to inform the file chooser about whether the preview was generated successfully or not. Please see the example code in (the missing figure, gtkfilechooser-preview.

See also:  gtk-file-chooser-set-preview-widget, gtk-file-chooser-
set-preview-widget-active,  gtk-file-chooser-set-use-preview-label,
gtk-file-chooser-get-preview-filename,  gtk-file-chooser-get-preview-
uri.
[Signal on <gtk-file-chooser>] file-activated

This signal is emitted when the user "activates" a file in the file chooser. This can happen by double-clicking on a file in the file list, or by pressing (keycap "Enter") . Normally you do not need to connect to this signal. It is used internally by <gtkfile-chooser-dialog> to know when to activate the default button in the dialog.

See also: gtk-file-chooser-get-filename, gtk-file-chooser-get-filenames,
gtk-file-chooser-get-uri, gtk-file-chooser-get-uris.
[Signal on <gtk-file-chooser>] confirm-overwrite
   ⇒ <gtk-file-chooser-confirmation>

This signal gets emitted whenever it is appropriate to present a confirmation dialog when the user has selected a file name that already exists. The signal only gets emitted when the file chooser is in <gtk-file-chooser-action-save> mode. Most applications just need to turn on the do-overwrite-confirmation property (or call

the gtk-file-chooser-set-do-overwrite-confirmation function), and they will

automatically get a stock confirmation dialog. Applications which need to customize this behavior should do that, and also connect to the confirm-overwrite signal. A signal handler for this signal must return a <gtk-file-chooser-confirmation> value, which 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 <gtk-file-chooser-confirmation-confirm>. The following example

illustrates this.

[Function] gtk-file-chooser-set-action (self <gtk-file-chooser>)
   (action <gtk-file-chooser-action>)
[Method] set-action

Sets the type of operation that the chooser is performing; the user interface is adapted to suit the selected action. 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’.
chooser  a <gtk-file-chooser>

action the action that the file selector is performing

Since 2.4

[Function] gtk-file-chooser-get-action (self <gtk-file-chooser>)
   ⇒ (ret <gtk-file-chooser-action>)
[Method] get-action

Gets the type of operation that the file chooser is performing; see gtk-file-chooser-

set-action.
chooser  a <gtk-file-chooser>

ret the action that the file selector is performing

Since 2.4

[Function] gtk-file-chooser-set-local-only (self <gtk-file-chooser>)

(local only bool)

[Method] set-local-only

Sets whether only local files can be selected in the file selector. If local-only is ‘#t’ (the default), then the selected file are files are guaranteed to be accessible through the operating systems native file file system and therefore the application only needs to worry about the filename functions in <gtk-file-chooser>, like gtk-file-chooser-

get-filename, rather than the URI functions like gtk-file-chooser-get-uri,
chooser  a <gtk-file-chooser>

local-only ‘#t’ if only local files can be selected

Since 2.4

[Function] gtk-file-chooser-get-local-only (self <gtk-file-chooser>)

⇒ (ret bool)

[Method] get-local-only

Gets whether only local files can be selected in the file selector. See gtk-file-

chooser-set-local-only
chooser  a <gtk-file-choosre>

ret ‘#t’ if only local files can be selected.

Since 2.4

[Function] gtk-file-chooser-set-show-hidden (self <gtk-file-chooser>)

(show hidden bool)

[Method] set-show-hidden

Sets whether hidden files and folders are displayed in the file selector.

chooser  a <gtk-file-chooser>

show-hidden ‘#t’ if hidden files and folders should be displayed.

Since 2.6

[Function] gtk-file-chooser-get-show-hidden (self <gtk-file-chooser>)

⇒ (ret bool)

[Method] get-show-hidden

Gets whether hidden files and folders are displayed in the file selector. See gtk-file-

chooser-set-show-hidden.
chooser  a <gtk-file-chooser>

ret ‘#t’ if hidden files and folders are displayed.

Since 2.6

[Function] gtk-file-chooser-set-current-name (self <gtk-file-chooser>)
   (name mchars)
[Method] set-current-name

Sets the current name in the file selector, as if entered by the user. Note that the name passed in here is a UTF-8 string rather than a filename. This function 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 gtk-file-chooser-

set-filename or gtk-file-chooser-set-uri instead. Please see the documentation

for those functions for an example of using gtk-file-chooser-set-current-name as well.

chooser  a <gtk-file-chooser>

name the filename to use, as a UTF-8 string

Since 2.4

[Function] gtk-file-chooser-get-filename (self <gtk-file-chooser>)
   ⇒ (ret mchars)
[Method] get-filename

Gets the filename 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.

chooser  a <gtk-file-chooser>

ret The currently selected filename, or ‘#f’ if no file is selected, or the selected file can’t be represented with a local filename. Free with g-free.

Since 2.4

[Function] gtk-file-chooser-set-filename (self <gtk-file-chooser>)

(filename mchars) ⇒ (ret bool)

[Method] set-filename

Sets filename as the current filename for the file chooser, by changing to the file’s parent folder and actually selecting the file in list. If the chooser is in <gtk-file-chooser-action-save> mode, the file’s base name will also appear in the dialog’s file name entry. If the file name isn’t in the current folder of chooser, then the current folder of chooser will be changed to the folder containing filename. This is equivalent to

a sequence of gtk-file-chooser-unselect-all followed by gtk-file-chooser-
select-filename.

Note that the file must exist, or nothing will be done except for the directory change. If you are implementing a use this function if you already have a file name to which the user may save; for example, when the user opens an existing file and then does "File/Save As...") on it. If you don’t have a file name already &#x2014; for example, if the user just created a new file and is saving it for the first time, do not call this function. Instead, use something similar to this:

     if (document_is_new)
       {
         /* the user just created a new document */
         gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
         gtk_file_chooser_set_current_name (chooser, "Untitled document");
       }
     else
       {
         /* the user edited an existing document */
         gtk_file_chooser_set_filename (chooser, existing_filename);
       }
chooser  a <gtk-file-chooser>

filename the filename to set as current

ret ‘#t’ if both the folder could be changed and the file was selected successfully, ‘#f’ otherwise.

Since 2.4

[Function] gtk-file-chooser-select-filename (self <gtk-file-chooser>)

(filename mchars) ⇒ (ret bool)

[Method] select-filename

Selects a filename. If the file name isn’t in the current folder of chooser, then the current folder of chooser will be changed to the folder containing filename.

chooser  a <gtk-file-chooser>

filename the filename to select

ret ‘#t’ if both the folder could be changed and the file was selected successfully, ‘#f’ otherwise.

Since 2.4

[Function] gtk-file-chooser-unselect-filename (self <gtk-file-chooser>)

(filename mchars)

[Method] unselect-filename

Unselects a currently selected filename. If the filename is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.

chooser  a <gtk-file-chooser>

filename the filename to unselect

Since 2.4

[Function] gtk-file-chooser-select-all (self <gtk-file-chooser>)
[Method] select-all

Selects all the files in the current folder of a file chooser.

chooser  a <gtk-file-chooser>

Since 2.4

[Function] gtk-file-chooser-unselect-all (self <gtk-file-chooser>)
[Method] unselect-all

Unselects all the files in the current folder of a file chooser.

chooser  a <gtk-file-chooser>

Since 2.4

[Function] gtk-file-chooser-get-filenames (self <gtk-file-chooser>)
   ⇒ (ret gslist-of)
[Method] get-filenames

Lists all the selected files and subfolders in the current folder of 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 gtk-file-chooser-get-uris)

chooser  a <gtk-file-chooser>

ret a <gs-list> containing the filenames of all selected files and subfolders in the current folder. Free the returned list with g-slist-free, and the filenames with g-free.

Since 2.4

[Function] gtk-file-chooser-set-current-folder (self <gtk-file-chooser>)

(filename mchars) ⇒ (ret bool)

[Method] set-current-folder

Sets the current folder for chooser from a local filename. The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders.

chooser  a <gtk-file-chooser>

filename the full path of the new current folder ret ‘#t’ if the folder could be changed successfully, ‘#f’ otherwise.

Since 2.4

[Function] gtk-file-chooser-get-current-folder (self <gtk-file-chooser>)
   ⇒ (ret mchars)
[Method] get-current-folder

Gets the current folder of chooser as a local filename. See gtk-file-chooser-set-

current-folder.

Note that this is the folder that the file chooser is currently displaying (e.g. "/home/username/Documents"), which is not the same as the currently-selected

folder if the chooser is in <gtk-file-chooser-select-folder> mode (e.g.

"/home/username/Documents/selected-folder/". To get the currently-selected folder in that mode, use gtk-file-chooser-get-uri as the usual way to get the selection.

chooser  a <gtk-file-chooser>

ret the full path of the current folder, or ‘#f’ if the current path cannot be represented as a local filename. Free with g-free. This function will also return ‘#f’ if the file chooser was unable to load the last folder that was requested from it; for example, as would be for calling gtk-file-

          chooser-set-current-folder on a nonexistent folder.

Since 2.4

[Function] gtk-file-chooser-get-uri (self <gtk-file-chooser>)
   ⇒ (ret mchars)

[Method] get-uri

Gets 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.

chooser  a <gtk-file-chooser>

ret The currently selected URI, or ‘#f’ if no file is selected. Free with g-free

Since 2.4

[Function] gtk-file-chooser-set-uri (self <gtk-file-chooser>) (uri mchars)

⇒ (ret bool)

[Method] set-uri

Sets the file referred to by uri as the current file for the file chooser, by changing to the URI’s parent folder and actually selecting the URI in the list. If the chooser is <gtk-file-chooser-action-save> mode, the URI’s base name will also appear in the dialog’s file name entry. If the URI isn’t in the current folder of chooser, then the current folder of chooser will be changed to the folder containing uri. This is equivalent to a sequence of

gtk-file-chooser-unselect-all followed by gtk-file-chooser-select-uri.

Note that the URI must exist, or nothing will be done except for the directory change. If you are implementing a should use this function if you already have a file name to which the user may save; for example, when the user opens an existing file and then does (guimenuitem "File/Save As...") on it. If you don’t have a file name already &#x2014; for example, if the user just created a new file and is saving it for the first time, do not call this function. Instead, use something similar to this:

     if (document_is_new)
       {
         /* the user just created a new document */
         gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
         gtk_file_chooser_set_current_name (chooser, "Untitled document");
       }
     else
       {
         /* the user edited an existing document */
         gtk_file_chooser_set_uri (chooser, existing_uri);
       }
chooser  a <gtk-file-chooser>

uri the URI to set as current

ret ‘#t’ if both the folder could be changed and the URI was selected successfully, ‘#f’ otherwise.

Since 2.4

[Function] gtk-file-chooser-select-uri (self <gtk-file-chooser>)

(uri mchars) ⇒ (ret bool)

[Method] select-uri

Selects the file to by uri. If the URI doesn’t refer to a file in the current folder of chooser, then the current folder of chooser will be changed to the folder containing filename.

chooser  a <gtk-file-chooser>

uri the URI to select

ret ‘#t’ if both the folder could be changed and the URI was selected successfully, ‘#f’ otherwise.

Since 2.4

[Function] gtk-file-chooser-unselect-uri (self <gtk-file-chooser>)
   (uri mchars)
[Method] unselect-uri

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, does nothing.

chooser  a <gtk-file-chooser>

uri the URI to unselect

[Function] gtk-file-chooser-get-uris (self <gtk-file-chooser>)
   ⇒ (ret gslist-of)
[Method] get-uris

Lists all the selected files and subfolders in the current folder of chooser. The returned names are full absolute URIs.

chooser  a <gtk-file-chooser>

ret a <gs-list> containing the URIs of all selected files and subfolders in the current folder. Free the returned list with g-slist-free, and the filenames with g-free.

Since 2.4

[Function] gtk-file-chooser-set-preview-widget (self <gtk-file-chooser>)

(preview widget <gtk-widget>)

[Method] set-preview-widget

Sets an application-supplied widget to use to display a custom preview of the currently selected file. To implement a preview, after setting the preview widget, you connect to

the ::update-preview signal, and call gtk-file-chooser-get-preview-filename or

gtk-file-chooser-get-preview-uri on each change. If you can display a preview of the new file, update your widget and set the preview active using gtk-file-chooser-set-preview-widget-active. 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.

chooser  a <gtk-file-chooser>

preview-widget widget for displaying preview.

Since 2.4

[Function] gtk-file-chooser-get-preview-widget (self <gtk-file-chooser>)
   ⇒ (ret <gtk-widget>)
[Method] get-preview-widget
Gets the current preview widget; see gtk-file-chooser-set-preview-widget.
chooser  a <gtk-file-chooser>

ret the current preview widget, or ‘#f’

Since 2.4

[Function] gtk-file-chooser-get-preview-uri (self <gtk-file-chooser>)
   ⇒ (ret mchars)
[Method] get-preview-uri

Gets the URI that should be previewed in a custom preview widget. See gtk-file-

chooser-set-preview-widget.
chooser  a <gtk-file-chooser>

ret the URI for the file to preview, or ‘#f’ if no file is selected. Free with

          g-free.

Since 2.4

[Function] gtk-file-chooser-set-extra-widget (self <gtk-file-chooser>)

(extra widget <gtk-widget>)

[Method] set-extra-widget

Sets an application-supplied widget to provide extra options to the user.

chooser  a <gtk-file-chooser>

extra-widget widget for extra options

Since 2.4

[Function] gtk-file-chooser-get-extra-widget (self <gtk-file-chooser>)
   ⇒ (ret <gtk-widget>)
[Method] get-extra-widget
Gets the current preview widget; see gtk-file-chooser-set-extra-widget.
chooser  a <gtk-file-chooser>

ret the current extra widget, or ‘#f’

Since 2.4

[Function] gtk-file-chooser-add-filter (self <gtk-file-chooser>)
   (filter <gtk-file-filter>)
[Method] add-filter

Adds filter to the list of filters that the user can select between. When a filter is selected, only files that are passed by that filter are displayed.

Note that the chooser takes ownership of the filter, so you have to ref and sink it if you want to keep a reference.

chooser  a <gtk-file-chooser>
filter  a <gtk-file-filter>

Since 2.4

[Function] gtk-file-chooser-remove-filter (self <gtk-file-chooser>)
   (filter <gtk-file-filter>)
[Method] remove-filter

Removes filter from the list of filters that the user can select between.

chooser  a <gtk-file-chooser>
filter  a <gtk-file-filter>

[Function] gtk-file-chooser-list-filters (self <gtk-file-chooser>)
   ⇒ (ret gslist-of)
[Method] list-filters

Lists the current set of user-selectable filters; see gtk-file-chooser-add-filter,

gtk-file-chooser-remove-filter.
chooser  a <gtk-file-chooser>

ret a <gs-list> containing the current set of user selectable filters. The contents of the list are owned by GTK+, but you must free the list itself with g-slist-free when you are done with it.

Since 2.4

[Function] gtk-file-chooser-set-filter (self <gtk-file-chooser>)
   (filter <gtk-file-filter>)
[Method] set-filter

Sets the current filter; only the files that pass the filter will be displayed. If the user-selectable list of filters is non-empty, then the 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.

chooser  a <gtk-file-chooser>
filter  a <gtk-file-filter>

Since 2.4

[Function] gtk-file-chooser-get-filter (self <gtk-file-chooser>)
   ⇒ (ret <gtk-file-filter>)
[Method] get-filter
Gets the current filter; see gtk-file-chooser-set-filter.
chooser  a <gtk-file-chooser>

ret the current filter, or ‘#f’

Since 2.4

82 GtkFileChooserButton

A button to launch a file selection dialog

82.1 Overview

The <gtk-file-chooser-button> is a widget that lets the user select a file. It implements the <gtk-file-chooser> interface. Visually, it is a file name with a button to bring up a <gtk-file-chooser-dialog>. 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 ‘#t’.

     {
       GtkWidget *button;
       button = gtk_file_chooser_button_new (_("Select a file"),
                                             GTK_FILE_CHOOSER_ACTION_OPEN);
       gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
                                            "/etc");
     }
   The <gtk-file-chooser-button> supports the <gtk-file-chooser-action>s
‘GTK_FILE_CHOOSER_ACTION_OPEN’ and ‘GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER’.

The <gtk-file-chooser-button> will ellipsize the label, and thus will thus request little horizontal space. To give the button more space, you should call gtk-widget-size-

request, gtk-file-chooser-button-set-width-chars, or pack the button in such a way

that other interface elements give space to the widget.

82.2 Usage

[Class] <gtk-file-chooser-button>
     Derives from <gtk-file-chooser>, <gtk-hbox>.

This class defines the following slots:

dialog The file chooser dialog to use.

     focus-on-click

Whether the button grabs focus when it is clicked with the mouse

title The title of the file chooser dialog.

     width-chars

The desired width of the button widget, in characters.

[Signal on <gtk-file-chooser-button>] file-set

undocumented

[Function] gtk-file-chooser-button-new (title mchars)
        (action <gtk-file-chooser-action>) ⇒ (ret <gtk-widget>)

Creates a new file-selecting button widget. title the title of the browse dialog. action the open mode for the widget. ret a new button widget. Since 2.6

[Function] gtk-file-chooser-button-get-title
   (self <gtk-file-chooser-button>) ⇒ (ret mchars)
[Method] get-title

Retrieves the title of the browse dialog used by button. The returned value should not be modified or freed. button the button widget to examine. ret a pointer to the browse dialog’s title. Since 2.6

[Function] gtk-file-chooser-button-set-title
   (self <gtk-file-chooser-button>) (title mchars)
[Method] set-title

Modifies the title of the browse dialog used by button. button the button widget to modify. title the new browse dialog title. Since 2.6

83 GtkFileChooserDialog

A file chooser dialog, suitable for "File/Open" or "File/Save" commands

83.1 Overview

<gtk-file-chooser-dialog> is a dialog box suitable for use with "File/Open" or "File/Save as" commands. This widget works by putting a <gtk-file-chooser-widget> inside a <gtk-dialog>. It exposes the <gtk-file-chooser-iface> interface, so you can use all of the <gtk-file-chooser> functions on the file chooser dialog as well as those for

<gtk-dialog>.

Note that <gtk-file-chooser-dialog> does not have any methods of its own. Instead, you should use the functions that work on a <gtk-file-chooser>.

In the simplest of cases, you can the following code to use <gtk-file-chooser-dialog> to select a file for opening:

GtkWidget *dialog;
dialog = gtk_file_chooser_dialog_new ("Open File",
parent_window,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
{
char *filename;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
open_file (filename);
g_free (filename);
}
gtk_widget_destroy (dialog);

To use a dialog for saving, you can use this:

GtkWidget *dialog;
dialog = gtk_file_chooser_dialog_new ("Save File",
parent_window,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);

     gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
     if (user_edited_a_new_document)
       {
         gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_folder_for_saving);
         gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "Untitled document");
       }
     else
       gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), filename_for_existing_document);

     if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
       {
         char *filename;
         filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
         save_to_file (filename);
         g_free (filename);
       }
     gtk_widget_destroy (dialog);
   <gtk-file-chooser-dialog> inherits from <gtk-dialog>, so buttons that go in its

action area have response codes such as <gtk-response-accept> and <gtk-response-

cancel>. For example, you could call gtk-file-chooser-dialog-new as follows:
     GtkWidget *dialog;
     dialog = gtk_file_chooser_dialog_new ("Open File",
           parent_window,
           GTK_FILE_CHOOSER_ACTION_OPEN,
           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
           GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
           NULL);

This will create buttons for "Cancel" and "Open" that use stock response identifiers from <gtk-response-type>. For most dialog boxes you can use your own custom response

codes rather than the ones in <gtk-response-type>, but <gtk-file-chooser-dialog>

assumes that its "accept"-type action, e.g. an "Open" or "Save" button, will have one of the following response codes:

This is because <gtk-file-chooser-dialog> must intercept responses and switch to folders if appropriate, rather than letting the dialog terminate &#x2014; the implementation uses these known response codes to know which responses can be blocked if appropriate.

To summarize, make sure you use a stock response code when you use <gtk-file-chooser-dialog> to ensure proper operation.

Chapter 83: GtkFileChooserDialog 376

83.2 Usage

[Class] <gtk-file-chooser-dialog>
Derives from <gtk-file-chooser>, <gtk-dialog>.

This class defines no direct slots.

84 GtkFileChooserWidget

File chooser widget that can be embedded in other widgets

84.1 Overview

<gtk-file-chooser-widget> is a widget suitable for selecting files. It is the main building block of a <gtk-file-chooser-dialog>. Most applications will only need to use the latter; you can use <gtk-file-chooser-widget> as part of a larger window if you have special needs.

Note that <gtk-file-chooser-widget> does not have any methods of its own. Instead, you should use the functions that work on a <gtk-file-chooser>.

84.2 Usage

[Class] <gtk-file-chooser-widget>
Derives from <gtk-file-chooser-embed>, <gtk-file-chooser>, <gtk-vbox>.

This class defines no direct slots.

[Function] gtk-file-chooser-widget-new
   (action <gtk-file-chooser-action>) ⇒ (ret <gtk-widget>)

Creates a new <gtk-file-chooser-widget>. This is a file chooser widget that can be embedded in custom windows, and it is the same widget that is used by <gtk-

file-chooser-dialog>.

action Open or save mode for the widget

ret  a new <gtk-file-chooser-widget>

Since 2.4

85 GtkFileFilter

A filter for selecting a file subset

85.1 Overview

A GtkFileFilter can be used to restrict the files being shown in a <gtk-file-chooser>. Files can be filtered based on their name (with gtk-file-filter-add-pattern), on their mime type (with gtk-file-filter-add-mime-type), or by a custom filter function (with

gtk-file-filter-add-custom).

Filtering by mime types 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-file-filter> 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-file-chooser>, see gtk-file-chooser-add-filter, but it is also possible to manually use a filter on a file with gtk-

file-filter-filter.

85.2 Usage

[Class] <gtk-file-filter>
Derives from <gtk-object>.

This class defines no direct slots.

[Function] gtk-file-filter-new ⇒ (ret <gtk-file-filter>)

Creates a new <gtk-file-filter> with no rules added to it. Such a filter doesn’t accept any files, so is not particularly useful until you add rules

with gtk-file-filter-add-mime-type, gtk-file-filter-add-pattern, or

gtk-file-filter-add-custom. To create a filter that accepts any file, use:

     GtkFileFilter *filter = gtk_file_filter_new ();
     gtk_file_filter_add_pattern (filter, "*");
ret  a new <gtk-file-filter>

Since 2.4

[Function] gtk-file-filter-set-name (self <gtk-file-filter>)
   (name mchars)
[Method] set-name

Sets the human-readable name of the filter; this is the string that will be displayed in the file selector user interface if there is a selectable list of filters.

filter  a <gtk-file-filter>

name the human-readable-name for the filter, or ‘#f’ to remove any existing name.

Since 2.4

[Function] gtk-file-filter-get-name (self <gtk-file-filter>)
   ⇒ (ret mchars)
[Method] get-name

Gets the human-readable name for the filter. See gtk-file-filter-set-name.

filter  a <gtk-file-filter>

ret The human-readable name of the filter, or ‘#f’. This value is owned by GTK+ and must not be modified or freed.

Since 2.4

[Function] gtk-file-filter-add-mime-type (self <gtk-file-filter>)

(mime type mchars)

[Method] add-mime-type

Adds a rule allowing a given mime type to filter.

filter  A <gtk-file-filter>

mime-type name of a MIME type

Since 2.4

[Function] gtk-file-filter-add-pattern (self <gtk-file-filter>)

(pattern mchars)

[Method] add-pattern

Adds a rule allowing a shell style glob to a filter.

filter  a <gtk-file-filter>

pattern a shell style glob

Since 2.4

[Function] gtk-file-filter-add-pixbuf-formats (self <gtk-file-filter>)
[Method] add-pixbuf-formats

Adds a rule allowing image files in the formats supported by GdkPixbuf.

filter  a <gtk-file-filter>

Since 2.6

[Function] gtk-file-filter-get-needed (self <gtk-file-filter>)
   ⇒ (ret <gtk-file-filter-flags>)
[Method] get-needed

Gets the fields that need to be filled in for the structure passed to gtk-file-filter-

filter

This function will not typically be used by applications; it is intended principally for use in the implementation of <gtk-file-chooser>.

filter  a <gtk-file-filter>

ret bitfield of flags indicating needed fields when calling gtk-file-filter-

          filter

Since 2.4

86 GtkFontButton

A button to launch a font selection dialog

86.1 Overview

The <gtk-font-button> is a button which displays the currently selected font an allows to open a font selection dialog to change the font. It is suitable widget for selecting a font in a preference dialog.

86.2 Usage

[Class] <gtk-font-button>
Derives from <gtk-button>.

This class defines the following slots:

title The title of the font selection dialog

font-name

The name of the selected font

use-font Whether the label is drawn in the selected font

use-size Whether the label is drawn with the selected font size

show-style

Whether the selected font style is shown in the label

show-size

Whether selected font size is shown in the label

[Signal on <gtk-font-button>] font-set

The ::font-set signal is emitted when the user selects a font. When handling this signal, use gtk-font-button-get-font-name to find out which font was just selected. Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify::font-name signal. Since 2.4

[Function] gtk-font-button-new ⇒ (ret <gtk-widget>)

Creates a new font picker widget.

ret a new font picker widget.

Since 2.4

[Function] gtk-font-button-new-with-font (fontname mchars)
   ⇒ (ret <gtk-widget>)

Creates a new font picker widget.

fontname Name of font to display in font selection dialog

ret a new font picker widget.

Since 2.4

[Function] gtk-font-button-set-font-name (self <gtk-font-button>)

(fontname mchars) ⇒ (ret bool)

[Method] set-font-name

Sets or updates the currently-displayed font in font picker dialog.

font-button

          a <gtk-font-button>

fontname Name of font to display in font selection dialog

ret  Return value of gtk-font-selection-dialog-set-font-name if the font

selection dialog exists, otherwise ‘#f’.

Since 2.4

[Function] gtk-font-button-get-font-name (self <gtk-font-button>)
   ⇒ (ret mchars)
[Method] get-font-name

Retrieves the name of the currently selected font.

font-button

          a <gtk-font-button>

ret an internal copy of the font name which must not be freed.

Since 2.4

[Function] gtk-font-button-set-show-style (self <gtk-font-button>)

(show style bool)

[Method] set-show-style

If show-style is ‘#t’, the font style will be displayed along with name of the selected font.

font-button

          a <gtk-font-button>

show-style ‘#t’ if font style should be displayed in label.

Since 2.4

[Function] gtk-font-button-get-show-style (self <gtk-font-button>)

⇒ (ret bool)

[Method] get-show-style

Returns whether the name of the font style will be shown in the label.

font-button

          a <gtk-font-button>

ret whether the font style will be shown in the label.

Since 2.4

[Function] gtk-font-button-set-show-size (self <gtk-font-button>)

(show size bool)

[Method] set-show-size

If show-size is ‘#t’, the font size will be displayed along with the name of the selected font. font-button

          a <gtk-font-button>

show-size ‘#t’ if font size should be displayed in dialog.

Since 2.4

[Function] gtk-font-button-get-show-size (self <gtk-font-button>)

⇒ (ret bool)

[Method] get-show-size

Returns whether the font size will be shown in the label.

font-button

          a <gtk-font-button>

ret whether the font size will be shown in the label.

Since 2.4

[Function] gtk-font-button-set-use-font (self <gtk-font-button>)

(use font bool)

[Method] set-use-font

If use-font is ‘#t’, the font name will be written using the selected font.

font-button

          a <gtk-font-button>

use-font If ‘#t’, font name will be written using font chosen.

Since 2.4

[Function] gtk-font-button-get-use-font (self <gtk-font-button>)

⇒ (ret bool)

[Method] get-use-font

Returns whether the selected font is used in the label.

font-button

          a <gtk-font-button>

ret whether the selected font is used in the label.

Since 2.4

[Function] gtk-font-button-set-use-size (self <gtk-font-button>)

(use size bool)

[Method] set-use-size

If use-size is ‘#t’, the font name will be written using the selected size.

font-button

          a <gtk-font-button>

use-size If ‘#t’, font name will be written using the selected size.

[Function] gtk-font-button-get-use-size (self <gtk-font-button>)

⇒ (ret bool)

[Method] get-use-size

Returns whether the selected size is used in the label.

font-button

          a <gtk-font-button>

ret whether the selected size is used in the label.

Since 2.4

[Function] gtk-font-button-set-title (self <gtk-font-button>)

(title mchars)

[Method] set-title

Sets the title for the font selection dialog.

font-button

          a <gtk-font-button>

title a string containing the font selection dialog title

Since 2.4

[Function] gtk-font-button-get-title (self <gtk-font-button>)
   ⇒ (ret mchars)
[Method] get-title

Retrieves the title of the font selection dialog.

font-button

          a <gtk-font-button>

ret an internal copy of the title string which must not be freed.

Since 2.4

87 GtkFontSelection

A widget for selecting fonts

87.1 Overview

The <gtk-font-selection> widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the <gtk-font-selection-dialog> widget to provide a dialog box for selecting fonts.

To set the font which is initially selected, use gtk-font-selection-set-font-name.

To get the selected font use gtk-font-selection-get-font-name.

To change the text which is shown in the preview area, use gtk-font-selection-set-

preview-text.

87.2 Usage

[Class] <gtk-font-selection>

Derives from <gtk-vbox>. This class defines the following slots:

font-name

The X string that represents this font

font The GdkFont that is currently selected

preview-text

The text to display in order to demonstrate the selected font

[Function] gtk-font-selection-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-font-selection>.
ret  a new <gtk-font-selection>.
[Function] gtk-font-selection-get-font-name (self <gtk-font-selection>)
   ⇒ (ret mchars)
[Method] get-font-name

Gets the currently-selected font name. Note that this can be a different string than what you set with gtk-font-selection-set-font-name, as the font selection widget may normalize font names and thus return a string with a different structure. For example, "Helvetica Italic Bold 12" could be normalized to "Helvetica Bold Italic 12". Use pango-font-description-equal if you want to compare two font descriptions.

fontsel  a <gtk-font-selection>

ret A string with the name of the current font, or #f if no font is selected. You must free this string with g-free.

[Function] gtk-font-selection-set-font-name (self <gtk-font-selection>)

(fontname mchars) ⇒ (ret bool)

[Method] set-font-name

Sets the currently-selected font. Note that the fontsel needs to know the screen in which it will appear for this to work; this can be guaranteed by simply making sure that the fontsel is inserted in a toplevel window before you call this function.

fontsel  a <gtk-font-selection>

fontname a font name like "Helvetica 12" or "Times Bold 18"

ret #t if the font could be set successfully; #f if no such font exists or if the fontsel doesn’t belong to a particular screen yet.

[Function] gtk-font-selection-get-preview-text
   (self <gtk-font-selection>) ⇒ (ret mchars)
[Method] get-preview-text

Gets the text displayed in the preview area.

fontsel  a <gtk-font-selection>.

ret the text displayed in the preview area. This string is owned by the widget and should not be modified or freed.

[Function] gtk-font-selection-set-preview-text
   (self <gtk-font-selection>) (text mchars)
[Method] set-preview-text

Sets the text displayed in the preview area.

fontsel  a <gtk-font-selection>.

text the text to display in the preview area.

88 GtkFontSelectionDialog

A dialog box for selecting fonts

88.1 Overview

The <gtk-font-selection-dialog> widget is a dialog box for selecting a font.

To set the font which is initially selected, use gtk-font-selection-dialog-set-font-

name.
   To get the selected font use gtk-font-selection-dialog-get-font-name.

To change the text which is shown in the preview area, use gtk-font-selection-

dialog-set-preview-text.

88.2 Usage

[Class] <gtk-font-selection-dialog>
     Derives from <gtk-dialog>.

This class defines no direct slots.

[Function] gtk-font-selection-dialog-new (title mchars)
        ⇒ (ret <gtk-widget>)
     Creates a new <gtk-font-selection-dialog>.

title the title of the dialog box.

     ret  a new <gtk-font-selection-dialog>.

89 GtkInputDialog

Configure devices for the XInput extension

89.1 Overview

NOTE this widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it’s just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

<gtk-input-dialog> displays a dialog which allows the user to configure XInput extension devices. For each device, they can control the mode of the device (disabled, screenrelative, or window-relative), the mapping of axes to coordinates, and the mapping of the devices macro keys to key press events.

<gtk-input-dialog> 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.

89.2 Usage

[Class] <gtk-input-dialog>
     Derives from <gtk-dialog>.

This class defines no direct slots.

[Signal on <gtk-input-dialog>] enable-device (arg0 <gdk-device>)

This signal is emitted when the user changes the mode of a device from <gdk-mode-

     disabled> to a <gdk-mode-screen> or <gdk-mode-window>.
[Signal on <gtk-input-dialog>] disable-device (arg0 <gdk-device>)

This signal is emitted when the user changes the mode of a device from a <gdk-mode-

     screen> or <gdk-mode-window> to <gdk-mode-enabled>.
[Function] gtk-input-dialog-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-input-dialog>.
     ret  the new <gtk-input-dialog>.

90 GtkAlignment

A widget which controls the alignment and size of its child

90.1 Overview

The <gtk-alignment> widget controls the alignment and size of its child widget. It has four settings: xscale, yscale, xalign, and yalign.

The scale settings are used to specify how much the child widget should expand to fill the space allocated to the <gtk-alignment>. The values can range from 0 (meaning the child doesn’t expand at all) to 1 (meaning the child expands to fill all of the available space).

The align settings are used to place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect.

90.2 Usage

[Class] <gtk-alignment>

Derives from <gtk-bin>. This class defines the following slots:

xalign Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned

yalign Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned

xscale If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all

yscale If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all

top-padding

The padding to insert at the top of the widget.

bottom-padding

The padding to insert at the bottom of the widget.

left-padding

The padding to insert at the left of the widget.

right-padding

The padding to insert at the right of the widget.

[Function] gtk-alignment-new (xalign float) (yalign float) (xscale float)

   (yscale float) ⇒ (ret <gtk-widget>)
Creates a new <gtk-alignment>.

xalign the horizontal alignment of the child widget, from 0 (left) to 1 (right).

yalign the vertical alignment of the child widget, from 0 (top) to 1 (bottom). xscale the amount that the child widget expands horizontally to fill up unused

space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the <gtk-alignment>.

yscale the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xscale.

ret  the new <gtk-alignment>.
[Function] gtk-alignment-set (self <gtk-alignment>) (xalign float)

(yalign float) (xscale float) (yscale float)

[Method] set

Sets the <gtk-alignment> values.
alignment a <gtk-alignment>.

xalign the horizontal alignment of the child widget, from 0 (left) to 1 (right).

yalign the vertical alignment of the child widget, from 0 (top) to 1 (bottom).

xscale the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the <gtk-alignment>.

yscale the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xscale.

[Function] gtk-alignment-get-padding (self <gtk-alignment>)

⇒ (padding top unsigned-int) (padding bottom unsigned-int)

(padding left unsigned-int) (padding right unsigned-int)

[Method] get-padding

Gets the padding on the different sides of the widget. See gtk-alignment-set-

padding.
alignment a <gtk-alignment>

padding-top location to store the padding for the top of the widget, or ‘#f’

padding-bottom location to store the padding for the bottom of the widget, or ‘#f’

padding-left location to store the padding for the left of the widget, or ‘#f’

padding-right location to store the padding for the right of the widget, or ‘#f’

[Function] gtk-alignment-set-padding (self <gtk-alignment>)

(padding top unsigned-int) (padding bottom unsigned-int) (padding left unsigned-int) (padding right unsigned-int)

[Method] set-padding

Sets the padding on the different sides of the widget. The padding adds blank space to the sides of the widget. For instance, this can be used to indent the child widget towards the right by adding padding on the left.

alignment a <gtk-alignment>

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.

Since 2.4

91 GtkAspectFrame

A frame that constrains its child to a particular aspect ratio

91.1 Overview

The <gtk-aspect-frame> is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. For instance, one might be drawing a small preview of a larger image. <gtk-aspect-frame> 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.

91.2 Usage

[Class] <gtk-aspect-frame>

Derives from <gtk-frame>. This class defines the following slots:

xalign X alignment of the child

yalign Y alignment of the child

ratio Aspect ratio if obey child is FALSE

obey-child

Force aspect ratio to match that of the frame’s child

[Function] gtk-aspect-frame-new (label mchars) (xalign float) (yalign float)

(ratio float) (obey child bool) ⇒ (ret <gtk-widget>)

Create a new <gtk-aspect-frame>.

label Label text.

xalign Horizontal alignment of the child within the allocation of the <gtkaspect-frame>. This ranges from 0.0 (left aligned) to 1.0 (right aligned)

yalign Vertical alignment of the child within the allocation of the <gtk-aspect-frame>. This ranges from 0.0 (left aligned) to 1.0 (right aligned)

ratio The desired aspect ratio.

obey-child If ‘#t’, ratio is ignored, and the aspect ratio is taken from the requistion of the child.

ret  the new <gtk-aspect-frame>.
[Function] gtk-aspect-frame-set (self <gtk-aspect-frame>) (xalign float)

(yalign float) (ratio float) (obey child bool)

[Method] set

Set parameters for an existing <gtk-aspect-frame>.

aspect-frame

          a <gtk-aspect-frame>

xalign Horizontal alignment of the child within the allocation of the <gtkaspect-frame>. This ranges from 0.0 (left aligned) to 1.0 (right aligned) yalign Vertical alignment of the child within the allocation of the <gtk-aspect-

frame>. This ranges from 0.0 (left aligned) to 1.0 (right aligned)

ratio The desired aspect ratio.

obey-child If ‘#t’, ratio is ignored, and the aspect ratio is taken from the requistion of the child.

92 GtkHBox

A horizontal container box

92.1 Overview

GtkHBox is a container that organizes child widgets into a single row.

Use the <gtk-box> packing interface to determine the arrangement, spacing, width, and alignment of GtkHBox children.

All children are allocated the same height.

92.2 Usage

[Class] <gtk-hbox>

Derives from <gtk-box>. This class defines no direct slots.

[Function] gtk-hbox-new (homogeneous bool) (spacing int)

   ⇒ (ret <gtk-widget>)

Creates a new GtkHBox.

homogeneous ‘#t’ if all children are to be given equal space allotments.

spacing the number of pixels to place by default between children.

ret a new GtkHBox.

93 GtkVBox

A vertical container box

93.1 Overview

GtkVBox is a container that organizes child widgets into a single column.

Use the <gtk-box> packing interface to determine the arrangement, spacing, height, and alignment of GtkVBox children.

All children are allocated the same width.

93.2 Usage

[Class] <gtk-vbox>

Derives from <gtk-box>. This class defines no direct slots.

[Function] gtk-vbox-new (homogeneous bool) (spacing int)

   ⇒ (ret <gtk-widget>)

Creates a new GtkVBox.

homogeneous ‘#t’ if all children are to be given equal space allotments.

spacing the number of pixels to place by default between children.

ret a new GtkVBox.

94 GtkHButtonBox

A container for arranging buttons horizontally

94.1 Overview

A button box should be used to provide a consistent layout of buttons throughout your application. The layout/spacing can be altered by the programmer, or if desired, by the user to alter the ’feel’ of a program to a small degree.

   A <gtk-hbutton-box> is created with gtk-hbutton-box-new. Buttons are packed into

a button box the same way widgets are added to any other container, using gtk-container-

add. You can also use gtk-box-pack-start or gtk-box-pack-end, but for button boxes

both these functions work just like gtk-container-add, ie., they pack the button in a way that depends on the current layout style and on whether the button has had gtk-button-

box-set-child-secondary called on it.

The spacing between buttons can be set with gtk-box-set-spacing. The arrangement and layout of the buttons can be changed with gtk-button-box-set-layout.

94.2 Usage

[Class] <gtk-hbutton-box>
     Derives from <gtk-button-box>.

This class defines no direct slots.

[Function] gtk-hbutton-box-new ⇒ (ret <gtk-widget>)

Creates a new horizontal button box.

ret a new button box <gtk-widget>.

95 GtkVButtonBox

A container for arranging buttons vertically

95.1 Overview

A button box should be used to provide a consistent layout of buttons throughout your application. The layout/spacing can be altered by the programmer, or if desired, by the user to alter the ’feel’ of a program to a small degree.

   A <gtk-vbutton-box> is created with gtk-vbutton-box-new. Buttons are packed into

a button box the same way widgets are added to any other container, using gtk-container-

add. You can also use gtk-box-pack-start or gtk-box-pack-end, but for button boxes

both these functions work just like gtk-container-add, ie., they pack the button in a way that depends on the current layout style and on whether the button has had gtk-button-

box-set-child-secondary called on it.

The spacing between buttons can be set with gtk-box-set-spacing. The arrangement and layout of the buttons can be changed with gtk-button-box-set-layout.

95.2 Usage

[Class] <gtk-vbutton-box>
     Derives from <gtk-button-box>.

This class defines no direct slots.

[Function] gtk-vbutton-box-new ⇒ (ret <gtk-widget>)

Creates a new vertical button box.

ret a new button box <gtk-widget>.

96 GtkFixed

A container which allows you to position widgets at fixed coordinates

96.1 Overview

The <gtk-fixed> widget is a container which 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 GTK+ containers, but it results in broken applications. With <gtkfixed>, 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 GTK+, 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 GTK+ 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/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.

96.2 Usage

[Class] <gtk-fixed>
     Derives from <gtk-container>.

This class defines no direct slots.

[Function] gtk-fixed-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-fixed>.

     ret  a new <gtk-fixed>.
[Function] gtk-fixed-put (self <gtk-fixed>) (widget <gtk-widget>) (x int)
        (y int)

[Method] put

Adds a widget to a <gtk-fixed> container at the given position.

     fixed  a <gtk-fixed>.

widget the widget to add.

x the horizontal position to place the widget at.

y the vertical position to place the widget at.

[Function] gtk-fixed-move (self <gtk-fixed>) (widget <gtk-widget>) (x int)
   (y int)

[Method] move

Moves a child of a <gtk-fixed> container to the given position.

fixed  a <gtk-fixed>.

widget the child widget.

x the horizontal position to move the widget to.

y the vertical position to move the widget to.

[Function] gtk-fixed-get-has-window (self <gtk-fixed>) ⇒ (ret bool)
[Method] get-has-window
Gets whether the <gtk-fixed> has its own <gdk-window>. See gdk-fixed-set-has-
window.
fixed  a <gtk-widget>

ret ‘#t’ if fixed has its own window.

[Function] gtk-fixed-set-has-window (self <gtk-fixed>) (has window bool)
[Method] set-has-window

Sets whether a <gtk-fixed> widget is created with a separate <gdk-window> for widget->window or not. (By default, it will be created with no separate <gdkwindow>). This function must be called while the <gtk-fixed> is not realized, for instance, immediately after the window is created. This function was added to provide an easy migration path for older applications which may expect <gtk-fixed> to have a separate window.

fixed  a <gtk-fixed>

has-window ‘#t’ if a separate window should be created

97 GtkHPaned

A container with two panes arranged horizontally

97.1 Overview

The HPaned widget is a container widget with two children arranged horizontally. The division between the two panes is adjustable by the user by dragging a handle. See <gtkpaned> for details.

97.2 Usage

[Class] <gtk-hpaned>

Derives from <gtk-paned>.

This class defines no direct slots.

[Function] gtk-hpaned-new ⇒ (ret <gtk-widget>)
     Create a new <gtk-hpaned>
     ret  the new <gtk-hpaned>

98 GtkVPaned

A container with two panes arranged vertically

98.1 Overview

The VPaned widget is a container widget with two children arranged vertically. The division between the two panes is adjustable by the user by dragging a handle. See <gtk-paned> for details.

98.2 Usage

[Class] <gtk-vpaned>

Derives from <gtk-paned>.

This class defines no direct slots.

[Function] gtk-vpaned-new ⇒ (ret <gtk-widget>)
     Create a new <gtk-vpaned>
     ret  the new <gtk-vpaned>

99 GtkLayout

Infinite scrollable area containing child widgets and/or custom drawing

99.1 Overview

<gtk-layout> is similar to <gtk-drawing-area> in that it’s a "blank slate" and doesn’t do anything but paint a blank background by default. It’s different in that it supports scrolling natively (you can add it to a <gtk-scrolled-window>), and it can contain child widgets, since it’s a <gtk-container>. However if you’re just going to draw, a <gtk-drawing-area> is a better choice since it has lower overhead.

When handling expose events on a <gtk-layout>, you must draw to GTK LAYOUT (layout)->bin window, rather than to GTK WIDGET (layout)->window, as you would for a drawing area.

99.2 Usage

[Class] <gtk-layout>
Derives from <gtk-container>.

This class defines the following slots:

hadjustment

The GtkAdjustment for the horizontal position

vadjustment

The GtkAdjustment for the vertical position

width The width of the layout

height The height of the layout

[Signal on <gtk-layout>] set-scroll-adjustments (arg0 <gtk-adjustment>)
   (arg1 <gtk-adjustment>)
[Function] gtk-layout-new (hadjustment <gtk-adjustment>)
   (vadjustment <gtk-adjustment>) ⇒ (ret <gtk-widget>)

Creates a new <gtk-layout>. Unless you have a specific adjustment you’d like the layout to use for scrolling, pass ‘#f’ for hadjustment and vadjustment.

hadjustment horizontal scroll adjustment, or ‘#f’

vadjustment vertical scroll adjustment, or ‘#f’

ret  a new <gtk-layout>
[Function] gtk-layout-put (self <gtk-layout>) (child widget <gtk-widget>)
   (x int) (y int)

[Method] put

Adds child-widget to layout, at position (x,y). layout becomes the new parent container of child-widget.

layout  a <gtk-layout>

child-widget child widget

x X position of child widget

y Y position of child widget

[Function] gtk-layout-move (self <gtk-layout>) (child widget <gtk-widget>)
   (x int) (y int)

[Method] move

Moves a current child of layout to a new position.

layout  a <gtk-layout>

child-widget a current child of layout

x X position to move to

y Y position to move to

[Function] gtk-layout-set-size (self <gtk-layout>) (width unsigned-int)
   (height unsigned-int)
[Method] set-size

Sets the size of the scrollable area of the layout.

layout  a <gtk-layout>

width width of entire scrollable area

height height of entire scrollable area

[Function] gtk-layout-get-size (self <gtk-layout>) ⇒ (width unsigned-int)
   (height unsigned-int)
[Method] get-size

Gets the size that has been set on the layout, and that determines the total extents of the layout’s scrollbar area. See gtk-layout-set-size.

layout  a <gtk-layout>

width location to store the width set on layout, or ‘#f’

height location to store the height set on layout, or ‘#f’

[Function] gtk-layout-get-hadjustment (self <gtk-layout>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-hadjustment

This function should only be called after the layout has been placed in a <gtk-scrolled-window> or otherwise configured for scrolling. It returns the <gtk-adjustment> used for communication between the horizontal scrollbar and layout.

See <gtk-scrolled-window>, <gtk-scrollbar>, <gtk-adjustment> for details.
layout  a <gtk-layout>

ret horizontal scroll adjustment

[Function] gtk-layout-get-vadjustment (self <gtk-layout>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-vadjustment

This function should only be called after the layout has been placed in a <gtk-scrolled-window> or otherwise configured for scrolling. It returns the <gtk-adjustment> used for communication between the vertical scrollbar and layout.

See <gtk-scrolled-window>, <gtk-scrollbar>, <gtk-adjustment> for details.
layout  a <gtk-layout>

ret vertical scroll adjustment

[Function] gtk-layout-set-hadjustment (self <gtk-layout>)
   (adjustment <gtk-adjustment>)
[Method] set-hadjustment

Sets the horizontal scroll adjustment for the layout.

See <gtk-scrolled-window>, <gtk-scrollbar>, <gtk-adjustment> for details.
layout  a <gtk-layout>

adjustment new scroll adjustment

[Function] gtk-layout-set-vadjustment (self <gtk-layout>)
   (adjustment <gtk-adjustment>)
[Method] set-vadjustment

Sets the vertical scroll adjustment for the layout.

See <gtk-scrolled-window>, <gtk-scrollbar>, <gtk-adjustment> for details.
layout  a <gtk-layout>

adjustment new scroll adjustment

100 GtkNotebook

A tabbed notebook container

100.1 Overview

The <gtk-notebook> widget is a <gtk-container> whose children are pages that can be switched between using tab labels along one edge.

There are many configuration options for <gtk-notebook>. Among other things, you can choose on which edge the tabs appear (see gtk-notebook-set-tab-pos), whether, if there are too many tabs to fit the noteobook should be made bigger or scrolling arrows added (see gtk notebook set scrollable), and whether there will be a popup menu allowing the users

to switch pages. (see gtk-notebook-enable-popup, gtk-noteobook-disable-popup)

100.2 Usage

[Class] <gtk-notebook>
Derives from <gtk-container>.

This class defines the following slots:

tab-pos Which side of the notebook holds the tabs

show-tabs

Whether tabs should be shown or not

show-border

Whether the border should be shown or not

scrollable

If TRUE, scroll arrows are added if there are too many tabs to fit

tab-border

Width of the border around the tab labels

tab-hborder

Width of the horizontal border of tab labels

tab-vborder

Width of the vertical border of tab labels

page The index of the current page

enable-popup

If TRUE, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page

group-id Group ID for tabs drag and drop

group Group for tabs drag and drop

homogeneous

Whether tabs should have homogeneous sizes

[Signal on <gtk-notebook>] switch-page (arg0 <gpointer>) (arg1 <guint>)

Emitted when the user or a function changes the current page.

[Signal on <gtk-notebook>] focus-tab (arg0 <gtk-notebook-tab>)
        ⇒ <gboolean>
[Signal on <gtk-notebook>] select-page (arg0 <gboolean>) ⇒ <gboolean>
[Signal on <gtk-notebook>] change-current-page (arg0 <gint>) ⇒ <gboolean>
[Signal on <gtk-notebook>] move-focus-out (arg0 <gtk-direction-type>)
[Signal on <gtk-notebook>] reorder-tab (arg0 <gtk-direction-type>)
        (arg1 <gboolean>) ⇒ <gboolean>
[Signal on <gtk-notebook>] page-reordered (arg0 <gtk-widget>)
        (arg1 <guint>)

the ::page-reordered signal is emitted in the notebook right after a page has been reordered. Since 2.10

[Signal on <gtk-notebook>] page-removed (arg0 <gtk-widget>) (arg1 <guint>)

the ::page-removed signal is emitted in the notebook right after a page is removed from the notebook. Since 2.10

[Signal on <gtk-notebook>] page-added (arg0 <gtk-widget>) (arg1 <guint>)

the ::page-added signal is emitted in the notebook right after a page is added to the notebook. Since 2.10

[Signal on <gtk-notebook>] create-window (arg0 <gtk-widget>) (arg1 <gint>)
        (arg2 <gint>) ⇒ <gtk-notebook>

undocumented

[Function] gtk-notebook-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-notebook> widget with no pages.

ret the newly created <gtk-notebook>

[Function] gtk-notebook-append-page (self <gtk-notebook>)
        (child <gtk-widget>) (tab label <gtk-widget>) ⇒ (ret int)
[Method] append-page

Appends a page to notebook.

     notebook a <gtk-notebook>

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, or ‘#f’ to use the default label, ’page N’.

ret the index (starting from 0) of the appended page in the notebook, or -1 if function fails

[Function] gtk-notebook-append-page-menu (self <gtk-notebook>)
   (child <gtk-widget>) (tab label <gtk-widget>)

(menu label <gtk-widget>) ⇒ (ret int)

[Method] append-page-menu

Appends a page to notebook, specifying the widget to use as the label in the popup menu.

notebook a <gtk-notebook>

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, or ‘#f’ to use the default label, ’page N’.

menu-label the widget to use as a label for the page-switch menu, if that is enabled. If ‘#f’, and tab-label is a <gtk-label> or ‘#f’, then the menu label will be a newly created label with the same text as tab-label; If tab-label is not a <gtk-label>, menu-label must be specified if the page-switch menu is to be used.

ret the index (starting from 0) of the appended page in the notebook, or -1 if function fails

[Function] gtk-notebook-prepend-page (self <gtk-notebook>)
   (child <gtk-widget>) (tab label <gtk-widget>) ⇒ (ret int)
[Method] prepend-page

Prepends a page to notebook.

notebook a <gtk-notebook>

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, or ‘#f’ to use the default label, ’page N’.

ret the index (starting from 0) of the prepended page in the notebook, or -1 if function fails

[Function] gtk-notebook-prepend-page-menu (self <gtk-notebook>)
   (child <gtk-widget>) (tab label <gtk-widget>)

(menu label <gtk-widget>) ⇒ (ret int)

[Method] prepend-page-menu

Prepends a page to notebook, specifying the widget to use as the label in the popup menu.

notebook a <gtk-notebook>

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, or ‘#f’ to use the default label, ’page N’. menu-label

the widget to use as a label for the page-switch menu, if that is enabled. If ‘#f’, and tab-label is a <gtk-label> or ‘#f’, then the menu label will be a newly created label with the same text as tab-label; If tab-label is not a <gtk-label>, menu-label must be specified if the page-switch menu is to be used.

ret the index (starting from 0) of the prepended page in the notebook, or -1 if function fails

[Function] gtk-notebook-insert-page (self <gtk-notebook>)

(child <gtk-widget>) (tab label <gtk-widget>) (position int) ⇒ (ret int)

[Method] insert-page

Insert a page into notebook at the given position.

notebook a <gtk-notebook>

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, or ‘#f’ to use the default label, ’page N’.

position the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.

ret the index (starting from 0) of the inserted page in the notebook, or -1 if function fails

[Function] gtk-notebook-insert-page-menu (self <gtk-notebook>)
   (child <gtk-widget>) (tab label <gtk-widget>)

(menu label <gtk-widget>) (position int) ⇒ (ret int)

[Method] insert-page-menu

Insert a page into notebook at the given position, specifying the widget to use as the label in the popup menu.

notebook a <gtk-notebook>

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, or ‘#f’ to use the default label, ’page N’.

menu-label the widget to use as a label for the page-switch menu, if that is enabled. If ‘#f’, and tab-label is a <gtk-label> or ‘#f’, then the menu label will be a newly created label with the same text as tab-label; If tab-label is not a <gtk-label>, menu-label must be specified if the page-switch menu is to be used.

position the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.

ret the index (starting from 0) of the inserted page in the notebook

[Function] gtk-notebook-remove-page (self <gtk-notebook>) (page num int)
[Method] remove-page

Removes a page from the notebook given its index in the notebook.

notebook a <gtk-notebook>.

page-num the index of a notebook page, starting from 0. If -1, the last page will be removed.

[Function] gtk-notebook-page-num (self <gtk-notebook>) (child <gtk-widget>)

⇒ (ret int)

[Method] page-num

Finds the index of the page which contains the given child widget.

notebook a <gtk-notebook>
child  a <gtk-widget>

ret the index of the page containing child, or -1 if child is not in the notebook.

[Function] gtk-notebook-next-page (self <gtk-notebook>)
[Method] next-page

Switches to the next page. Nothing happens if the current page is the last page.

notebook a <gtk-notebook>
[Function] gtk-notebook-prev-page (self <gtk-notebook>)
[Method] prev-page

Switches to the previous page. Nothing happens if the current page is the first page.

notebook a <gtk-notebook>
[Function] gtk-notebook-reorder-child (self <gtk-notebook>)

(child <gtk-widget>) (position int)

[Method] reorder-child

Reorders the page containing child, so that it appears in position 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.

notebook a <gtk-notebook>

child the child to move

position the new position, or -1 to move to the end

[Function] gtk-notebook-set-tab-pos (self <gtk-notebook>)
   (pos <gtk-position-type>)
[Method] set-tab-pos

Sets the edge at which the tabs for switching pages in the notebook are drawn.

notebook a <gtk-notebook>.

pos the edge to draw the tabs at.

[Function] gtk-notebook-set-show-tabs (self <gtk-notebook>)

(show tabs bool)

[Method] set-show-tabs

Sets whether to show the tabs for the notebook or not.

notebook a <gtk-notebook>

show-tabs ‘#t’ if the tabs should be shown.

[Function] gtk-notebook-set-show-border (self <gtk-notebook>)

(show border bool)

[Method] set-show-border

Sets whether a bevel will be drawn around the notebook pages. This only has a visual effect when the tabs are not shown. See gtk-notebook-set-show-tabs.

notebook a <gtk-notebook>

show-border ‘#t’ if a bevel should be drawn around the notebook.

[Function] gtk-notebook-set-scrollable (self <gtk-notebook>)

(scrollable bool)

[Method] set-scrollable

Sets whether the tab label area will have arrows for scrolling if there are too many tabs to fit in the area.

notebook a <gtk-notebook>

scrollable ‘#t’ if scroll arrows should be added

[Function] gtk-notebook-popup-enable (self <gtk-notebook>)
[Method] popup-enable

Enables the popup menu: if the user clicks with the right mouse button on the bookmarks, a menu with all the pages will be popped up.

notebook a <gtk-notebook>
[Function] gtk-notebook-popup-disable (self <gtk-notebook>)
[Method] popup-disable

Disables the popup menu.

notebook a <gtk-notebook>
[Function] gtk-notebook-get-current-page (self <gtk-notebook>)

⇒ (ret int)

[Method] get-current-page

Returns the page number of the current page.

notebook a <gtk-notebook>

ret the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned.

[Function] gtk-notebook-get-menu-label (self <gtk-notebook>)
   (child <gtk-widget>) ⇒ (ret <gtk-widget>)
[Method] get-menu-label

Retrieves the menu label widget of the page containing child.

notebook a <gtk-notebook>

child a widget contained in a page of notebook

ret the menu label, or ‘#f’ if the notebook page does not have a menu label other than the default (the tab label).

[Function] gtk-notebook-get-nth-page (self <gtk-notebook>) (page num int)
   ⇒ (ret <gtk-widget>)
[Method] get-nth-page

Returns the child widget contained in page number page-num.

notebook a <gtk-notebook>

page-num the index of a page in the noteobok, or -1 to get the last page.

ret the child widget, or ‘#f’ if page-num is out of bounds.

[Function] gtk-notebook-get-n-pages (self <gtk-notebook>) ⇒ (ret int)
[Method] get-n-pages

Gets the number of pages in a notebook.

notebook a <gtk-notebook>

ret the number of pages in the notebook.

Since 2.2

[Function] gtk-notebook-get-tab-label (self <gtk-notebook>)
   (child <gtk-widget>) ⇒ (ret <gtk-widget>)
[Method] get-tab-label

Returns the tab label widget for the page child. ‘#f’ is returned if child is not in notebook or if no tab label has specifically been set for child.

notebook a <gtk-notebook>

child the page

ret the tab label

[Function] gtk-notebook-set-menu-label (self <gtk-notebook>)
   (child <gtk-widget>) (menu label <gtk-widget>)
[Method] set-menu-label

Changes the menu label for the page containing child.

notebook a <gtk-notebook>

child the child widget

menu-label the menu label, or NULL for default

[Function] gtk-notebook-set-menu-label-text (self <gtk-notebook>)
   (child <gtk-widget>) (menu text mchars)
[Method] set-menu-label-text

Creates a new label and sets it as the menu label of child.

notebook a <gtk-notebook>

child the child widget

menu-text the label text

[Function] gtk-notebook-set-tab-label (self <gtk-notebook>)
   (child <gtk-widget>) (tab label <gtk-widget>)
[Method] set-tab-label

Changes the tab label for child. If ‘#f’ is specified for tab-label, then the page will have the label ’page N’.

notebook a <gtk-notebook>

child the page

tab-label the tab label widget to use, or ‘#f’ for default tab label.

[Function] gtk-notebook-set-tab-label-packing (self <gtk-notebook>)
   (child <gtk-widget>) (expand bool) (fill bool)
   (pack type <gtk-pack-type>)
[Method] set-tab-label-packing

Sets the packing parameters for the tab label of the page containing child. See gtkbox-pack-start for the exact meaning of the parameters.

notebook a <gtk-notebook>

child the child widget

expand whether to expand the bookmark or not

fill whether the bookmark should fill the allocated area or not

pack-type the position of the bookmark

[Function] gtk-notebook-set-tab-label-text (self <gtk-notebook>)
   (child <gtk-widget>) (tab text mchars)
[Method] set-tab-label-text

Creates a new label and sets it as the tab label for the page containing child.

notebook a <gtk-notebook>

child the page

tab-text the label text

[Function] gtk-notebook-set-tab-reorderable (self <gtk-notebook>)

(child <gtk-widget>) (reorderable bool)

[Method] set-tab-reorderable

Sets whether the notebook tab can be reordered via drag and drop or not.

notebook a <gtk-notebook>

child  a child <gtk-widget>

reorderable whether the tab is reorderable or not.

Since 2.10

[Function] gtk-notebook-set-tab-detachable (self <gtk-notebook>)

(child <gtk-widget>) (detachable bool)

[Method] set-tab-detachable

Sets whether the tab can be detached from notebook to another notebook or widget.

Note that 2 notebooks must share a common group identificator (see gtk-notebook-set-group-id) 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 GtkWidget** pointing to the child widget that corresponds to the dropped tab.

      static void
      on_drop_zone_drag_data_received (GtkWidget        *widget,
                                       GdkDragContext   *context,
                                       gint              x,
                                       gint              y,
                                       GtkSelectionData *selection_data,
                                       guint             info,
                                       guint             time,
                                       gpointer          user_data)
      {
        GtkWidget *notebook;
        GtkWidget **child;
        notebook = gtk_drag_get_source_widget (context);
        child = (void*) selection_data->data;
        process_widget (*child);
        gtk_container_remove (GTK_CONTAINER (notebook), *child);
      }

If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it.

notebook a <gtk-notebook>
child  a child <gtk-widget>

detachable whether the tab is detachable or not

[Function] gtk-notebook-get-menu-label-text (self <gtk-notebook>)
   (child <gtk-widget>) ⇒ (ret mchars)
[Method] get-menu-label-text

Retrieves the text of the menu label for the page containing child.

notebook a <gtk-notebook>

child the child widget of a page of the notebook.

ret value: the text of the tab label, or ‘#f’ 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>. The string is owned by the widget and must not be freed.

[Function] gtk-notebook-get-scrollable (self <gtk-notebook>) ⇒ (ret bool)
[Method] get-scrollable

Returns whether the tab label area has arrows for scrolling. See gtk-notebook-set-

scrollable.
notebook a <gtk-notebook>

ret ‘#t’ if arrows for scrolling are present

[Function] gtk-notebook-get-show-border (self <gtk-notebook>)

⇒ (ret bool)

[Method] get-show-border

Returns whether a bevel will be drawn around the notebook pages. See

gtk-notebook-set-show-border.
notebook a <gtk-notebook>

ret ‘#t’ if the bevel is drawn

[Function] gtk-notebook-get-show-tabs (self <gtk-notebook>) ⇒ (ret bool)
[Method] get-show-tabs

Returns whether the tabs of the notebook are shown. See gtk-notebook-set-show-

tabs.
notebook a <gtk-notebook>

ret ‘#t’ if the tabs are shown

[Function] gtk-notebook-get-tab-label-text (self <gtk-notebook>)
   (child <gtk-widget>) ⇒ (ret mchars)
[Method] get-tab-label-text

Retrieves the text of the tab label for the page containing child.

notebook a <gtk-notebook>

child a widget contained in a page of notebook

ret value: the text of the tab label, or ‘#f’ if the tab label widget is not a <gtk-label>. The string is owned by the widget and must not be freed.

[Function] gtk-notebook-get-tab-pos (self <gtk-notebook>)
   ⇒ (ret <gtk-position-type>)
[Method] get-tab-pos

Gets the edge at which the tabs for switching pages in the notebook are drawn.

notebook a <gtk-notebook>

ret the edge at which the tabs are drawn

[Function] gtk-notebook-get-tab-reorderable (self <gtk-notebook>)
   (child <gtk-widget>) ⇒ (ret bool)
[Method] get-tab-reorderable

Gets whether the tab can be reordered via drag and drop or not.

notebook a <gtk-notebook>
child  a child <gtk-widget>

ret ‘#t’ if the tab is reorderable.

Since 2.10

[Function] gtk-notebook-get-tab-detachable (self <gtk-notebook>)
   (child <gtk-widget>) ⇒ (ret bool)
[Method] get-tab-detachable

Returns whether the tab contents can be detached from notebook.

notebook a <gtk-notebook>
child  a child <gtk-widget>

ret TRUE if the tab is detachable.

Since 2.10

[Function] gtk-notebook-set-current-page (self <gtk-notebook>)

(page num int)

[Method] set-current-page

Switches to the page number page-num. Note that due to historical reasons, GtkNotebook refuses to switch to a page unless the child widget is visible. Therefore, it is recommended to show child widgets before adding them to a notebook.

notebook a <gtk-notebook>

page-num 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.

[Function] gtk-notebook-set-group-id (self <gtk-notebook>) (group id int)
[Method] set-group-id

Sets an group identificator for notebook, notebooks sharing the same group identificator will be able to exchange tabs via drag and drop. A notebook with group identificator -1 will not be able to exchange tabs with any other notebook.

notebook a <gtk-notebook>

group-id a group identificator, or -1 to unset it Since 2.10

[Function] gtk-notebook-get-group-id (self <gtk-notebook>) ⇒ (ret int)
[Method] get-group-id

Gets the current group identificator for notebook.

notebook a <gtk-notebook>

ret the group identificator, or -1 if none is set. Since 2.10

101 GtkTable

Pack widgets in regular patterns

101.1 Overview

The <gtk-table> functions allow the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.

Tables are created with a call to gtk-table-new, the size of which can later be changed

with gtk-table-resize.

Widgets can be added to a table using gtk-table-attach or the more convenient (but

slightly less flexible) gtk-table-attach-defaults.

To alter the space next to a specific row, use gtk-table-set-row-spacing, and for a

column, gtk-table-set-col-spacing.

The gaps between all rows or columns can be changed by calling gtk-table-set-row-

spacings or gtk-table-set-col-spacings respectively.

gtk-table-set-homogeneous, can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.

101.2 Usage

[Class] <gtk-table>
Derives from <gtk-container>.

This class defines the following slots:

n-rows The number of rows in the table

n-columns

The number of columns in the table

column-spacing

The amount of space between two consecutive columns

row-spacing

The amount of space between two consecutive rows

homogeneous

If TRUE, the table cells are all the same width/height

[Function] gtk-table-new (rows unsigned-int) (columns unsigned-int)

(homogeneous bool) ⇒ (ret <gtk-widget>) Used to create a new table widget. An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with gtk-table-resize. rows and columns must both be in the range 0 .. 65535.

rows The number of rows the new table should have.

columns The number of columns the new table should have.

homogeneous If set to ‘#t’, all table cells are resized to the size of the cell containing the largest widget.

ret A pointer to the the newly created table widget.

[Function] gtk-table-resize (self <gtk-table>) (rows unsigned-int)
   (columns unsigned-int)

[Method] resize

If you need to change a table’s size after it has been created, this function allows you to do so.

table The <gtk-table> you wish to change the size of.

rows The new number of rows.

columns The new number of columns.

[Function] gtk-table-attach (self <gtk-table>) (child <gtk-widget>)

(left attach unsigned-int) (right attach unsigned-int) (top attach unsigned-int) (bottom attach unsigned-int)

   (xoptions <gtk-attach-options>) (yoptions <gtk-attach-options>)
   (xpadding unsigned-int) (ypadding unsigned-int)

[Method] attach

Adds a widget to a table. The number of ’cells’ that a widget will occupy is specified by left-attach, right-attach, top-attach and bottom-attach. These each represent the leftmost, rightmost, uppermost and lowest column and row numbers of the table. (Columns and rows are indexed from zero).

table The <gtk-table> to add a new widget to.

child The widget to add.

left-attach the column number to attach the left side of a child widget to.

right-attach the column number to attach the right side of a child widget to.

top-attach the row number to attach the top of a child widget to.

bottom-attach the row number to attach the bottom of a child widget to.

xoptions Used to specify the properties of the child widget when the table is resized.

yoptions The same as xoptions, except this field determines behaviour of vertical resizing.

xpadding An integer value specifying the padding on the left and right of the widget being added to the table.

ypadding The amount of padding above and below the child widget.

[Function] gtk-table-attach-defaults (self <gtk-table>)
   (widget <gtk-widget>) (left attach unsigned-int)
   (right attach unsigned-int) (top attach unsigned-int)

(bottom attach unsigned-int)

[Method] attach-defaults

As there are many options associated with gtk-table-attach, this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. The values used for the <gtk-attach-options> are ‘GTK_EXPAND | GTK_FILL’, and the padding is set to 0.

table The table to add a new child widget to.

widget The child widget to add.

left-attach The column number to attach the left side of the child widget to.

right-attach The column number to attach the right side of the child widget to.

top-attach The row number to attach the top of the child widget to.

bottom-attach The row number to attach the bottom of the child widget to.

[Function] gtk-table-set-row-spacing (self <gtk-table>)
   (row unsigned-int) (spacing unsigned-int)
[Method] set-row-spacing

Changes the space between a given table row and the subsequent row.

table a <gtk-table> containing the row whose properties you wish to change.

row row number whose spacing will be changed.

spacing number of pixels that the spacing should take up.

[Function] gtk-table-set-col-spacing (self <gtk-table>)
   (column unsigned-int) (spacing unsigned-int)
[Method] set-col-spacing

Alters the amount of space between a given table column and the following column.

table  a <gtk-table>.

column the column whose spacing should be changed.

spacing number of pixels that the spacing should take up.

[Function] gtk-table-set-row-spacings (self <gtk-table>)
   (spacing unsigned-int)
[Method] set-row-spacings

Sets the space between every row in table equal to spacing.

table  a <gtk-table>.

spacing the number of pixels of space to place between every row in the table.

[Function] gtk-table-set-col-spacings (self <gtk-table>)
   (spacing unsigned-int)
[Method] set-col-spacings

Sets the space between every column in table equal to spacing.

table  a <gtk-table>.

spacing the number of pixels of space to place between every column in the table.

[Function] gtk-table-set-homogeneous (self <gtk-table>) (homogeneous bool)
[Method] set-homogeneous

Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.

table The <gtk-table> you wish to set the homogeneous properties of.

homogeneous Set to ‘#t’ to ensure all table cells are the same size. Set to ‘#f’ if this is not your desired behaviour.

[Function] gtk-table-get-default-row-spacing (self <gtk-table>)
   ⇒ (ret unsigned-int)
[Method] get-default-row-spacing

Gets the default row spacing for the table. This is the spacing that will be used for

newly added rows. (See gtk-table-set-row-spacings)
table  a <gtk-table>

ret value: the default row spacing

[Function] gtk-table-get-homogeneous (self <gtk-table>) ⇒ (ret bool)
[Method] get-homogeneous

Returns whether the table cells are all constrained to the same width and height.

(See gtk-table-set-homogenous)
table  a <gtk-table>

ret ‘#t’ if the cells are all constrained to the same size

[Function] gtk-table-get-row-spacing (self <gtk-table>)
   (row unsigned-int) ⇒ (ret unsigned-int)
[Method] get-row-spacing

Gets the amount of space between row row, and row row + 1. See gtk-table-set-

row-spacing.
table  a <gtk-table>

row a row in the table, 0 indicates the first row

ret the row spacing

[Function] gtk-table-get-col-spacing (self <gtk-table>)
   (column unsigned-int) ⇒ (ret unsigned-int)
[Method] get-col-spacing

Gets the amount of space between column col, and column col + 1. See gtk-table-

set-col-spacing.
table  a <gtk-table>

column a column in the table, 0 indicates the first column

ret the column spacing

[Function] gtk-table-get-default-col-spacing (self <gtk-table>)
   ⇒ (ret unsigned-int)
[Method] get-default-col-spacing

Gets the default column spacing for the table. This is the spacing that will be used

for newly added columns. (See gtk-table-set-col-spacings)
table  a <gtk-table>

ret value: the default column spacing

102 GtkExpander

A container which can hide its child

102.1 Overview

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-tree-view>.

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.

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 an ‘expanded’ property which 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");
     g_signal_connect (expander, "notify::expanded",
                       G_CALLBACK (expander_callback), NULL);
     ...
     static void
     expander_callback (GObject    *object,
                        GParamSpec *param_spec,
                        gpointer    user_data)
     {
       GtkExpander *expander;
       expander = GTK_EXPANDER (object);
       if (gtk_expander_get_expanded (expander))
         {
           /* Show or create widgets */
         }
       else
         {
           /* Hide or destroy widgets */
         }
     }

102.2 Usage

[Class] <gtk-expander>

Derives from <gtk-bin>. This class defines the following slots: expanded Whether the expander has been opened to reveal the child widget label Text of the expander’s label

use-underline

If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key

use-markup

The text of the label includes XML markup. See pango parse markup()

spacing Space to put between the label and the child

label-widget

A widget to display in place of the usual expander label

[Signal on <gtk-expander>] activate
[Function] gtk-expander-new (label mchars) ⇒ (ret <gtk-widget>)

Creates a new expander using label as the text of the label. label the text of the label

ret  a new <gtk-expander> widget.

Since 2.4

[Function] gtk-expander-new-with-mnemonic (label mchars)
   ⇒ (ret <gtk-widget>)

Creates a new 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 and that key activates the button. label the text of the label with an underscore in front of the mnemonic character

ret  a new <gtk-expander> widget.

Since 2.4

[Function] gtk-expander-set-expanded (self <gtk-expander>) (expanded bool)
[Method] set-expanded

Sets the state of the expander. Set to ‘#t’, if you want the child widget to be revealed, and ‘#f’ if you want the child widget to be hidden.

expander a <gtk-expander>

expanded whether the child widget is revealed Since 2.4

[Function] gtk-expander-get-expanded (self <gtk-expander>) ⇒ (ret bool)
[Method] get-expanded

Queries a <gtk-expander> and returns its current state. Returns ‘#t’ if the child widget is revealed.

See gtk-expander-set-expanded.
expander a <gtk-expander>

ret the current state of the expander.

Since 2.4

[Function] gtk-expander-set-spacing (self <gtk-expander>) (spacing int)
[Method] set-spacing

Sets the spacing field of expander, which is the number of pixels to place between expander and the child.

expander a <gtk-expander>

spacing distance between the expander and child in pixels.

Since 2.4

[Function] gtk-expander-get-spacing (self <gtk-expander>) ⇒ (ret int)
[Method] get-spacing
Gets the value set by gtk-expander-set-spacing.
expander a <gtk-expander>

ret spacing between the expander and child.

Since 2.4

[Function] gtk-expander-set-label (self <gtk-expander>) (label mchars)
[Method] set-label

Sets the text of the label of the expander to label. This will also clear any previously set labels.

expander a <gtk-expander>

label a string

Since 2.4

[Function] gtk-expander-get-label (self <gtk-expander>) ⇒ (ret mchars)
[Method] get-label

Fetches the text from the label of the expander, as set by gtk-expander-set-label. If the label text has not been set the return value will be ‘#f’. This will be the case if you create an empty button with gtk-button-new to use as a container.

expander a <gtk-expander>

ret The text of the label widget. This string is owned by the widget and must not be modified or freed.

Since 2.4

[Function] gtk-expander-set-use-underline (self <gtk-expander>)

(use underline bool)

[Method] set-use-underline

If true, an underline in the text of the expander label indicates the next character should be used for the mnemonic accelerator key.

expander a <gtk-expander>

use-underline ‘#t’ if underlines in the text indicate mnemonics

Since 2.4

[Function] gtk-expander-get-use-underline (self <gtk-expander>)

⇒ (ret bool)

[Method] get-use-underline

Returns whether an embedded underline in the expander label indicates a mnemonic.

See gtk-expander-set-use-underline.
expander a <gtk-expander>

ret ‘#t’ if an embedded underline in the expander label indicates the mnemonic accelerator keys.

Since 2.4

[Function] gtk-expander-set-use-markup (self <gtk-expander>)

(use markup bool)

[Method] set-use-markup

Sets whether the text of the label contains markup in Pango’s text markup language.

See gtk-label-set-markup.
expander a <gtk-expander>

use-markup ‘#t’ if the label’s text should be parsed for markup

Since 2.4

[Function] gtk-expander-get-use-markup (self <gtk-expander>) ⇒ (ret bool)
[Method] get-use-markup

Returns whether the label’s text is interpreted as marked up with the Pango text

markup language. See gtk-expander-set-use-markup.
expander a <gtk-expander>

ret ‘#t’ if the label’s text will be parsed for markup

Since 2.4

[Function] gtk-expander-set-label-widget (self <gtk-expander>)

(label widget <gtk-widget>)

[Method] set-label-widget

Set the label widget for the expander. This is the widget that will appear embedded alongside the expander arrow.

expander a <gtk-expander>

label-widget

the new label widget

Since 2.4

[Function] gtk-expander-get-label-widget (self <gtk-expander>)
   ⇒ (ret <gtk-widget>)
[Method] get-label-widget

Retrieves the label widget for the frame. See gtk-expander-set-label-widget.

expander a <gtk-expander>

ret the label widget, or ‘#f’ if there is none. Since 2.4

103 GtkFrame

A bin with a decorative frame and optional label

103.1 Overview

The frame widget is a Bin that surrounds its child with a decorative frame and an optional label. If present, the label is drawn in a gap in the top side of the frame. The position of the label can be controlled with gtk-frame-set-label-align.

103.2 Usage

[Class] <gtk-frame>

Derives from <gtk-bin>. This class defines the following slots:

label Text of the frame’s label

label-xalign

The horizontal alignment of the label

label-yalign

The vertical alignment of the label

shadow Deprecated property, use shadow type instead

shadow-type

Appearance of the frame border

label-widget

A widget to display in place of the usual frame label

[Function] gtk-frame-new (label mchars) ⇒ (ret <gtk-widget>)

Creates a new <gtk-frame>, with optional label label. If label is ‘#f’, the label is omitted.

label the text to use as the label of the frame

ret a new <gtk-frame> widget

[Function] gtk-frame-set-label (self <gtk-frame>) (label mchars)
[Method] set-label

Sets the text of the label. If label is ‘#f’, the current label is removed.

frame  a <gtk-frame>

label the text to use as the label of the frame

[Function] gtk-frame-set-label-widget (self <gtk-frame>)

(label widget <gtk-widget>)

[Method] set-label-widget

Sets the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.

frame  a <gtk-frame>

label-widget the new label widget

[Function] gtk-frame-set-label-align (self <gtk-frame>) (xalign float)

(yalign float)

[Method] set-label-align

Sets the alignment of the frame widget’s label. The default values for a newly created frame are 0.0 and 0.5.

frame  a <gtk-frame>

xalign The position of the label along the top edge of the widget. A value of 0.0 represents left alignment; 1.0 represents right alignment.

yalign The y alignment of the label. A value of 0.0 aligns under the frame; 1.0 aligns above the frame.

[Function] gtk-frame-set-shadow-type (self <gtk-frame>)
   (type <gtk-shadow-type>)
[Method] set-shadow-type

Sets the shadow type for frame.

frame  a <gtk-frame>
type  the new <gtk-shadow-type>
[Function] gtk-frame-get-label (self <gtk-frame>) ⇒ (ret mchars)
[Method] get-label

If the frame’s label widget is a <gtk-label>, returns the text in the label widget. (The frame will have a <gtk-label> for the label widget if a non-‘#f’ argument was

passed to gtk-frame-new.)
frame  a <gtk-frame>

ret the text in the label, or ‘#f’ if there was no label widget or the lable widget was not a <gtk-label>. This string is owned by GTK+ and must not be modified or freed.

[Function] gtk-frame-get-label-align (self <gtk-frame>) ⇒ (xalign float)

(yalign float)

[Method] get-label-align

Retrieves the X and Y alignment of the frame’s label. See gtk-frame-set-label-

align.
frame  a <gtk-frame>

xalign location to store X alignment of frame’s label, or ‘#f’

yalign location to store X alignment of frame’s label, or ‘#f’

[Function] gtk-frame-get-label-widget (self <gtk-frame>)
   ⇒ (ret <gtk-widget>)
[Method] get-label-widget

Retrieves the label widget for the frame. See gtk-frame-set-label-widget.

frame  a <gtk-frame>

ret the label widget, or ‘#f’ if there is none.

[Function] gtk-frame-get-shadow-type (self <gtk-frame>)
   ⇒ (ret <gtk-shadow-type>)
[Method] get-shadow-type

Retrieves the shadow type of the frame. See gtk-frame-set-shadow-type.

frame  a <gtk-frame>

ret the current shadow type of the frame.

104 GtkHSeparator

A horizontal separator

104.1 Overview

The <gtk-hseparator> widget is a horizontal separator, used to group the widgets within a window. It displays a horizontal line with a shadow to make it appear sunken into the interface.

The <gtk-hseparator> widget is not used as a separator within menus. To create a separator in a menu create an empty <gtk-separator-menu-item> widget using gtk-

separator-menu-item-new and add it to the menu with gtk-menu-shell-append.

104.2 Usage

[Class] <gtk-hseparator>
     Derives from <gtk-separator>.

This class defines no direct slots.

[Function] gtk-hseparator-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-hseparator>.
     ret  a new <gtk-hseparator>.

105 GtkVSeparator

A vertical separator

105.1 Overview

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.

105.2 Usage

[Class] <gtk-vseparator>
     Derives from <gtk-separator>.

This class defines no direct slots.

[Function] gtk-vseparator-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-vseparator>.
     ret  a new <gtk-vseparator>.

106 GtkHScrollbar

A horizontal scrollbar

106.1 Overview

The <gtk-hscrollbar> widget is a widget arranged horizontally creating a scrollbar. See <gtk-scrollbar> for details on scrollbars. <gtk-adjustment> pointers may be added to handle the adjustment of the scrollbar or it may be left ‘#f’ in which case one will be created for you. See <gtk-adjustment> for details.

106.2 Usage

[Class] <gtk-hscrollbar>
     Derives from <gtk-scrollbar>.

This class defines no direct slots.

[Function] gtk-hscrollbar-new (adjustment <gtk-adjustment>)
        ⇒ (ret <gtk-widget>)

Creates a new horizontal scrollbar.

adjustment the <gtk-adjustment> to use, or ‘#f’ to create a new adjustment.

     ret  the new <gtk-hscrollbar>.

107 GtkVScrollbar

A vertical scrollbar

107.1 Overview

The <gtk-vscrollbar> widget is a widget arranged vertically creating a scrollbar. See <gtk-scrollbar> for details on scrollbars. <gtk-adjustment> pointers may be added to handle the adjustment of the scrollbar or it may be left ‘#f’ in which case one will be created for you. See <gtk-adjustment> for details.

107.2 Usage

[Class] <gtk-vscrollbar>
     Derives from <gtk-scrollbar>.

This class defines no direct slots.

[Function] gtk-vscrollbar-new (adjustment <gtk-adjustment>)
        ⇒ (ret <gtk-widget>)

Creates a new vertical scrollbar.

adjustment the <gtk-adjustment> to use, or ‘#f’ to create a new adjustment.

     ret  the new <gtk-vscrollbar>

108 GtkScrolledWindow

Adds scrollbars to its child widget

108.1 Overview

<gtk-scrolled-window> is a <gtk-bin> subclass: it’s a container the accepts a single child widget. <gtk-scrolled-window> adds scrollbars to the 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; these widgets have "slots" for <gtk-adjustment> objects. Widgets with native scroll

support include <gtk-tree-view>, <gtk-text-view>, and <gtk-layout>.

The scrolled window installs <gtk-adjustment> objects in the child window’s slots using the set scroll adjustments signal, found in <gtk-widget-class>. (Conceptually, these widgets implement a "Scrollable" interface; because GTK+ 1.2 lacked interface support in the object system, this interface is hackily implemented as a signal in <gtk-widget-class>. The GTK+ 2.0 object system would allow a clean implementation, but it wasn’t worth breaking the API.)

For widgets that lack native scrolling support, the <gtk-viewport> widget acts as an adaptor 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-scrolled-window> with gtk-container-add. If a widget does not, you must first add the widget to a <gtkviewport>, then add the <gtk-viewport> to the scrolled window. The convenience func-

tion gtk-scrolled-window-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. See <gtk-adjustment> for the fields in an adjustment - for <gtk-scrollbar>, used by <gtk-scrolled-window>, the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper - page size." The "page size" field represents the size of the visible scrollable area. The "step increment" and "page increment" fields are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).

If a <gtk-scrolled-window> 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>.

108.2 Usage

[Class] <gtk-scrolled-window>

Derives from <gtk-bin>.

This class defines the following slots:

     hadjustment

The GtkAdjustment for the horizontal position

vadjustment

The GtkAdjustment for the vertical position

hscrollbar-policy

When the horizontal scrollbar is displayed

vscrollbar-policy

When the vertical scrollbar is displayed

window-placement

Where the contents are located with respect to the scrollbars. This property only takes effect if "window-placement-set" is TRUE.

window-placement-set

Whether "window-placement" should be used to determine the location of the contents with respect to the scrollbars.

shadow-type

Style of bevel around the contents

[Signal on <gtk-scrolled-window>] move-focus-out
   (arg0 <gtk-direction-type>)
[Signal on <gtk-scrolled-window>] scroll-child (arg0 <gtk-scroll-type>)
   (arg1 <gboolean>) ⇒ <gboolean>
[Function] gtk-scrolled-window-new (hadjustment <gtk-adjustment>)
   (vadjustment <gtk-adjustment>) ⇒ (ret <gtk-widget>)

Creates a new scrolled window. The two arguments are the scrolled window’s adjustments; these will be shared with the scrollbars and the child widget to keep the bars in sync with the child. Usually you want to pass ‘#f’ for the adjustments, which will cause the scrolled window to create them for you. hadjustment

Horizontal adjustment.

vadjustment

Vertical adjustment.

ret New scrolled window.

[Function] gtk-scrolled-window-get-hadjustment
   (self <gtk-scrolled-window>) ⇒ (ret <gtk-adjustment>)
[Method] get-hadjustment

Returns the horizontal scrollbar’s adjustment, used to connect the horizontal scrollbar to the child widget’s horizontal scroll functionality. scrolled-window

          A <gtk-scrolled-window>.

ret The horizontal <gtk-adjustment>.

[Function] gtk-scrolled-window-get-vadjustment
   (self <gtk-scrolled-window>) ⇒ (ret <gtk-adjustment>)
[Method] get-vadjustment

Returns the vertical scrollbar’s adjustment, used to connect the vertical scrollbar to the child widget’s vertical scroll functionality. scrolled-window

          A <gtk-scrolled-window>.
ret  The vertical <gtk-adjustment>.
[Function] gtk-scrolled-window-get-hscrollbar
   (self <gtk-scrolled-window>) ⇒ (ret <gtk-widget>)
[Method] get-hscrollbar

Returns the horizontal scrollbar of scrolled-window.

scrolled-window

          a <gtk-scrolled-window>

ret the horizontal scrollbar of the scrolled window, or ‘#f’ if it does not have one.

Since 2.8

[Function] gtk-scrolled-window-get-vscrollbar
   (self <gtk-scrolled-window>) ⇒ (ret <gtk-widget>)
[Method] get-vscrollbar

Returns the vertical scrollbar of scrolled-window.

scrolled-window

          a <gtk-scrolled-window>

ret the vertical scrollbar of the scrolled window, or ‘#f’ if it does not have one.

Since 2.8

[Function] gtk-scrolled-window-set-policy (self <gtk-scrolled-window>)

(hscrollbar policy <gtk-policy-type>) (vscrollbar policy <gtk-policy-type>)

[Method] set-policy

Sets the scrollbar policy for the horizontal and vertical scrollbars. The policy determines when the scrollbar should appear; it is a value from the <gtk-policy-type> enumeration. If ‘GTK_POLICY_ALWAYS’, the scrollbar is always present; if ‘GTK_POLICY_NEVER’, the scrollbar is never present; if ‘GTK_POLICY_AUTOMATIC’, the scrollbar is present only if needed (that is, if the slider part of the bar would be smaller than the trough - the display is larger than the page size).

scrolled-window

          A <gtk-scrolled-window>.

hscrollbar-policy Policy for horizontal bar.

vscrollbar-policy Policy for vertical bar.

[Function] gtk-scrolled-window-set-placement
   (self <gtk-scrolled-window>) (window placement <gtk-corner-type>)
[Method] set-placement

Sets the placement of the contents with respect to the scrollbars for the scrolled window.

See also gtk-scrolled-window-get-placement and gtk-scrolled-window-unset-
placement.

Determines the location of the child widget with respect to the scrollbars. The default is ‘GTK_CORNER_TOP_LEFT’, meaning the child is in the top left, with the scrollbars underneath and to the right. Other values in <gtk-

corner-type> are ‘GTK_CORNER_TOP_RIGHT’, ‘GTK_CORNER_BOTTOM_LEFT’, and
‘GTK_CORNER_BOTTOM_RIGHT’.

scrolled-window

          a <gtk-scrolled-window>

window-placement Position of the child window.

[Function] gtk-scrolled-window-unset-placement
   (self <gtk-scrolled-window>)
[Method] unset-placement

Unsets the placement of the contents with respect to the scrollbars for the scrolled window. If no window placement is set for a scrolled window, it obeys the "gtkscrolled-window-placement" XSETTING.

See also gtk-scrolled-window-set-placement and gtk-scrolled-window-get-
placement.

scrolled-window

          a <gtk-scrolled-window>

Since 2.10

[Function] gtk-scrolled-window-set-shadow-type
   (self <gtk-scrolled-window>) (type <gtk-shadow-type>)
[Method] set-shadow-type

Changes the type of shadow drawn around the contents of scrolled-window.

scrolled-window

          a <gtk-scrolled-window>

type kind of shadow to draw around scrolled window contents

[Function] gtk-scrolled-window-set-hadjustment
   (self <gtk-scrolled-window>) (hadjustment <gtk-adjustment>)
[Method] set-hadjustment

Sets the <gtk-adjustment> for the horizontal scrollbar.

scrolled-window

          A <gtk-scrolled-window>.

hadjustment Horizontal scroll adjustment.

[Function] gtk-scrolled-window-set-vadjustment
   (self <gtk-scrolled-window>) (vadjustment <gtk-adjustment>)
[Method] set-vadjustment

Sets the <gtk-adjustment> for the vertical scrollbar.

scrolled-window

          A <gtk-scrolled-window>.

vadjustment Vertical scroll adjustment.

[Function] gtk-scrolled-window-get-placement
   (self <gtk-scrolled-window>) ⇒ (ret <gtk-corner-type>)
[Method] get-placement

Gets the placement of the contents with respect to the scrollbars for the scrolled

window. See gtk-scrolled-window-set-placement.

scrolled-window

          a <gtk-scrolled-window>

ret the current placement value. See also gtk-scrolled-window-set-

          placement and gtk-scrolled-window-unset-placement.
[Function] gtk-scrolled-window-get-shadow-type
   (self <gtk-scrolled-window>) ⇒ (ret <gtk-shadow-type>)
[Method] get-shadow-type

Gets the shadow type of the scrolled window. See gtk-scrolled-window-set-

shadow-type.

scrolled-window

          a <gtk-scrolled-window>

ret the current shadow type

109 GtkPrintOperation

High-level Printing API

109.1 Overview

GtkPrintOperation is the high-level, portable printing API. It looks a bit different than other GTK+ dialogs such as the <gtk-file-chooser>, since some platforms don’t expose enough infrastructure to implement a good print dialog. On such platforms, GtkPrintOperation uses the native print dialog. On platforms which do not provide a native print dialog, GTK+

uses its own, see <gtk-print-unix-dialog>.

The typical way to use the high-level printing API is to create a <gtk-print-operation> object with gtk-print-operation-new when the user selects to print. Then you set some properties on it, e.g. the page size, any <gtk-print-settings> from previous print operations, the number of pages, the current page, etc.

Then you start the print operation by calling gtk-print-operation-run. 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-print-operation>, the main one being ::drawpage, which you are supposed to catch and render the page on the provided <gtk-print-context> using Cairo.

     static GtkPrintSettings *settings = NULL;
     static void
     do_print (void)
     {
       GtkPrintOperation *print;
       GtkPrintOperationResult res;
       print = gtk_print_operation_new ();
       if (settings != NULL)
         gtk_print_operation_set_print_settings (print, settings);
       g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
       g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
       res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
                                      GTK_WINDOW (main_window), NULL);
       if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
         {
           if (settings != NULL)
             g_object_unref (settings);
           settings = g_object_ref (gtk_print_operation_get_print_settings (print));
         }

  g_object_unref (print);
}

By default GtkPrintOperation uses an external application to do print preview. To implement a custom print preview, an application must connect to the preview signal. The

functions gtk-print-operation-print-preview-render-page, gtk-print-operation-
preview-end-preview and gtk-print-operation-preview-is-selected are useful

when implementing a print preview.

Printing support was added in GTK+ 2.10.

109.2 Usage

[Class] <gtk-print-operation>
Derives from <gtk-print-operation-preview>, <gobject>.

This class defines the following slots:

default-page-setup

The GtkPageSetup used by default

print-settings

The GtkPrintSettings used for initializing the dialog

job-name A string used for identifying the print job.

n-pages The number of pages in the document.

current-page

The current page in the document

use-full-page

TRUE if the origin of the context should be at the corner of the page and not the corner of the imageable area

track-print-status

TRUE if the print operation will continue to report on the print job status after the print data has been sent to the printer or print server.

unit The unit in which distances can be measured in the context

show-progress

TRUE if a progress dialog is shown while printing.

allow-async

TRUE if print process may run asynchronous.

export-filename

Export filename

status The status of the print operation

status-string

A human-readable description of the status

custom-tab-label

Label for the tab containing custom widgets.

[Signal on <gtk-print-operation>] done (arg0 <gtk-print-operation-result>)

Emitted when the print operation run has finished doing everything required for printing. result gives you information about what happened during the run. If result

is ‘GTK_PRINT_OPERATION_RESULT_ERROR’ then you can call gtk-print-operation-

get-error for more information. If you enabled print status tracking then gtk-print-operation-is-finished may still return ‘#f’ after this was emitted. Since 2.10

[Signal on <gtk-print-operation>] begin-print (arg0 <gtk-print-context>)

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-print-context> and paginate the document accordingly, and then set the number of pages with gtk-

print-operation-set-n-pages.

Since 2.10

[Signal on <gtk-print-operation>] paginate (arg0 <gtk-print-context>)
   ⇒ <gboolean>

Emitted after the begin-print signal, but before the actual rendering starts. It keeps getting emitted until it returns ‘#f’. 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 gtk-print-operation-set-n-pages, and return ‘#t’ 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. Since 2.10

[Signal on <gtk-print-operation>] request-page-setup
   (arg0 <gtk-print-context>) (arg1 <gint>) (arg2 <gtk-page-setup>)

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. Since 2.10

[Signal on <gtk-print-operation>] draw-page (arg0 <gtk-print-context>)
   (arg1 <gint>)

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-print-context-get-

cairo-context.
     static void
     draw_page (GtkPrintOperation *operation,
                GtkPrintContext   *context,
                gint               page_nr,
                gpointer           user_data)

{
cairo_t *cr;
PangoLayout *layout;
gdouble width, text_height;
gint layout_height;
PangoFontDescription *desc;
cr = gtk_print_context_get_cairo_context (context);
width = gtk_print_context_get_width (context);
cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
cairo_fill (cr);
layout = gtk_print_context_create_pango_layout (context);
desc = pango_font_description_from_string ("sans 14");
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
pango_layout_set_text (layout, "some text", -1);
pango_layout_set_width (layout, width);
pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
pango_layout_get_size (layout, NULL, &layout_height);
text_height = (gdouble)layout_height / PANGO_SCALE;
cairo_move_to (cr, width / 2,  (HEADER_HEIGHT - text_height) / 2);
pango_cairo_show_layout (cr, layout);
g_object_unref (layout);
}
Use gtk-print-operation-set-use-full-page and gtk-print-operation-set-

unit before starting the print operation to set up the transformation of the cairo context according to your needs. Since 2.10

[Signal on <gtk-print-operation>] end-print (arg0 <gtk-print-context>)

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. Since 2.10

[Signal on <gtk-print-operation>] status-changed

Emitted at between the various phases of the print operation. See <gtk-print-status> for the phases that are being discriminated. Use gtk-print-operation-get-status to find out the current status.

Since 2.10

[Signal on <gtk-print-operation>] create-custom-widget ⇒ <gobject>

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. Since 2.10

[Signal on <gtk-print-operation>] custom-widget-apply (arg0 <gtk-widget>)

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. Since 2.10

[Signal on <gtk-print-operation>] preview
   (arg0 <gtk-print-operation-preview>) (arg1 <gtk-print-context>)
   (arg2 <gtk-window>) ⇒ <gboolean>

Gets emitted when a preview is requested from the native dialog. The default handler for this signal uses an external viewer application to preview. To implement a custom print preview, an application must return ‘#t’ from its handler for this signal. In order to use the provided context for the preview implementation, it must be given a suitable cairo context with gtk-print-context-set-cairo-

context.

The custom preview implementation can use gtk-print-operation-preview-is-

selected and gtk-print-operation-preview-render-page to find pages which are

selected for print and render them. The preview must be finished by calling gtkprint-operation-preview-end-preview (typically in response to the user clicking a close button). Since 2.10

[Class] <gtk-print-operation-preview>
Derives from <ginterface>.

This class defines no direct slots.

[Signal on <gtk-print-operation-preview>] ready (arg0 <gtk-print-context>)

undocumented

[Signal on <gtk-print-operation-preview>] got-page-size
   (arg0 <gtk-print-context>) (arg1 <gtk-page-setup>)

undocumented

[Function] gtk-print-operation-new ⇒ (ret <gtk-print-operation>)
Creates a new <gtk-print-operation>.

ret  a new <gtk-print-operation>

Since 2.10

[Function] gtk-print-operation-set-allow-async
   (self <gtk-print-operation>) (allow async bool)
[Method] set-allow-async

Sets whether the gtk-print-operation-run may return before the print operation is completed. Note that some platforms may not allow asynchronous operation.

op  a <gtk-print-operation>

allow-async ‘#t’ to allow asynchronous operation

Since 2.10

[Function] gtk-print-operation-get-error (self <gtk-print-operation>)
[Method] get-error

Call this when the result of a print operation is ‘GTK_PRINT_OPERATION_RESULT_ERROR’, either as returned by gtk-print-operation-run, or in the ::done signal handler. The returned <g-error> will contain more details on what went wrong.

op  a <gtk-print-operation>

error return location for the error

Since 2.10

[Function] gtk-print-operation-set-job-name (self <gtk-print-operation>)

(job name mchars)

[Method] set-job-name

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.

op  a <gtk-print-operation>

job-name a string that identifies the print job

Since 2.10

[Function] gtk-print-operation-set-n-pages (self <gtk-print-operation>)

(n pages int)

[Method] set-n-pages

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.

op  a <gtk-print-operation>

n-pages the number of pages

Since 2.10

[Function] gtk-print-operation-set-unit (self <gtk-print-operation>)
   (unit <gtk-unit>)
[Method] set-unit

Sets up the transformation for the cairo context obtained from <gtk-print-context> in such a way that distances are measured in units of unit.

op  a <gtk-print-operation>

unit the unit to use

Since 2.10

[Function] gtk-print-operation-run (self <gtk-print-operation>)
   (action <gtk-print-operation-action>) (parent <gtk-window>)
   ⇒ (ret <gtk-print-operation-result>)

[Method] run

Runs the print operation, by first letting the user modify print settings in the print dialog, and then print the document. Normally that this function does not return until the rendering of all pages is complete. You can connect to the ::status-changed signal on op 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 gtk-print-operation-set-allow-async 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 != NULL)
       gtk_print_operation_set_print_settings (print, settings);
     if (page_setup != NULL)
       gtk_print_operation_set_default_page_setup (print, page_setup);
     g_signal_connect (print, "begin-print",
                       G_CALLBACK (begin_print), &data);
     g_signal_connect (print, "draw-page",
                       G_CALLBACK (draw_page), &data);
     res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, &error);
     if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
      {
        error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
                             GTK_DIALOG_DESTROY_WITH_PARENT,
          GTK_MESSAGE_ERROR,

          GTK_BUTTONS_CLOSE,
          "Error printing file:\n%s",
          error->message);
        g_signal_connect (error_dialog, "response",
                          G_CALLBACK (gtk_widget_destroy), NULL);
        gtk_widget_show (error_dialog);
        g_error_free (error);
      }
     else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
      {
        if (settings != NULL)
     g_object_unref (settings);
        settings = g_object_ref (gtk_print_operation_get_print_settings (print));
      }

Note that gtk-print-operation-run can only be called once on a given <gtk-print-

operation>.
op  a <gtk-print-operation>

action the action to start

parent Transient parent of the dialog, or ‘#f’

error Return location for errors, or ‘#f’

ret  the result of the print operation.  A return value of

          ‘GTK_PRINT_OPERATION_RESULT_APPLY’ indicates that the print-

ing was completed successfully. In this case, it is a good idea to

          obtain the used print settings with gtk-print-operation-get-print-

settings 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.

Since 2.10

[Function] gtk-print-operation-cancel (self <gtk-print-operation>)

[Method] cancel

Cancels a running print operation. This function may be called from a begin-print, paginate or draw-page signal handler to stop the currently running print operation.

op  a <gtk-print-operation>

Since 2.10

[Function] gtk-print-operation-get-status (self <gtk-print-operation>)
   ⇒ (ret <gtk-print-status>)
[Method] get-status

Returns the status of the print operation. Also see gtk-print-operation-get-

status-string.
op  a <gtk-print-operation>

ret the status of the print operation

Since 2.10

[Function] gtk-print-operation-is-finished (self <gtk-print-operation>)

⇒ (ret bool)

[Method] is-finished

A convenience function to find out if the print operation is finished, either successfully (‘GTK_PRINT_STATUS_FINISHED’) or unsuccessfully

(‘GTK_PRINT_STATUS_FINISHED_ABORTED’).

Note: when you enable print status tracking the print operation can be in a nonfinished state even after done has been called, as the operation status then tracks the print job status on the printer.

op  a <gtk-print-operation>

ret ‘#t’, if the print operation is finished.

Since 2.10

[Function] gtk-print-operation-get-error (self <gtk-print-operation>)
[Method] get-error

Call this when the result of a print operation is ‘GTK_PRINT_OPERATION_RESULT_ERROR’, either as returned by gtk-print-operation-run, or in the ::done signal handler. The returned <g-error> will contain more details on what went wrong.

op  a <gtk-print-operation>

error return location for the error

Since 2.10

[Function] gtk-print-run-page-setup-dialog (parent <gtk-window>)
   (page setup <gtk-page-setup>) (settings <gtk-print-settings>)
   ⇒ (ret <gtk-page-setup>)

Runs a page setup dialog, letting the user modify the values from page-setup. If the user cancels the dialog, the returned <gtk-page-setup> 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.

See gtk-print-run-page-setup-dialog-async if this is a problem.

parent transient parent, or ‘#f’

page-setup

          an existing <gtk-page-setup>, or ‘#f’
settings a <gtk-print-settings>
ret  a new <gtk-page-setup>

Since 2.10

110 GtkPrintContext

Encapsulates context for drawing pages

110.1 Overview

A GtkPrintContext 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.

GtkPrintContext objects gets passed to the ::begin-print, ::end-print, ::request-page-setup and ::draw-page signals on the <gtk-print-operation>.

static void
draw_page (GtkPrintOperation *operation,
 GtkPrintContext   *context,
 int                page_nr)
{
cairo_t *cr;
PangoLayout *layout;
PangoFontDescription *desc;
cr = gtk_print_context_get_cairo_context (context);
/* Draw a red rectangle, as wide as the paper (inside the margins) */
cairo_set_source_rgb (cr, 1.0, 0, 0);
cairo_rectangle (cr, 0, 0, gtk_print_context_get_width (context), 50);
cairo_fill (cr);
/* Draw some lines */
cairo_move_to (cr, 20, 10);
cairo_line_to (cr, 40, 20);
cairo_arc (cr, 60, 60, 20, 0, M_PI);
cairo_line_to (cr, 80, 20);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_set_line_width (cr, 5);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
cairo_stroke (cr);
/* Draw some text */
layout = gtk_print_context_create_layout (context);
pango_layout_set_text (layout, "Hello World! Printing is easy", -1);
desc = pango_font_description_from_string ("sans 28");

  pango_layout_set_font_description (layout, desc);
  pango_font_description_free (desc);
  cairo_move_to (cr, 30, 20);
  pango_cairo_layout_path (cr, layout);
  /* Font Outline */
  cairo_set_source_rgb (cr, 0.93, 1.0, 0.47);
  cairo_set_line_width (cr, 0.5);
  cairo_stroke_preserve (cr);
  /* Font Fill */
  cairo_set_source_rgb (cr, 0, 0.0, 1.0);
  cairo_fill (cr);
  g_object_unref (layout);
}

Printing support was added in GTK+ 2.10.

110.2 Usage

[Class] <gtk-print-context>

Derives from <gobject>. This class defines no direct slots.

[Function] gtk-print-context-get-cairo-context
   (self <gtk-print-context>) ⇒ (ret cairo-t)
[Method] get-cairo-context

Obtains the cairo context that is associated with the <gtk-print-context>.

context  a <gtk-print-context>

ret the cairo context of context

Since 2.10

[Function] gtk-print-context-set-cairo-context
   (self <gtk-print-context>) (cr cairo-t) (dpi x double) (dpi y double)
[Method] set-cairo-context

Sets a new cairo context on a print context. This function is intended to be used when implementing an internal print preview, it is not needed for printing, since GTK+ itself creates a suitable cairo context in that case.

context  a <gtk-print-context>

cr the cairo context

dpi-x the horizontal resolution to use with cr

dpi-y the vertical resolution to use with cr

Since 2.10

[Function] gtk-print-context-get-page-setup (self <gtk-print-context>)
   ⇒ (ret <gtk-page-setup>)
[Method] get-page-setup

Obtains the <gtk-page-setup> that determines the page dimensions of the <gtk-

print-context>.
context  a <gtk-print-context>

ret the page setup of context

Since 2.10

[Function] gtk-print-context-get-width (self <gtk-print-context>)
   ⇒ (ret double)
[Method] get-width

Obtains the width of the <gtk-print-context>, in pixels.

context  a <gtk-print-context>

ret the width of context

Since 2.10

[Function] gtk-print-context-get-height (self <gtk-print-context>)
   ⇒ (ret double)
[Method] get-height

Obtains the height of the <gtk-print-context>, in pixels.

context  a <gtk-print-context>

ret the height of context

Since 2.10

[Function] gtk-print-context-get-dpi-x (self <gtk-print-context>)
   ⇒ (ret double)
[Method] get-dpi-x

Obtains the horizontal resolution of the <gtk-print-context>, in dots per inch.

context  a <gtk-print-context>

ret the horizontal resolution of context

Since 2.10

[Function] gtk-print-context-get-dpi-y (self <gtk-print-context>)
   ⇒ (ret double)
[Method] get-dpi-y

Obtains the vertical resolution of the <gtk-print-context>, in dots per inch.

context  a <gtk-print-context>

ret the vertical resolution of context

[Function] gtk-print-context-get-pango-fontmap
   (self <gtk-print-context>) ⇒ (ret <pango-font-map>)
[Method] get-pango-fontmap

Returns a <pango-font-map> that is suitable for use with the <gtk-print-context>.

context  a <gtk-print-context>

ret the font map of context

Since 2.10

111 GtkPrintSettings

Stores print settings

111.1 Overview

A GtkPrintSettings 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.

111.2 Usage

[Class] <gtk-print-settings>

Derives from <gobject>. This class defines no direct slots.

[Function] gtk-print-settings-new ⇒ (ret <gtk-print-settings>)
Creates a new <gtk-print-settings> object.
ret  a new <gtk-print-settings> object

Since 2.10

[Function] gtk-print-settings-has-key (self <gtk-print-settings>)

(key mchars) ⇒ (ret bool)

[Method] has-key

Returns ‘#t’, if a value is associated with key.

settings a <gtk-print-settings>

key a key

ret ‘#t’, if key has a value

Since 2.10

[Function] gtk-print-settings-get (self <gtk-print-settings>) (key mchars)
   ⇒ (ret mchars)

[Method] get

Looks up the string value associated with key.

settings a <gtk-print-settings>

key a key

ret the string value for key

Since 2.10

[Function] gtk-print-settings-set (self <gtk-print-settings>) (key mchars)

(value mchars)

[Method] set

Associates value with key.

settings a <gtk-print-settings>

key a key

value a string value, or ‘#f’

Since 2.10

[Function] gtk-print-settings-unset (self <gtk-print-settings>)
   (key mchars)

[Method] unset

Removes any value associated with key. This has the same effect as setting the value to ‘#f’.

settings a <gtk-print-settings>

key a key

Since 2.10

[Function] gtk-print-settings-get-bool (self <gtk-print-settings>)

(key mchars) ⇒ (ret bool)

[Method] get-bool

Returns the boolean represented by the value that is associated with key. The string "true" represents ‘#t’, any other string ‘#f’.

settings a <gtk-print-settings>

key a key

ret ‘#t’, if key maps to a true value.

Since 2.10

[Function] gtk-print-settings-set-bool (self <gtk-print-settings>)

(key mchars) (value bool)

[Method] set-bool

Sets key to a boolean value.

settings a <gtk-print-settings>

key a key

value a boolean

Since 2.10

[Function] gtk-print-settings-get-double (self <gtk-print-settings>)
   (key mchars) ⇒ (ret double)
[Method] get-double

Returns the double value associated with key, or 0.

settings a <gtk-print-settings>

key a key ret the double value of key Since 2.10

[Function] gtk-print-settings-set-double (self <gtk-print-settings>)
   (key mchars) (value double)
[Method] set-double

Sets key to a double value.

settings a <gtk-print-settings>

key a key value a double value Since 2.10

[Function] gtk-print-settings-get-length (self <gtk-print-settings>)
   (key mchars) (unit <gtk-unit>) ⇒ (ret double)
[Method] get-length

Returns the value associated with key, interpreted as a length. The returned value is converted to units.

settings a <gtk-print-settings>

key a key unit the unit of the return value ret the length value of key, converted to unit Since 2.10

[Function] gtk-print-settings-set-length (self <gtk-print-settings>)
   (key mchars) (value double) (unit <gtk-unit>)
[Method] set-length

Associates a length in units of unit with key.

settings a <gtk-print-settings>

key a key value a length unit the unit of length Since 2.10

[Function] gtk-print-settings-get-int (self <gtk-print-settings>)

(key mchars) ⇒ (ret int)

[Method] get-int

Returns the integer value of key, or 0.

settings a <gtk-print-settings>

key a key

ret the integer value of key

Since 2.10

[Function] gtk-print-settings-set-int (self <gtk-print-settings>)

(key mchars) (value int)

[Method] set-int

Sets key to an integer value.

settings a <gtk-print-settings>

key a key

value an integer

Since 2.10

[Function] gtk-print-settings-get-printer (self <gtk-print-settings>)
   ⇒ (ret mchars)
[Method] get-printer

Convenience function to obtain the value of ‘GTK_PRINT_SETTINGS_PRINTER’.

settings a <gtk-print-settings>

ret the printer name

Since 2.10

[Function] gtk-print-settings-set-printer (self <gtk-print-settings>)

(printer mchars)

[Method] set-printer

Convenience function to set ‘GTK_PRINT_SETTINGS_PRINTER’ to printer.

settings a <gtk-print-settings>

printer the printer name

Since 2.10

[Function] gtk-print-settings-get-orientation
   (self <gtk-print-settings>) ⇒ (ret <gtk-page-orientation>)
[Method] get-orientation
Get the value of ‘GTK_PRINT_SETTINGS_ORIENTATION’, converted to a <gtk-page-
orientation>.
settings a <gtk-print-settings>

ret the orientation

Since 2.10

[Function] gtk-print-settings-set-orientation
   (self <gtk-print-settings>) (orientation <gtk-page-orientation>)
[Method] set-orientation
Sets the value of ‘GTK_PRINT_SETTINGS_ORIENTATION’.

settings a <gtk-print-settings>

orientation a page orientation

Since 2.10

[Function] gtk-print-settings-get-paper-size (self <gtk-print-settings>)
   ⇒ (ret <gtk-paper-size>)
[Method] get-paper-size
Gets the value of ‘GTK_PRINT_SETTINGS_PAPER_FORMAT’, converted to a <gtk-paper-
size>.
settings a <gtk-print-settings>

ret the paper size

Since 2.10

[Function] gtk-print-settings-set-paper-size (self <gtk-print-settings>)
   (paper size <gtk-paper-size>)
[Method] set-paper-size
Sets the value of ‘GTK_PRINT_SETTINGS_PAPER_FORMAT’, ‘GTK_PRINT_SETTINGS_PAPER_WIDTH’
and ‘GTK_PRINT_SETTINGS_PAPER_HEIGHT’.
settings a <gtk-print-settings>

paper-size a paper size

Since 2.10

[Function] gtk-print-settings-get-paper-width
   (self <gtk-print-settings>) (unit <gtk-unit>) ⇒ (ret double)
[Method] get-paper-width

Gets the value of ‘GTK_PRINT_SETTINGS_PAPER_WIDTH’, converted to unit.

settings a <gtk-print-settings>

unit the unit for the return value

ret the paper width, in units of unit

Since 2.10

[Function] gtk-print-settings-set-paper-width
   (self <gtk-print-settings>) (width double) (unit <gtk-unit>)
[Method] set-paper-width
Sets the value of ‘GTK_PRINT_SETTINGS_PAPER_WIDTH’.
settings a <gtk-print-settings>

width the paper width

unit the units of width

[Function] gtk-print-settings-get-paper-height
   (self <gtk-print-settings>) (unit <gtk-unit>) ⇒ (ret double)
[Method] get-paper-height

Gets the value of ‘GTK_PRINT_SETTINGS_PAPER_HEIGHT’, converted to unit.

settings a <gtk-print-settings>

unit the unit for the return value ret the paper height, in units of unit Since 2.10

[Function] gtk-print-settings-set-paper-height
   (self <gtk-print-settings>) (height double) (unit <gtk-unit>)
[Method] set-paper-height
Sets the value of ‘GTK_PRINT_SETTINGS_PAPER_HEIGHT’.
settings a <gtk-print-settings>

height the paper height unit the units of height Since 2.10

[Function] gtk-print-settings-get-use-color (self <gtk-print-settings>)

⇒ (ret bool)

[Method] get-use-color
Gets the value of ‘GTK_PRINT_SETTINGS_USE_COLOR’.
settings a <gtk-print-settings>

ret whether to use color Since 2.10

[Function] gtk-print-settings-set-use-color (self <gtk-print-settings>)

(use color bool)

[Method] set-use-color
Sets the value of ‘GTK_PRINT_SETTINGS_USE_COLOR’.
settings a <gtk-print-settings>

use-color whether to use color Since 2.10

[Function] gtk-print-settings-get-collate (self <gtk-print-settings>)

⇒ (ret bool)

[Method] get-collate
Gets the value of ‘GTK_PRINT_SETTINGS_COLLATE’.
settings a <gtk-print-settings>

ret whether to collate the printed pages Since 2.10

[Function] gtk-print-settings-set-collate (self <gtk-print-settings>)

(collate bool)

[Method] set-collate
Sets the value of ‘GTK_PRINT_SETTINGS_COLLATE’.
settings a <gtk-print-settings>

collate whether to collate the output

Since 2.10

[Function] gtk-print-settings-get-reverse (self <gtk-print-settings>)

⇒ (ret bool)

[Method] get-reverse
Gets the value of ‘GTK_PRINT_SETTINGS_REVERSE’.
settings a <gtk-print-settings>

ret whether to reverse the order of the printed pages

Since 2.10

[Function] gtk-print-settings-set-reverse (self <gtk-print-settings>)

(reverse bool)

[Method] set-reverse
Sets the value of ‘GTK_PRINT_SETTINGS_REVERSE’.
settings a <gtk-print-settings>

reverse whether to reverse the output

Since 2.10

[Function] gtk-print-settings-get-duplex (self <gtk-print-settings>)
   ⇒ (ret <gtk-print-duplex>)
[Method] get-duplex
Gets the value of ‘GTK_PRINT_SETTINGS_DUPLEX’.
settings a <gtk-print-settings>

ret whether to print the output in duplex.

Since 2.10

[Function] gtk-print-settings-set-duplex (self <gtk-print-settings>)
   (duplex <gtk-print-duplex>)
[Method] set-duplex
Sets the value of ‘GTK_PRINT_SETTINGS_DUPLEX’.
settings a <gtk-print-settings>
duplex  a <gtk-print-duplex> value

[Function] gtk-print-settings-get-quality (self <gtk-print-settings>)
   ⇒ (ret <gtk-print-quality>)
[Method] get-quality
Gets the value of ‘GTK_PRINT_SETTINGS_QUALITY’.
settings a <gtk-print-settings>

ret the print quality

Since 2.10

[Function] gtk-print-settings-set-quality (self <gtk-print-settings>)
   (quality <gtk-print-quality>)
[Method] set-quality
Sets the value of ‘GTK_PRINT_SETTINGS_QUALITY’.
settings a <gtk-print-settings>
quality  a <gtk-print-quality> value

Since 2.10

[Function] gtk-print-settings-get-n-copies (self <gtk-print-settings>)

⇒ (ret int)

[Method] get-n-copies
Gets the value of ‘GTK_PRINT_SETTINGS_N_COPIES’.
settings a <gtk-print-settings>

ret the number of copies to print

Since 2.10

[Function] gtk-print-settings-set-n-copies (self <gtk-print-settings>)

(num copies int)

[Method] set-n-copies
Sets the value of ‘GTK_PRINT_SETTINGS_N_COPIES’.
settings a <gtk-print-settings>

num-copies the number of copies

Since 2.10

[Function] gtk-print-settings-get-number-up (self <gtk-print-settings>)

⇒ (ret int)

[Method] get-number-up
Gets the value of ‘GTK_PRINT_SETTINGS_NUMBER_UP’.
settings a <gtk-print-settings>

ret the number of pages per sheet

[Function] gtk-print-settings-set-number-up (self <gtk-print-settings>)

(number up int)

[Method] set-number-up
Sets the value of ‘GTK_PRINT_SETTINGS_NUMBER_UP’.
settings a <gtk-print-settings>

number-up the number of pages per sheet

Since 2.10

[Function] gtk-print-settings-get-resolution (self <gtk-print-settings>)

⇒ (ret int)

[Method] get-resolution
Gets the value of ‘GTK_PRINT_SETTINGS_RESOLUTION’.
settings a <gtk-print-settings>

ret the resolution in dpi

Since 2.10

[Function] gtk-print-settings-set-resolution (self <gtk-print-settings>)

(resolution int)

[Method] set-resolution
Sets the value of ‘GTK_PRINT_SETTINGS_RESOLUTION’.
settings a <gtk-print-settings>

resolution the resolution in dpi

Since 2.10

[Function] gtk-print-settings-get-scale (self <gtk-print-settings>)
   ⇒ (ret double)
[Method] get-scale
Gets the value of ‘GTK_PRINT_SETTINGS_SCALE’.
settings a <gtk-print-settings>

ret the scale in percent

Since 2.10

[Function] gtk-print-settings-set-scale (self <gtk-print-settings>)

(scale double)

[Method] set-scale
Sets the value of ‘GTK_PRINT_SETTINGS_SCALE’.
settings a <gtk-print-settings>

scale the scale in percent

[Function] gtk-print-settings-get-page-set (self <gtk-print-settings>)
   ⇒ (ret <gtk-page-set>)
[Method] get-page-set
Gets the value of ‘GTK_PRINT_SETTINGS_PAGE_SET’.
settings a <gtk-print-settings>

ret the set of pages to print

Since 2.10

[Function] gtk-print-settings-set-page-set (self <gtk-print-settings>)
   (page set <gtk-page-set>)
[Method] set-page-set
Sets the value of ‘GTK_PRINT_SETTINGS_PAGE_SET’.
settings a <gtk-print-settings>
page-set a <gtk-page-set> value

Since 2.10

[Function] gtk-print-settings-get-media-type (self <gtk-print-settings>)
   ⇒ (ret mchars)
[Method] get-media-type
Gets the value of ‘GTK_PRINT_SETTINGS_MEDIA_TYPE’.

The set of media types is defined in PWG 5101.1-2002 PWG.

settings a <gtk-print-settings>

ret the media type

Since 2.10

[Function] gtk-print-settings-set-media-type (self <gtk-print-settings>)

(media type mchars)

[Method] set-media-type
Sets the value of ‘GTK_PRINT_SETTINGS_MEDIA_TYPE’.

The set of media types is defined in PWG 5101.1-2002 PWG.

settings a <gtk-print-settings>

media-type the media type

Since 2.10

[Function] gtk-print-settings-get-dither (self <gtk-print-settings>)
   ⇒ (ret mchars)
[Method] get-dither
Gets the value of ‘GTK_PRINT_SETTINGS_DITHER’.
settings a <gtk-print-settings>

ret the dithering that is used

Since 2.10

[Function] gtk-print-settings-set-dither (self <gtk-print-settings>)

(dither mchars)

[Method] set-dither
Sets the value of ‘GTK_PRINT_SETTINGS_DITHER’.
settings a <gtk-print-settings>

dither the dithering that is used

Since 2.10

[Function] gtk-print-settings-get-finishings (self <gtk-print-settings>)
   ⇒ (ret mchars)
[Method] get-finishings
Gets the value of ‘GTK_PRINT_SETTINGS_FINISHINGS’.
settings a <gtk-print-settings>

ret the finishings

Since 2.10

[Function] gtk-print-settings-set-finishings (self <gtk-print-settings>)

(finishings mchars)

[Method] set-finishings
Sets the value of ‘GTK_PRINT_SETTINGS_FINISHINGS’.
settings a <gtk-print-settings>

finishings the finishings

Since 2.10

[Function] gtk-print-settings-get-output-bin (self <gtk-print-settings>)
   ⇒ (ret mchars)
[Method] get-output-bin
Gets the value of ‘GTK_PRINT_SETTINGS_OUTPUT_BIN’.
settings a <gtk-print-settings>

ret the output bin

Since 2.10

[Function] gtk-print-settings-set-output-bin (self <gtk-print-settings>)

(output bin mchars)

[Method] set-output-bin
Sets the value of ‘GTK_PRINT_SETTINGS_OUTPUT_BIN’.
settings a <gtk-print-settings>

output-bin the output bin

Since 2.10

112 GtkPageSetup

Stores page setup information

112.1 Overview

A GtkPageSetup 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-print-operation> when printing. The benefit of splitting this out of the <gtk-print-settings> 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-page-setup> use gtk-page-setup-new to get the defaults, or use gtk-

print-run-page-setup-dialog to show the page setup dialog and receive the resulting page setup.

     static GtkPrintSettings *settings = NULL;
     static GtkPageSetup *page_setup = NULL;
     static void
     do_page_setup (void)
     {
       GtkPageSetup *new_page_setup;
       if (settings == NULL)
         settings = gtk_print_settings_new ();
       new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
                                                         page_setup, settings);
       if (page_setup)
         g_object_unref (page_setup);
       page_setup = new_page_setup;
     }

Printing support was added in GTK+ 2.10.

112.2 Usage

[Class] <gtk-page-setup>

Derives from <gobject>.

This class defines no direct slots.

[Function] gtk-page-setup-new ⇒ (ret <gtk-page-setup>)
     Creates a new <gtk-page-setup>.

ret  a new <gtk-page-setup>.

Since 2.10

[Function] gtk-page-setup-get-orientation (self <gtk-page-setup>)
   ⇒ (ret <gtk-page-orientation>)
[Method] get-orientation

Gets the page orientation of the <gtk-page-setup>.

setup  a <gtk-page-setup>

ret the page orientation

Since 2.10

[Function] gtk-page-setup-set-orientation (self <gtk-page-setup>)
   (orientation <gtk-page-orientation>)
[Method] set-orientation

Sets the page orientation of the <gtk-page-setup>.

setup  a <gtk-page-setup>

orientation

          a <gtk-page-orientation> value

Since 2.10

[Function] gtk-page-setup-get-paper-size (self <gtk-page-setup>)
   ⇒ (ret <gtk-paper-size>)
[Method] get-paper-size

Gets the paper size of the <gtk-page-setup>.

setup  a <gtk-page-setup>

ret the paper size

Since 2.10

[Function] gtk-page-setup-set-paper-size (self <gtk-page-setup>)
   (size <gtk-paper-size>)
[Method] set-paper-size

Sets the paper size of the <gtk-page-setup> without changing the margins. See

gtk-page-setup-set-paper-size-and-default-margins.
setup  a <gtk-page-setup>
size  a <gtk-paper-size>

Since 2.10

[Function] gtk-page-setup-get-top-margin (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-top-margin

Gets the top margin in units of unit.

setup  a <gtk-page-setup>

unit the unit for the return value

ret the top margin

Since 2.10

[Function] gtk-page-setup-set-top-margin (self <gtk-page-setup>)
   (margin double) (unit <gtk-unit>)
[Method] set-top-margin

Sets the top margin of the <gtk-page-setup>.

setup  a <gtk-page-setup>

margin the new top margin in units of unit

unit the units for margin

Since 2.10

[Function] gtk-page-setup-get-bottom-margin (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-bottom-margin

Gets the bottom margin in units of unit.

setup  a <gtk-page-setup>

unit the unit for the return value

ret the bottom margin

Since 2.10

[Function] gtk-page-setup-set-bottom-margin (self <gtk-page-setup>)
   (margin double) (unit <gtk-unit>)
[Method] set-bottom-margin

Sets the bottom margin of the <gtk-page-setup>.

setup  a <gtk-page-setup>

margin the new bottom margin in units of unit

unit the units for margin

Since 2.10

[Function] gtk-page-setup-get-left-margin (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-left-margin

Gets the left margin in units of unit.

setup  a <gtk-page-setup>

unit the unit for the return value

ret the left margin

[Function] gtk-page-setup-set-left-margin (self <gtk-page-setup>)
   (margin double) (unit <gtk-unit>)
[Method] set-left-margin

Sets the left margin of the <gtk-page-setup>.

setup  a <gtk-page-setup>

margin the new left margin in units of unit

unit the units for margin

Since 2.10

[Function] gtk-page-setup-get-right-margin (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-right-margin

Gets the right margin in units of unit.

setup  a <gtk-page-setup>

unit the unit for the return value

ret the right margin

Since 2.10

[Function] gtk-page-setup-set-right-margin (self <gtk-page-setup>)
   (margin double) (unit <gtk-unit>)
[Method] set-right-margin

Sets the right margin of the <gtk-page-setup>.

setup  a <gtk-page-setup>

margin the new right margin in units of unit

unit the units for margin

Since 2.10

[Function] gtk-page-setup-get-paper-width (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-paper-width

Returns the paper width in units of unit.

Note that this function takes orientation, but not margins into consideration. See

gtk-page-setup-get-page-width.
setup  a <gtk-page-setup>

unit the unit for the return value

ret the paper width.

[Function] gtk-page-setup-get-paper-height (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-paper-height

Returns the paper height in units of unit. Note that this function takes orientation, but not margins into consideration. See

gtk-page-setup-get-page-height.
setup  a <gtk-page-setup>

unit the unit for the return value

ret the paper height.

Since 2.10

[Function] gtk-page-setup-get-page-width (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-page-width

Returns the page width in units of unit. Note that this function takes orientation and margins into consideration. See gtk-

page-setup-get-paper-width.
setup  a <gtk-page-setup>

unit the unit for the return value

ret the page width.

Since 2.10

[Function] gtk-page-setup-get-page-height (self <gtk-page-setup>)
   (unit <gtk-unit>) ⇒ (ret double)
[Method] get-page-height

Returns the page height in units of unit. Note that this function takes orientation and margins into consideration. See gtk-

page-setup-get-paper-height.
setup  a <gtk-page-setup>

unit the unit for the return value

ret the page height.

Since 2.10

113 GtkPaperSize

Support for named paper sizes

113.1 Overview

GtkPaperSize 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). In addition to standard paper sizes, GtkPaperSize allows to construct custom paper sizes with arbitrary dimensions.

The <gtk-paper-size> object stores not only the dimensions (width and height) of a paper size and its name, it also provides default print margins.

Printing support has been added in GTK+ 2.10.

113.2 Usage

[Class] <gtk-paper-size>

Derives from <gboxed>. This class defines no direct slots.

[Function] gtk-paper-size-new (name mchars) ⇒ (ret <gtk-paper-size>)

Creates a new <gtk-paper-size> object by parsing a PWG 5101.1-2002 PWG paper name. If name is ‘#f’, the default paper size is returned, see gtk-paper-size-get-default.

name a paper size name, or ‘#f’

ret  a new <gtk-paper-size>, use gtk-paper-size-free to free it

Since 2.10

[Function] gtk-paper-size-new-from-ppd (ppd name mchars)

(ppd display name mchars) (width double) (height double)

   ⇒ (ret <gtk-paper-size>)

Creates a new <gtk-paper-size> 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-paper-size> object.

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

ret  a new <gtk-paper-size>, use gtk-paper-size-free to free it

[Function] gtk-paper-size-new-custom (name mchars) (display name mchars)
   (width double) (height double) (unit <gtk-unit>)
   ⇒ (ret <gtk-paper-size>)

Creates a new <gtk-paper-size> object with the given parameters. name the paper name display-name

the human-readable name

width the paper width, in units of unit height the paper height, in units of unit unit the unit for width and height

ret  a new <gtk-paper-size> object, use gtk-paper-size-free to free it

Since 2.10

[Function] gtk-paper-size-is-equal (self <gtk-paper-size>)
   (size2 <gtk-paper-size>) ⇒ (ret bool)

Compares two <gtk-paper-size> objects.

size1  a <gtk-paper-size> object

size2 another <gtk-paper-size> object ret ‘#t’, if size1 and size2 represent the same paper size Since 2.10

[Function] gtk-paper-size-get-name (self <gtk-paper-size>) ⇒ (ret mchars)

Gets the name of the <gtk-paper-size>.

size  a <gtk-paper-size> object

ret the name of size Since 2.10

[Function] gtk-paper-size-get-display-name (self <gtk-paper-size>)
   ⇒ (ret mchars)

Gets the human-readable name of the <gtk-paper-size>.

size  a <gtk-paper-size> object

ret the human-readable name of size Since 2.10

[Function] gtk-paper-size-get-ppd-name (self <gtk-paper-size>)
   ⇒ (ret mchars)

Gets the PPD name of the <gtk-paper-size>, which may be ‘#f’.

size  a <gtk-paper-size> object

ret the PPD name of size Since 2.10

[Function] gtk-paper-size-get-width (self <gtk-paper-size>)
   (unit <gtk-unit>) ⇒ (ret double)

Gets the paper width of the <gtk-paper-size>, in units of unit.

size  a <gtk-paper-size> object

unit the unit for the return value ret the paper width Since 2.10

[Function] gtk-paper-size-get-height (self <gtk-paper-size>)
   (unit <gtk-unit>) ⇒ (ret double)

Gets the paper height of the <gtk-paper-size>, in units of unit.

size  a <gtk-paper-size> object

unit the unit for the return value ret the paper height Since 2.10

[Function] gtk-paper-size-is-custom (self <gtk-paper-size>) ⇒ (ret bool)

Returns ‘#t’ if size is not a standard paper size.

size  a <gtk-paper-size> object

ret whether size is a custom paper size.

[Function] gtk-paper-size-set-size (self <gtk-paper-size>) (width double)
   (height double) (unit <gtk-unit>)

Changes the dimensions of a size to width x height. size a custom <gtk-paper-size> object width the new width in units of unit height the new height in units of unit unit the unit for width and height Since 2.10

[Function] gtk-paper-size-get-default ⇒ (ret mchars)

Returns the name of the default paper size, which depends on the current locale. ret the name of the default paper size. The string is owned by GTK+ and

should not be modified.

Since 2.10

114 GtkAdjustment

A GtkObject representing an adjustable bounded value

114.1 Overview

The <gtk-adjustment> object represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within sev-

eral GTK+ widgets, including <gtk-spin-button>, <gtk-viewport>, and <gtk-range>
(which is a base class for <gtk-hscrollbar>, <gtk-vscrollbar>, <gtk-hscale>, and
<gtk-vscale>).

The <gtk-adjustment> object does not update the value itself. Instead it is left up to the owner of the <gtk-adjustment> to control the value.

The owner of the <gtk-adjustment> typically calls the gtk-adjustment-value-

changed and gtk-adjustment-changed functions after changing the value and its bounds. This results in the emission of the "value changed" or "changed" signal respectively.

114.2 Usage

[Class] <gtk-adjustment>
Derives from <gtk-object>.

This class defines the following slots:

value The value of the adjustment

lower The minimum value of the adjustment

upper The maximum value of the adjustment

step-increment

The step increment of the adjustment

page-increment

The page increment of the adjustment

page-size

The page size of the adjustment

[Signal on <gtk-adjustment>] changed

Emitted when one or more of the <gtk-adjustment> fields have been changed, other than the value field.

[Signal on <gtk-adjustment>] value-changed

Emitted when the <gtk-adjustment> value field has been changed.

[Function] gtk-adjustment-new (value double) (lower double) (upper double)

(step increment double) (page increment double) (page size double)

   ⇒ (ret <gtk-object>)
Creates a new <gtk-adjustment>.

value the initial value. lower the minimum value.

upper the maximum value.

step-increment the step increment.

page-increment the page increment.

page-size the page size.

ret  a new <gtk-adjustment>.
[Function] gtk-adjustment-get-value (self <gtk-adjustment>)
   ⇒ (ret double)
[Method] get-value

Gets the current value of the adjustment. See gtk-adjustment-set-value.

adjustment

          a <gtk-adjustment>

ret The current value of the adjustment.

[Function] gtk-adjustment-set-value (self <gtk-adjustment>) (value double)
[Method] set-value

Sets the <gtk-adjustment> value. The value is clamped to lie between

‘adjustment->lower’ and ‘adjustment->upper’.

Note that for adjustments which are used in a <gtk-scrollbar>, the effective

range of allowed values goes from ‘adjustment->lower’ to ‘adjustment->upper -
adjustment->page_size’.

adjustment

          a <gtk-adjustment>.

value the new value.

[Function] gtk-adjustment-clamp-page (self <gtk-adjustment>)

(lower double) (upper double)

[Method] clamp-page

Updates the <gtk-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.

adjustment

          a <gtk-adjustment>.

lower the lower value.

upper the upper value.

[Function] gtk-adjustment-changed (self <gtk-adjustment>)

[Method] changed

Emits a "changed" signal from the <gtk-adjustment>. This is typically called by the owner of the <gtk-adjustment> after it has changed any of the <gtk-adjustment> fields other than the value.

adjustment

          a <gtk-adjustment>
[Function] gtk-adjustment-value-changed (self <gtk-adjustment>)
[Method] value-changed

Emits a "value changed" signal from the <gtk-adjustment>. This is typically called by the owner of the <gtk-adjustment> after it has changed the <gtk-adjustment> value field.

adjustment

          a <gtk-adjustment>

115 GtkArrow

Displays an arrow

115.1 Overview

GtkArrow should be used to draw simple arrows that need to point in one of the four cardinal directions (up, down, left, or right). The style of the arrow can be one of shadow in, shadow out, etched in, or etched out. Note that these directions and style types may be ammended in versions of Gtk to come.

GtkArrow will fill any space alloted to it, but since it is inherited from <gtk-misc>, it can be padded and/or aligned, to fill exactly the space the programmer desires.

Arrows are created with a call to gtk-arrow-new. The direction or style of an arrow can be changed after creation by using gtk-arrow-set.

115.2 Usage

[Class] <gtk-arrow>

Derives from <gtk-misc>. This class defines the following slots:

arrow-type

The direction the arrow should point

shadow-type

Appearance of the shadow surrounding the arrow

[Function] gtk-arrow-new (arrow type <gtk-arrow-type>)
   (shadow type <gtk-shadow-type>) ⇒ (ret <gtk-widget>)

Creates a new arrow widget.

arrow-type

          a valid <gtk-arrow-type>.

shadow-type

          a valid <gtk-shadow-type>.

ret the new <gtk-arrow> widget.

[Function] gtk-arrow-set (self <gtk-arrow>) (arrow type <gtk-arrow-type>)
   (shadow type <gtk-shadow-type>)

[Method] set

Sets the direction and style of the <gtk-arrow>, arrow.

arrow a widget of type <gtk-arrow>.

arrow-type

          a valid <gtk-arrow-type>.

shadow-type

          a valid <gtk-shadow-type>.

116 GtkCalendar

Displays a calendar and allows the user to select a date

116.1 Overview

<gtk-calendar> is a widget that displays a calendar, one month at a time. It can be

created with gtk-calendar-new.

The month and year currently displayed can be altered with gtk-calendar-select-month. The exact day can be selected from the displayed month using gtk-calendar-

select-day.

To place a visual marker on a particular day, use gtk-calendar-mark-day and to remove the marker, gtk-calendar-unmark-day. Alternative, all marks can be cleared with gtk-

calendar-clear-marks.

The way in which the calendar itself is displayed can be altered using gtk-calendar-

set-display-options.

The selected date can be retrieved from a <gtk-calendar> using gtk-calendar-get-

date.

116.2 Usage

[Class] <gtk-calendar>
Derives from <gtk-widget>.

This class defines the following slots:

year The selected year

month The selected month (as a number between 0 and 11)

day The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day)

show-heading

If TRUE, a heading is displayed

show-day-names

If TRUE, day names are displayed

no-month-change

If TRUE, the selected month cannot be changed

show-week-numbers

If TRUE, week numbers are displayed

[Signal on <gtk-calendar>] month-changed

Emitted when the user clicks a button to change the selected month on a calendar.

[Signal on <gtk-calendar>] day-selected

Emitted when the user selects a day.

[Signal on <gtk-calendar>] day-selected-double-click
[Signal on <gtk-calendar>] prev-month
[Signal on <gtk-calendar>] next-month
[Signal on <gtk-calendar>] prev-year
[Signal on <gtk-calendar>] next-year
[Function] gtk-calendar-new ⇒ (ret <gtk-widget>)

Creates a new calendar, with the current date being selected.

ret a newly <gtk-calendar> widget

[Function] gtk-calendar-select-month (self <gtk-calendar>)
        (month unsigned-int) (year unsigned-int) ⇒ (ret bool)
[Method] select-month

Shifts the calendar to a different month.

     calendar a <gtk-calendar>

month a month number between 0 and 11.

year the year the month is in.

ret ‘#t’, always

[Function] gtk-calendar-select-day (self <gtk-calendar>)
        (day unsigned-int)
[Method] select-day

Selects a day from the current month.

     calendar a <gtk-calendar>.

day the day number between 1 and 31, or 0 to unselect the currently selected

day.

[Function] gtk-calendar-mark-day (self <gtk-calendar>) (day unsigned-int)

⇒ (ret bool)

[Method] mark-day

Places a visual marker on a particular day.

     calendar a <gtk-calendar>

day the day number to mark between 1 and 31.

ret ‘#t’, always

[Function] gtk-calendar-unmark-day (self <gtk-calendar>)
        (day unsigned-int) ⇒ (ret bool)
[Method] unmark-day

Removes the visual marker from a particular day.

     calendar a <gtk-calendar>.

day the day number to unmark between 1 and 31.

ret ‘#t’, always

[Function] gtk-calendar-clear-marks (self <gtk-calendar>)
[Method] clear-marks

Remove all visual markers.

calendar a <gtk-calendar>
[Function] gtk-calendar-set-display-options (self <gtk-calendar>)
   (flags <gtk-calendar-display-options>)
[Method] set-display-options

Sets display options (whether to display the heading and the month headings).

calendar a <gtk-calendar>

flags the display options to set

Since 2.4

[Function] gtk-calendar-get-date (self <gtk-calendar>)
   ⇒ (year unsigned-int) (month unsigned-int) (day unsigned-int)
[Method] get-date

Obtains the selected date from a <gtk-calendar>.

calendar a <gtk-calendar>

year location to store the year number, or ‘#f’

month location to store the month number (between 0 and 11), or ‘#f’

day location to store the day number (between 1 and 31), or ‘#f’

[Function] gtk-calendar-freeze (self <gtk-calendar>)

[Method] freeze

‘gtk_calendar_freeze’ has been deprecated since version 2.8 and should not be used in newly-written code. Does nothing. Previously locked the display of the calendar until it was thawed with

gtk-calendar-thaw.
calendar a <gtk-calendar>
[Function] gtk-calendar-thaw (self <gtk-calendar>)

[Method] thaw

‘gtk_calendar_thaw’ has been deprecated since version 2.8 and should not be used in newly-written code. Does nothing. Previously defrosted a calendar; all the changes made since the last

gtk-calendar-freeze were displayed.
calendar a <gtk-calendar>

117 GtkDrawingArea

A widget for custom user interface elements

117.1 Overview

The <gtk-drawing-area> widget is used for creating custom user interface elements. It’s essentially a blank widget; you can draw on ‘widget->window’. 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 gtk-widget-add-events to enable events you wish to receive.)

The "realize" signal to take any necessary actions when the widget is instantiated on a particular display. (Create GDK resources in response to this signal.)

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.

The following code portion demonstrates using a drawing area to display a circle in the normal widget foreground color. Note that GDK automatically clears the exposed area to the background color before sending the expose event, and that drawing is implicitly clipped to the exposed area.

     gboolean
     expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
     {
       gdk_draw_arc (widget->window,
                     widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
                     TRUE,
                     0, 0, widget->allocation.width, widget->allocation.height,
                     0, 64 * 360);
       return TRUE;
     }
     [...]
       GtkWidget *drawing_area = gtk_drawing_area_new ();
       gtk_widget_set_size_request (drawing_area, 100, 100);
       g_signal_connect (G_OBJECT (drawing_area), "expose_event",
                         G_CALLBACK (expose_event_callback), NULL);

Expose events are normally delivered when a drawing area first comes onscreen, 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; gtk-widget-queue-draw-area and gdk-window-invalidate-rect are equally good ways to do this. You’ll then get an expose event for the invalid region.

The available routines for drawing are documented on the GDK Drawing Primitives

page. See also gdk-pixbuf-render-to-drawable for drawing a <gdk-pixbuf>.

To receive mouse events on a drawing area, you will need to enable them with gtkwidget-add-events. To receive keyboard events, you will need to set the <gtk-can-focus> flag on the drawing area, and should probably draw some user-visible indication that the drawing area is focused. Use the gtk-has-focus macro in your expose event handler to decide whether to draw the focus indicator. See gtk-paint-focus for one way to draw focus.

117.2 Usage

[Class] <gtk-drawing-area>
     Derives from <gtk-widget>.

This class defines no direct slots.

[Function] gtk-drawing-area-new ⇒ (ret <gtk-widget>)

Creates a new drawing area.

     ret  a new <gtk-drawing-area>

118 GtkEventBox

A widget used to catch events for widgets which do not have their own window

118.1 Overview

The <gtk-event-box> widget is a subclass of <gtk-bin> which also has its own window. It is useful since it allows you to catch events for widgets which do not have their own window.

118.2 Usage

[Class] <gtk-event-box>

Derives from <gtk-bin>. This class defines the following slots:

visible-window

Whether the event box is visible, as opposed to invisible and only used to trap events.

above-child

Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.

[Function] gtk-event-box-new ⇒ (ret <gtk-widget>)
Creates a new <gtk-event-box>.
ret  a new <gtk-event-box>.
[Function] gtk-event-box-set-above-child (self <gtk-event-box>)

(above child bool)

[Method] set-above-child

Set whether the event box window is positioned above the windows of its child, as opposed to 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.

event-box a <gtk-event-box>

above-child ‘#t’ if the event box window is above the windows of its child

Since 2.4

[Function] gtk-event-box-get-above-child (self <gtk-event-box>)

⇒ (ret bool)

[Method] get-above-child

Returns whether the event box window is above or below the windows of its child.

See gtk-event-box-set-above-child for details.
event-box a <gtk-event-box>

ret ‘#t’ if the event box window is above the window of its child.

Since 2.4

[Function] gtk-event-box-set-visible-window (self <gtk-event-box>)

(visible window bool)

[Method] set-visible-window

Set whether the event box uses a visible or 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 ‘GDK_INPUT_ONLY’ window, which means that it is invisible and only serves to receive events. A visible window event box creates a visible (‘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 gtk-event-box-set-above-child.) Since the input-only window is not an ancestor window of any windows that descendent 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 gtk-widget-add-events), it won’t be received by the event box. This problem doesn’t occur for visible event boxes, because in that case, the event box window is actually the ancestor of the descendant windows, not just at the same place on the screen.

event-box a <gtk-event-box>

visible-window boolean value

Since 2.4

[Function] gtk-event-box-get-visible-window (self <gtk-event-box>)

⇒ (ret bool)

[Method] get-visible-window

Returns whether the event box has a visible window. See gtk-event-box-set-

visible-window for details.
event-box a <gtk-event-box>

ret ‘#t’ if the event box window is visible

Since 2.4

119 GtkHandleBox

a widget for detachable window portions

119.1 Overview

The <gtk-handle-box> widget allows a portion of a window to be "torn off". It is a bin widget which displays its child and a handle that the user can drag to tear off a separate window (the float window) containing the child widget. A thin ghost is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached.

When reattaching, the ghost and float window, must be aligned along one of the edges, the snap edge. This either can be specified by the application programmer explicitely, or GTK+ will pick a reasonable default based on the handle position.

To make detaching and reattaching the handlebox as minimally confusing as possible to the user, it is important to set the snap edge so that the snap edge does not move when the handlebox is deattached. For instance, if the handlebox is packed at the bottom of a VBox, then when the handlebox is detached, the bottom edge of the handlebox’s allocation will remain fixed as the height of the handlebox shrinks, so the snap edge should be set to

‘GTK_POS_BOTTOM’.

119.2 Usage

[Class] <gtk-handle-box>

Derives from <gtk-bin>.

This class defines the following slots:

shadow Deprecated property, use shadow type instead

     shadow-type

Appearance of the shadow that surrounds the container

     handle-position

Position of the handle relative to the child widget

     snap-edge

Side of the handlebox that’s lined up with the docking point to dock the handlebox

     snap-edge-set

Whether to use the value from the snap edge property or a value derived from handle position

[Signal on <gtk-handle-box>] child-attached (arg0 <gtk-widget>)

This signal is emitted when the contents of the handlebox are reattached to the main window.

[Signal on <gtk-handle-box>] child-detached (arg0 <gtk-widget>)

This signal is emitted when the contents of the handlebox are detached from the main window.

[Function] gtk-handle-box-new ⇒ (ret <gtk-widget>)

Create a new handle box.

ret  a new <gtk-handle-box>.
[Function] gtk-handle-box-set-shadow-type (self <gtk-handle-box>)
   (type <gtk-shadow-type>)
[Method] set-shadow-type

Sets the type of shadow to be drawn around the border of the handle box.

handle-box

          a <gtk-handle-box>

type the shadow type.

[Function] gtk-handle-box-set-handle-position (self <gtk-handle-box>)
   (position <gtk-position-type>)
[Method] set-handle-position

Sets the side of the handlebox where the handle is drawn.

handle-box

          a <gtk-handle-box>

position the side of the handlebox where the handle should be drawn.

[Function] gtk-handle-box-set-snap-edge (self <gtk-handle-box>)
   (edge <gtk-position-type>)
[Method] set-snap-edge

Sets the snap edge of a handlebox. The snap edge is the edge of the detached child that must be aligned with the corresponding edge of the "ghost" left behind when the child was detached to reattach the torn-off window. Usually, the snap edge should be chosen so that it stays in the same place on the screen when the handlebox is torn off. If the snap edge is not set, then an appropriate value will be guessed from the handle position. If the handle position is ‘GTK_POS_RIGHT’ or ‘GTK_POS_LEFT’, then the snap edge will be ‘GTK_POS_TOP’, otherwise it will be ‘GTK_POS_LEFT’.

handle-box

          a <gtk-handle-box>

edge the snap edge, or -1 to unset the value; in which case GTK+ will try to guess an appropriate value in the future.

[Function] gtk-handle-box-get-handle-position (self <gtk-handle-box>)
   ⇒ (ret <gtk-position-type>)
[Method] get-handle-position

Gets the handle position of the handle box. See gtk-handle-box-set-handle-

position.

handle-box

          a <gtk-handle-box>

ret the current handle position.

[Function] gtk-handle-box-get-shadow-type (self <gtk-handle-box>)
   ⇒ (ret <gtk-shadow-type>)
[Method] get-shadow-type

Gets the type of shadow drawn around the handle box. See gtk-handle-box-set-

shadow-type.

handle-box

          a <gtk-handle-box>

ret the type of shadow currently drawn around the handle box.

[Function] gtk-handle-box-get-snap-edge (self <gtk-handle-box>)
   ⇒ (ret <gtk-position-type>)
[Method] get-snap-edge

Gets the edge used for determining reattachment of the handle box. See gtk-handle-

box-set-snap-edge.

handle-box

          a <gtk-handle-box>

ret the edge used for determining reattachment, or (GtkPositionType)-1 if this is determined (as per default) from the handle position.

120 GtkIMContextSimple

An input method context supporting table-based input methods

120.1 Overview

120.2 Usage

[Class] <gtk-im-context-simple>
Derives from <gtk-im-context>.

This class defines no direct slots.

[Function] gtk-im-context-simple-new ⇒ (ret <gtk-im-context>)
Creates a new <gtk-im-context-simple>.
ret  a new <gtk-im-context-simple>.
[Function] gtk-im-context-simple-add-table
   (self <gtk-im-context-simple>) (max seq len int) (n seqs int)
   ⇒ (data unsigned-int16)
[Method] add-table

Adds an additional table to search to the input context. Each row of the table consists of max-seq-len key symbols followed by two <guint16> interpreted as the high and low words of a <gunicode> value. Tables are searched starting from the last added. The table must be sorted in dictionary order on the numeric value of the key symbol fields. (Values beyond the length of the sequence should be zero.)

context-simple

          A <gtk-im-context-simple>

data the table

max-seq-len Maximum length of a sequence in the table (cannot be greater than <gtk-

          max-compose-len>)

n-seqs number of sequences in the table

121 GtkIMMulticontext

An input method context supporting multiple, loadable input methods

121.1 Overview

121.2 Usage

[Class] <gtk-im-multicontext>
Derives from <gtk-im-context>.

This class defines no direct slots.

[Function] gtk-im-multicontext-new ⇒ (ret <gtk-im-context>)
Creates a new <gtk-im-multicontext>.
ret  a new <gtk-im-multicontext>.

122 GtkSizeGroup

Grouping widgets so they request the same size

122.1 Overview

<gtk-size-group> 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.

In detail, the size requested for each widget in a <gtk-size-group> 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 gtk-size-group-set-mode) 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-size-group> 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-size-group> objects are referenced by each widget in the size group, so once you have added all widgets to a <gtk-size-group>, you can drop the initial reference to the size group with g-object-unref. 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; GTK+ 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’.

122.2 Usage

[Class] <gtk-size-group>
     Derives from <gtk-buildable>, <gobject>.

This class defines the following slots:

mode The directions in which the size group affects the requested sizes of its component widgets

     ignore-hidden

If TRUE, unmapped widgets are ignored when determining the size of the group

[Function] gtk-size-group-new (mode <gtk-size-group-mode>)
        ⇒ (ret <gtk-size-group>)
     Create a new <gtk-size-group>.

mode the mode for the new size group.

     ret  a newly created <gtk-size-group>

[Function] gtk-size-group-set-mode (self <gtk-size-group>)
   (mode <gtk-size-group-mode>)
[Method] set-mode

Sets the <gtk-size-group-mode> of the size group. The mode of the size group determines whether the widgets in the size group should all have the same horizontal requisition (‘GTK_SIZE_GROUP_MODE_HORIZONTAL’) all have the same vertical requisition (‘GTK_SIZE_GROUP_MODE_VERTICAL’), or should all have the same requisition in

both directions (‘GTK_SIZE_GROUP_MODE_BOTH’).
size-group a <gtk-size-group>

mode the mode to set for the size group.

[Function] gtk-size-group-get-mode (self <gtk-size-group>)
   ⇒ (ret <gtk-size-group-mode>)
[Method] get-mode

Gets the current mode of the size group. See gtk-size-group-set-mode.

size-group a <gtk-size-group>

ret the current mode of the size group.

[Function] gtk-size-group-set-ignore-hidden (self <gtk-size-group>)

(ignore hidden bool)

[Method] set-ignore-hidden

Sets whether unmapped widgets should be ignored when calculating the size.

size-group a <gtk-size-group>

ignore-hidden whether unmapped widgets should be ignored when calculating the size

Since 2.8

[Function] gtk-size-group-get-ignore-hidden (self <gtk-size-group>)

⇒ (ret bool)

[Method] get-ignore-hidden

Returns if invisible widgets are ignored when calculating the size.

size-group a <gtk-size-group>

ret ‘#t’ if invisible widgets are ignored.

Since 2.8

[Function] gtk-size-group-add-widget (self <gtk-size-group>)
   (widget <gtk-widget>)
[Method] add-widget

Adds a widget to a <gtk-size-group>. In the future, the requisition of the widget will 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 gtk-size-group-set-mode.

size-group a <gtk-size-group>

widget the <gtk-widget> to add

[Function] gtk-size-group-remove-widget (self <gtk-size-group>)
   (widget <gtk-widget>)
[Method] remove-widget

Removes a widget from a <gtk-size-group>.

size-group a <gtk-size-grup>

widget the <gtk-widget> to remove

123 GtkTooltips

Add tips to your widgets

123.1 Overview

Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time. They are especially helpful for adding more verbose descriptions of things such as buttons in a toolbar.

An individual tooltip belongs to a group of tooltips. A group is created with a call to gtk-tooltips-new. Every tooltip in the group can then be turned off with a call to

gtk-tooltips-disable and enabled with gtk-tooltips-enable.

The length of time the user must keep the mouse over a widget before the tip is shown, can be altered with gtk-tooltips-set-delay. This is set on a ’per group of tooltips’ basis.

To assign a tip to a particular <gtk-widget>, gtk-tooltips-set-tip is used. Tooltips can only be set on widgets which have their own X window and receive enter

and leave events. To check if a widget has its own window use gtk-widget-no-window. To add a tooltip to a widget that doesn’t have its own window, place the widget inside a <gtk-event-box> and add a tooltip to that instead.

The default appearance of all tooltips in a program is determined by the current GTK+ theme that the user has selected.

Information about the tooltip (if any) associated with an arbitrary widget can be re-

trieved using gtk-tooltips-data-get.
GtkWidget *load_button, *save_button, *hbox;
GtkTooltips *button_bar_tips;
button_bar_tips = gtk_tooltips_new ();
/* Create the buttons and pack them into a GtkHBox */
hbox = gtk_hbox_new (TRUE, 2);
load_button = gtk_button_new_with_label ("Load a file");
gtk_box_pack_start (GTK_BOX (hbox), load_button, TRUE, TRUE, 2);
gtk_widget_show (load_button);
save_button = gtk_button_new_with_label ("Save a file");
gtk_box_pack_start (GTK_BOX (hbox), save_button, TRUE, TRUE, 2);
gtk_widget_show (save_button);
gtk_widget_show (hbox);
/* Add the tips */
gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), load_button,
"Load a new document into this window",
"Requests the filename of a document.
This will then be loaded into the current

  window, replacing the contents of whatever
  is already loaded.");
   gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), save_button,
 "Saves the current document to a file",
 "If you have saved the document previously,
  then the new version will be saved over the
  old one. Otherwise, you will be prompted for
  a filename.");

123.2 Usage

[Class] <gtk-tooltips>
Derives from <gtk-object>.

This class defines no direct slots.

[Function] gtk-tooltips-new ⇒ (ret <gtk-tooltips>)

Creates an empty group of tooltips. This function initialises a <gtk-tooltips> structure. Without at least one such structure, you can not add tips to your application.

ret a new <gtk-tooltips> group for you to use.

[Function] gtk-tooltips-enable (self <gtk-tooltips>)

[Method] enable

Allows the user to see your tooltips as they navigate your application.

tooltips a <gtk-tooltips>.
[Function] gtk-tooltips-disable (self <gtk-tooltips>)

[Method] disable

Causes all tooltips in tooltips to become inactive. Any widgets that have tips associated with that group will no longer display their tips until they are enabled again

with gtk-tooltips-enable.
tooltips a <gtk-tooltips>.
[Function] gtk-tooltips-set-tip (self <gtk-tooltips>)

(widget <gtk-widget>) (tip text mchars) (tip private mchars)

[Method] set-tip

Adds a tooltip containing the message tip-text to the specified <gtk-widget>.

tooltips a <gtk-tooltips>.

widget the <gtk-widget> you wish to associate the tip with.

tip-text a string containing the tip itself.

tip-private a string of any further information that may be useful if the user gets stuck.

[Function] gtk-tooltips-force-window (self <gtk-tooltips>)
[Method] force-window

Ensures that the window used for displaying the given tooltips is created. Applications should never have to call this function, since GTK+ takes care of this.

tooltips a <gtk-tool-tips>

124 GtkViewport

An adapter which makes widgets scrollable

124.1 Overview

124.2 Usage

[Class] <gtk-viewport>

Derives from <gtk-bin>. This class defines the following slots:

hadjustment

The GtkAdjustment that determines the values of the horizontal position for this viewport

vadjustment

The GtkAdjustment that determines the values of the vertical position for this viewport

shadow-type

Determines how the shadowed box around the viewport is drawn

[Signal on <gtk-viewport>] set-scroll-adjustments (arg0 <gtk-adjustment>)
   (arg1 <gtk-adjustment>)
[Function] gtk-viewport-new (hadjustment <gtk-adjustment>)
   (vadjustment <gtk-adjustment>) ⇒ (ret <gtk-widget>)

Creates a new <gtk-viewport> with the given adjustments.

hadjustment horizontal adjustment.

vadjustment vertical adjustment.

ret  a new <gtk-viewport>.
[Function] gtk-viewport-get-hadjustment (self <gtk-viewport>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-hadjustment

Returns the horizontal adjustment of the viewport.

viewport a <gtk-viewport>.

ret the horizontal adjustment of viewport.

[Function] gtk-viewport-get-vadjustment (self <gtk-viewport>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-vadjustment

Returns the vertical adjustment of the viewport.

viewport a <gtk-viewport>.

ret the vertical adjustment of viewport.

[Function] gtk-viewport-set-hadjustment (self <gtk-viewport>)
        (adjustment <gtk-adjustment>)
[Method] set-hadjustment

Sets the horizontal adjustment of the viewport.

     viewport a <gtk-viewport>.

adjustment

               a <gtk-adjustment>.
[Function] gtk-viewport-set-vadjustment (self <gtk-viewport>)
        (adjustment <gtk-adjustment>)
[Method] set-vadjustment

Sets the vertical adjustment of the viewport.

     viewport a <gtk-viewport>.

adjustment

               a <gtk-adjustment>.
[Function] gtk-viewport-set-shadow-type (self <gtk-viewport>)
        (type <gtk-shadow-type>)
[Method] set-shadow-type

Sets the shadow type of the viewport.

     viewport a <gtk-viewport>.

type the new shadow type.

[Function] gtk-viewport-get-shadow-type (self <gtk-viewport>)
        ⇒ (ret <gtk-shadow-type>)
[Method] get-shadow-type
     Gets the shadow type of the <gtk-viewport>. See gtk-viewport-set-shadow-type.
     viewport a <gtk-viewport>

ret the shadow type Chapter 125: GtkAccessible 494

125 GtkAccessible

Accessibility support for widgets

125.1 Overview 125.2 Usage

[Class] <gtk-accessible>
     Derives from <atk-object>.

This class defines no direct slots.

126 GtkBin

A container with just one child

126.1 Overview

The <gtk-bin> widget is a container with just one child. It is not very useful itself, but it is useful for deriving subclasses, since it provides common code needed for handling a single child widget.

Many GTK+ widgets are subclasses of <gtk-bin>, including <gtk-window>, <gtk-

button>, <gtk-frame>, <gtk-handle-box>, and <gtk-scrolled-window>.

126.2 Usage

[Class] <gtk-bin>
     Derives from <gtk-container>.

This class defines no direct slots.

[Function] gtk-bin-get-child (self <gtk-bin>) ⇒ (ret <gtk-widget>)
[Method] get-child

Gets the child of the <gtk-bin>, or ‘#f’ if the bin contains no child widget. The returned widget does not have a reference added, so you do not need to unref it.

     bin  a <gtk-bin>

ret pointer to child of the <gtk-bin>

127 GtkBox

Base class for box containers

127.1 Overview

GtkBox is an abstract widget which encapsulates functionallity for a particular kind of container, one that organizes a variable number of widgets into a rectangular area. GtkBox currently has two derived classes, <gtk-hbox> and <gtk-vbox>.

The rectangular area of a GtkBox is organized into either a single row or a single column of child widgets depending upon whether the box is of type <gtk-hbox> or <gtk-vbox>, respectively. Thus, all children of a GtkBox are allocated one dimension in common, which is the height of a row, or the width of a column.

GtkBox uses a notion of packing. Packing refers to adding widgets with reference to a particular position in a <gtk-container>. For a GtkBox, 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.

Use repeated calls to gtk-box-pack-start to pack widgets into a GtkBox from start to end. Use gtk-box-pack-end to add widgets from end to start. You may intersperse these calls and add widgets from both ends of the same GtkBox.

   Use gtk-box-pack-start-defaults or gtk-box-pack-end-defaults to pack widgets

into a GtkBox if you do not need to specify the , , or attributes of the child to be added.

Because GtkBox is a <gtk-container>, you may also use gtk-container-add to insert widgets into the box, and they will be packed as if with gtk-box-pack-start-defaults. Use gtk-container-remove to remove widgets from the GtkBox.

Use gtk-box-set-homogeneous to specify whether or not all children of the GtkBox are forced to get the same amount of space.

Use gtk-box-set-spacing to determine how much space will be minimally placed between all children in the GtkBox.

Use gtk-box-reorder-child to move a GtkBox child to a different place in the box.

Use gtk-box-set-child-packing to reset the , , and attributes of any GtkBox child.

Use gtk-box-query-child-packing to query these fields.

127.2 Usage

[Class] <gtk-box>
     Derives from <gtk-container>.

This class defines the following slots:

spacing The amount of space between children

     homogeneous

Whether the children should all be the same size

[Function] gtk-box-pack-start (self <gtk-box>) (child <gtk-widget>)

(expand bool) (fill bool) (padding unsigned-int)

[Method] pack-start

Adds child to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.

box  a <gtk-box>.

child the <gtk-widget> to be added to box.

expand ‘#t’ if the new child is to be given extra space allocated to box. The extra space will be divided evenly between all children of box that use this option.

fill ‘#t’ 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 ‘#f’. 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 this child and its neighbors, over and above the global amount specified by <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.

[Function] gtk-box-pack-end (self <gtk-box>) (child <gtk-widget>)

(expand bool) (fill bool) (padding unsigned-int)

[Method] pack-end

Adds child to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box.

box  a <gtk-box>.

child the <gtk-widget> to be added to box.

expand ‘#t’ if the new child is to be given extra space allocated to box. The extra space will be divided evenly between all children of box that use this option.

fill ‘#t’ 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 ‘#f’. 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 this child and its neighbors, over and above the global amount specified by <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.

[Function] gtk-box-pack-start-defaults (self <gtk-box>)
(widget <gtk-widget>)
[Method] pack-start-defaults

Adds widget to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.

Parameters for how to pack the child widget, <gtk-box-child>, are given their default values, ‘#t’, ‘#t’, and 0, respectively.

box  a <gtk-box>.

widget the <gtk-widget> to be added to box.

[Function] gtk-box-pack-end-defaults (self <gtk-box>)
   (widget <gtk-widget>)
[Method] pack-end-defaults

Adds widget to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box. Parameters for how to pack the child widget, <gtk-box-child>, are given their default values, ‘#t’, ‘#t’, and 0, respectively.

box  a <gtk-box>.

widget the <gtk-widget> to be added to box.

[Function] gtk-box-get-homogeneous (self <gtk-box>) ⇒ (ret bool)
[Method] get-homogeneous

Returns whether the box is homogeneous (all children are the same size). See gtk-

box-set-homogeneous.
box  a <gtk-box>

ret ‘#t’ if the box is homogeneous.

[Function] gtk-box-set-homogeneous (self <gtk-box>) (homogeneous bool)
[Method] set-homogeneous

Sets the whether or not all children of box are given equal space in the box.

box  a <gtk-box>.

homogeneous a boolean value, ‘#t’ to create equal allotments, ‘#f’ for variable allotments.

[Function] gtk-box-get-spacing (self <gtk-box>) ⇒ (ret int)
[Method] get-spacing
Gets the value set by gtk-box-set-spacing.
box  a <gtk-box>

ret spacing between children

[Function] gtk-box-set-spacing (self <gtk-box>) (spacing int)
[Method] set-spacing

Sets the number of pixels to place between children of box.

box  a <gtk-box>.

spacing the number of pixels to put between children.

[Function] gtk-box-reorder-child (self <gtk-box>) (child <gtk-widget>)

(position int)

[Method] reorder-child

Moves child to a new position in the list of box children. The list is the 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.

box  a <gtk-box>.

child the <gtk-widget> to move.

position the new position for child in the <gtk-box>, starting from 0. If negative, indicates the end of the list.

[Function] gtk-box-set-child-packing (self <gtk-box>) (child <gtk-widget>)

(expand bool) (fill bool) (padding unsigned-int)

   (pack type <gtk-pack-type>)
[Method] set-child-packing

Sets the way child is packed into box.

box  a <gtk-box>.

child the <gtk-widget> of the child to set.

expand the new value of the

fill the new value of the

padding the new value of the

pack-type the new value of the

128 GtkButtonBox

Base class for and

128.1 Overview

The primary purpose of this class is to keep track of the various properties of <gtk-hbutton-

box> and <gtk-vbutton-box> widgets.

gtk-button-box-get-child-size retrieves the minimum width and height for widgets in a given button box. gtk-button-box-set-child-size allows those properties to be changed.

The internal padding of buttons can be retrieved and changed per button box using

gtk-button-box-get-child-ipadding and gtk-button-box-set-child-ipadding

respectively.

   gtk-button-box-get-spacing and gtk-button-box-set-spacing retrieve and change

default number of pixels between buttons, respectively.

   gtk-button-box-get-layout and gtk-button-box-set-layout retrieve and alter the

method used to spread the buttons in a button box across the container, respectively.

The main purpose of GtkButtonBox is to make sure the children have all the same size. Therefore it ignores the homogeneous property which it inherited from GtkBox, and always behaves as if homogeneous was ‘#t’.

128.2 Usage

[Class] <gtk-button-box>

Derives from <gtk-box>.

This class defines the following slots:

     layout-style

How to layout the buttons in the box. Possible values are default, spread, edge, start and end

[Function] gtk-button-box-get-layout (self <gtk-button-box>)
        ⇒ (ret <gtk-button-box-style>)
[Method] get-layout

Retrieves the method being used to arrange the buttons in a button box.

     widget  a <gtk-button-box>.

ret the method used to layout buttons in widget.

[Function] gtk-button-box-get-child-secondary (self <gtk-button-box>)
        (child <gtk-widget>) ⇒ (ret bool)
[Method] get-child-secondary

Returns whether child should appear in a secondary group of children.

     widget  a <gtk-button-box>

child a child of widget ret whether child should appear in a secondary group of children.

Since 2.4

[Function] gtk-button-box-set-layout (self <gtk-button-box>)
   (layout style <gtk-button-box-style>)
[Method] set-layout

Changes the way buttons are arranged in their container.

widget  a <gtk-button-box>.

layout-style the new layout style.

[Function] gtk-button-box-set-child-secondary (self <gtk-button-box>)

(child <gtk-widget>) (is secondary bool)

[Method] set-child-secondary

Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog. This group appears after the other children if the style is ‘GTK_BUTTONBOX_START’,

‘GTK_BUTTONBOX_SPREAD’ or ‘GTK_BUTTONBOX_EDGE’, and before 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.

widget  a <gtk-button-box>

child a child of widget

is-secondary if ‘#t’, the child appears in a secondary group of the button box.

129 GtkContainer

Base class for widgets which contain other widgets

129.1 Overview

A GTK+ 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 GtkLabel. 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 in GTK+. 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, which 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.

129.2 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 <gtk-window>. 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.

129.3 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 gtk-window-set-resizable), 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 gtk-widget-size-allocate. 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-allocation>. This struct 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 they have gotten, 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.

129.4 Child properties

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 gtk-container-class-install-child-property to install child properties
for a container class and gtk-container-class-find-child-property or gtk-
container-class-list-child-properties to get information about existing child

properties.

   To set the value of a child property, use gtk-container-child-set-property, gtk-
container-child-set or gtk-container-child-set-valist. To obtain the value of a
child property, use gtk-container-child-get-property, gtk-container-child-get or

gtk-container-child-get-valist. To emit notification about child property changes,

use gtk-widget-child-notify.

129.5 Usage

[Class] <gtk-container>
     Derives from <gtk-widget>.

This class defines the following slots:

     border-width

The width of the empty border outside the containers children

     resize-mode

Specify how resize events are handled

child Can be used to add a new child to the container

[Signal on <gtk-container>] add (arg0 <gtk-widget>)
[Signal on <gtk-container>] remove (arg0 <gtk-widget>)
[Signal on <gtk-container>] check-resize
[Signal on <gtk-container>] set-focus-child (arg0 <gtk-widget>)
[Function] gtk-container-add (self <gtk-container>) (widget <gtk-widget>)

[Method] add

Adds widget to container. Typically used for simple containers such as <gtk-window>, <gtk-frame>, or <gtk-button>; for more complicated layout containers such as <gtkbox> or <gtk-table>, this function will pick default packing parameters that may not be correct. So consider functions such as gtk-box-pack-start and gtk-table-attach as an alternative to gtk-container-add in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers.

container a <gtk-container>

widget a widget to be placed inside container

[Function] gtk-container-remove (self <gtk-container>)
   (widget <gtk-widget>)

[Method] remove

Removes widget from container. widget must be inside container. Note that container will own a reference to widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use widget again, you need to add a reference to it while it’s not inside a container, using g-object-ref. If you don’t want to use widget again it’s usually more efficient to simply destroy it directly using gtk-widget-destroy since this will remove it from the container and help break any circular reference count cycles.

container a <gtk-container>

widget a current child of container

[Function] gtk-container-get-resize-mode (self <gtk-container>)
   ⇒ (ret <gtk-resize-mode>)
[Method] get-resize-mode

Returns the resize mode for the container. See gtk-container-set-resize-mode.

container a <gtk-container>

ret the current resize mode

[Function] gtk-container-set-resize-mode (self <gtk-container>)
   (resize mode <gtk-resize-mode>)
[Method] set-resize-mode

Sets the resize mode for the container. The resize mode of a container determines whether a resize request will be passed to the container’s parent, queued for later execution or executed immediately.

container a <gtk-container>.

resize-mode the new resize mode.

[Function] gtk-container-check-resize (self <gtk-container>)
[Method] check-resize

container

[Function] gtk-container-get-children (self <gtk-container>)
   ⇒ (ret glist-of)
[Method] get-children

Returns the container’s non-internal children. See gtk-container-forall for details on what constitutes an "internal" child.

container a <gtk-container>.

ret a newly-allocated list of the container’s non-internal children.

[Function] gtk-container-set-focus-child (self <gtk-container>)
   (child <gtk-widget>)
[Method] set-focus-child

container

child

[Function] gtk-container-get-focus-vadjustment (self <gtk-container>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-focus-vadjustment

Retrieves the vertical focus adjustment for the container. See gtk-container-set-

focus-vadjustment.
container a <gtk-container>

ret the vertical focus adjustment, or ‘#f’ if none has been set.

[Function] gtk-container-set-focus-vadjustment (self <gtk-container>)
   (adjustment <gtk-adjustment>)
[Method] set-focus-vadjustment

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets

the vertical alignment. See gtk-scrolled-window-get-vadjustment for a typical
way of obtaining the adjustment and gtk-container-set-focus-hadjustment for

setting the horizontal adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the container.

container a <gtk-container>

adjustment an adjustment which should be adjusted when the focus is moved among the descendents of container

[Function] gtk-container-get-focus-hadjustment (self <gtk-container>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-focus-hadjustment

Retrieves the horizontal focus adjustment for the container. See gtk-container-

set-focus-hadjustment.
container a <gtk-container>

ret the horizontal focus adjustment, or ‘#f’ if none has been set.

[Function] gtk-container-set-focus-hadjustment (self <gtk-container>)
   (adjustment <gtk-adjustment>)
[Method] set-focus-hadjustment

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the horizontal alignment. See gtk-scrolled-window-get-hadjustment for a typical

way of obtaining the adjustment and gtk-container-set-focus-vadjustment for

setting the vertical adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the container.

container a <gtk-container>

adjustment an adjustment which should be adjusted when the focus is moved among the descendents of container

[Function] gtk-container-resize-children (self <gtk-container>)
[Method] resize-children

container

[Function] gtk-container-child-type (self <gtk-container>)
   ⇒ (ret <gtype>)
[Method] child-type

Returns the type of the children supported by the container. Note that this may return ‘G_TYPE_NONE’ to indicate that no more children can be added, e.g. for a <gtk-paned> which already has two children.

container a <gtk-container>.
ret  a <g-type>.
[Function] gtk-container-child-get-property (self <gtk-container>)

(child <gtk-widget>) (property name mchars) (value <gvalue>)

[Method] child-get-property

Gets the value of a child property for child and container.

container a <gtk-container>

child a widget which is a child of container

property-name the name of the property to get

value a location to return the value

[Function] gtk-container-child-set-property (self <gtk-container>)

(child <gtk-widget>) (property name mchars) (value <gvalue>)

[Method] child-set-property

Sets a child property for child and container.

container a <gtk-container>

child a widget which is a child of container

property-name the name of the property to set

value the value to set the property to

[Function] gtk-container-get-border-width (self <gtk-container>)
   ⇒ (ret unsigned-int)
[Method] get-border-width

Retrieves the border width of the container. See gtk-container-set-border-width.

container a <gtk-container>

ret the current border width

[Function] gtk-container-set-border-width (self <gtk-container>)

(border width unsigned-int)

[Method] set-border-width

Sets the border width 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. To add space to only one side, one approach is to create a

<gtk-alignment> widget, call gtk-widget-set-usize to give it a size, and place it

on the side of the container as a spacer.

container a <gtk-container>

border-width amount of blank space to leave outside the container. Valid values are in the range 0-65535 pixels.

[Function] gtk-container-propagate-expose (self <gtk-container>)
   (child <gtk-widget>) (event <gdk-event-expose>)
[Method] propagate-expose

When a container receives an expose event, it must send synthetic expose events to all children that don’t have their own <gdk-windows>. This function provides a convenient way of doing this. A container, when it receives an expose event, calls gtkcontainer-propagate-expose once for each child, passing in the event the container received. gtk-container-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>.

container a <gtk-container>

child a child of container

event a expose event sent to container

[Function] gtk-container-set-focus-chain (self <gtk-container>)

(focusable widgets glist-of)

[Method] set-focus-chain

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.

container a <gtk-container>.

focusable-widgets the new focus chain.

[Function] gtk-container-unset-focus-chain (self <gtk-container>)
[Method] unset-focus-chain

Removes a focus chain explicitly set with gtk-container-set-focus-chain.

container a <gtk-container>.

130 GtkItem

Abstract base class for GtkMenuItem, GtkListItem and GtkTreeItem

130.1 Overview

The <gtk-item> widget is an abstract base class for <gtk-menu-item>, <gtk-list-item>
and <gtk-tree-item>.

130.2 Usage

[Class] <gtk-item>

Derives from <gtk-bin>. This class defines no direct slots.

[Signal on <gtk-item>] select

Emitted when the item is selected.

[Signal on <gtk-item>] deselect

Emitted when the item is deselected.

[Signal on <gtk-item>] toggle

Emitted when the item is toggled.

[Function] gtk-item-select (self <gtk-item>)

[Method] select

Emits the "select" signal on the given item.

item  a <gtk-item>.
[Function] gtk-item-deselect (self <gtk-item>)
[Method] deselect

Emits the "deselect" signal on the given item.

item  a <gtk-item>.
[Function] gtk-item-toggle (self <gtk-item>)

[Method] toggle

Emits the "toggle" signal on the given item.

item  a <gtk-item>.

131 GtkMisc

Base class for widgets with alignments and padding

131.1 Overview

The <gtk-misc> widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes.

The horizontal and vertical padding attributes allows extra space to be added around the widget.

The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widgets position.

131.2 Usage

[Class] <gtk-misc>
Derives from <gtk-widget>.

This class defines the following slots:

xalign The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.

yalign The vertical alignment, from 0 (top) to 1 (bottom)

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

[Function] gtk-misc-set-alignment (self <gtk-misc>) (xalign float)

(yalign float)

[Method] set-alignment

Sets the alignment of the widget.

misc  a <gtk-misc>.

xalign the horizontal alignment, from 0 (left) to 1 (right).

yalign the vertical alignment, from 0 (top) to 1 (bottom).

[Function] gtk-misc-set-padding (self <gtk-misc>) (xpad int) (ypad int)
[Method] set-padding

Sets the amount of space to add around the widget.

misc  a <gtk-misc>.

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.

[Function] gtk-misc-get-alignment (self <gtk-misc>) ⇒ (xalign float)

(yalign float)

[Method] get-alignment

Gets the X and Y alignment of the widget within its allocation. See gtk-misc-set-

alignment.
misc  a <gtk-misc>

xalign location to store X alignment of misc, or ‘#f’

yalign location to store Y alignment of misc, or ‘#f’

[Function] gtk-misc-get-padding (self <gtk-misc>) ⇒ (xpad int) (ypad int)
[Method] get-padding

Gets the padding in the X and Y directions of the widget. See gtk-misc-set-

padding.
misc  a <gtk-misc>

xpad location to store padding in the X direction, or ‘#f’

ypad location to store padding in the Y direction, or ‘#f’

132 GtkObject

The base class of the GTK+ type hierarchy

132.1 Overview

132.2 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.

<gtk-object>s are created with a "floating" reference count. This means that the initial reference is not owned by anyone. Calling g-object-unref on a newly-created <gtk-object> is incorrect, the floating reference has to be removed first. This can be done by anyone at any time, by calling g-object-ref-sink to convert the floating reference into a regular reference. g-object-ref-sink returns a new reference if an object is already sunk (has no floating reference).

When you add a widget to its parent container, the parent container will do this: This means that the container now owns a reference to the child widget and the child widget has no floating reference.

       g_object_ref_sink (G_OBJECT (child_widget));

The purpose of the floating reference is to keep the child widget alive until you add it to a parent container:

        button = gtk_button_new ();
        /* button has one floating reference to keep it alive */
        gtk_container_add (GTK_CONTAINER (container), button);
        /* button has one non-floating reference owned by the container */

<gtk-window> is a special case, because GTK+ itself will ref/sink it on creation. That is, after calling gtk-window-new, the <gtk-window> will have one reference which is owned by GTK+, and no floating references.

One more factor comes into play: the "destroy" signal, emitted by the gtk-object-destroy method. The "destroy" signal asks all code owning a reference to an object to release said reference. So, for example, if you call gtk-object-destroy on a <gtk-window>, GTK+ will release the reference count that it owns; if you call gtk-object-destroy on a <gtk-button>, then the button will be removed from its parent container and the parent container will release its reference to the button. Because these references are released, calling gtk-object-destroy should result in freeing all memory associated with an object, unless some buggy code fails to release its references in response to the "destroy" signal. Freeing memory (referred to as finalization only happens if the reference count reaches zero.

Some simple rules for handling <gtk-object:>

Never call g-object-unref unless you have previously called g-object-ref, even if you created the <gtk-object>. (Note: this is not true for <gobject>; for <gobject>, the creator of the object owns a reference.)

Call gtk-object-destroy to get rid of most objects in most cases. In particular, widgets are almost always destroyed in this way.

Because of the floating reference count, you don’t need to worry about reference counting for widgets and toplevel windows, unless you explicitly call g-object-ref yourself.

132.3 Usage

[Class] <gtk-object>
Derives from <g-initially-unowned>.

This class defines the following slots:

user-data

Anonymous User Data Pointer

[Signal on <gtk-object>] destroy

Signals that all holders of a reference to the <gtk-object> should release the reference that they hold. May result in finalization of the object if all references are released.

133 GtkPaned

Base class for widgets with two adjustable panes

133.1 Overview

<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 gtk-paned-pack1 and gtk-paned-pack2. The division beween the two children is set by default from the size requests of the children, but it can be adjusted by the user.

A paned widget draws a separator between the two child widgets and a small handle that the user can drag to adjust the division. It does not draw any relief around the children or around the separator. (The space in which the separator is called the gutter.) Often, it is useful to put each child inside a <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, then when the <gtk-paned> is resized, that child will expand or shrink along with the paned widget. If shrink is true, then when that child can be made smaller than its requisition by the user. Setting shrink to ‘#f’ allows the application to set a minimum size. If resize is false for both children, then this is treated as if resize is true for both children.

The application can set the position of the slider as if it were set by the user, by calling

gtk-paned-set-position.
     GtkWidget *hpaned = gtk_hpaned_new ();
     GtkWidget *frame1 = gtk_frame_new (NULL);
     GtkWidget *frame2 = gtk_frame_new (NULL);
     gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
     gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
     gtk_widget_set_size_request (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1);
     gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
     gtk_widget_set_size_request (frame1, 50, -1);
     gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
     gtk_widget_set_size_request (frame2, 50, -1);

133.2 Usage

[Class] <gtk-paned>
     Derives from <gtk-container>.

This class defines the following slots:

position Position of paned separator in pixels (0 means all the way to the left/top)

     position-set

TRUE if the Position property should be used

min-position

Smallest possible value for the "position" property

max-position

Largest possible value for the "position" property

[Signal on <gtk-paned>] cycle-child-focus (arg0 <gboolean>) ⇒ <gboolean>
[Signal on <gtk-paned>] toggle-handle-focus ⇒ <gboolean>
[Signal on <gtk-paned>] move-handle (arg0 <gtk-scroll-type>) ⇒ <gboolean>
[Signal on <gtk-paned>] cycle-handle-focus (arg0 <gboolean>) ⇒ <gboolean>
[Signal on <gtk-paned>] accept-position ⇒ <gboolean>
[Signal on <gtk-paned>] cancel-position ⇒ <gboolean>
[Function] gtk-paned-add1 (self <gtk-paned>) (child <gtk-widget>)

[Method] add1

Adds a child to the top or left pane with default parameters. This is equivalent to

‘gtk_paned_pack1 (paned, child, FALSE, TRUE)’.

paned a paned widget child the child to add

[Function] gtk-paned-add2 (self <gtk-paned>) (child <gtk-widget>)

[Method] add2

Adds a child to the bottom or right pane with default parameters. This is equivalent

to ‘gtk_paned_pack2 (paned, child, TRUE, TRUE)’.

paned a paned widget child the child to add

[Function] gtk-paned-pack1 (self <gtk-paned>) (child <gtk-widget>)

(resize bool) (shrink bool)

[Method] pack1

Adds a child to the top or left pane. paned a paned widget child the child to add resize should this child expand when the paned widget is resized. shrink can this child be made smaller than its requisition.

[Function] gtk-paned-pack2 (self <gtk-paned>) (child <gtk-widget>)

(resize bool) (shrink bool)

[Method] pack2

Adds a child to the bottom or right pane. paned a paned widget child the child to add resize should this child expand when the paned widget is resized. shrink can this child be made smaller than its requisition.

[Function] gtk-paned-get-child1 (self <gtk-paned>) ⇒ (ret <gtk-widget>)
[Method] get-child1

Obtains the first child of the paned widget. paned a <gtk-paned> widget ret first child, or ‘#f’ if it is not set. Since 2.4

[Function] gtk-paned-get-child2 (self <gtk-paned>) ⇒ (ret <gtk-widget>)
[Method] get-child2

Obtains the second child of the paned widget. paned a <gtk-paned> widget ret second child, or ‘#f’ if it is not set. Since 2.4

[Function] gtk-paned-set-position (self <gtk-paned>) (position int)
[Method] set-position

Sets the position of the divider between the two panes. paned a <gtk-paned> widget position pixel position of divider, a negative value means that the position is unset.

[Function] gtk-paned-get-position (self <gtk-paned>) ⇒ (ret int)
[Method] get-position

Obtains the position of the divider between the two panes. paned a <gtk-paned> widget ret position of the divider

134 GtkRange

Base class for widgets which visualize an adjustment

134.1 Overview

134.2 Usage

[Class] <gtk-range>
Derives from <gtk-widget>.

This class defines the following slots:

update-policy

How the range should be updated on the screen

adjustment

The GtkAdjustment that contains the current value of this range object

inverted Invert direction slider moves to increase range value

lower-stepper-sensitivity

The sensitivity policy for the stepper that points to the adjustment’s lower side

upper-stepper-sensitivity

The sensitivity policy for the stepper that points to the adjustment’s upper side

show-fill-level

Whether to display a fill level indicator graphics on trough.

restrict-to-fill-level

Whether to restrict the upper boundary to the fill level.

fill-level

The fill level.

[Signal on <gtk-range>] value-changed

Emitted when the range value changes.

[Signal on <gtk-range>] adjust-bounds (arg0 <gdouble>)
[Signal on <gtk-range>] move-slider (arg0 <gtk-scroll-type>)

Virtual function that moves the slider. Used for keybindings.

[Signal on <gtk-range>] change-value (arg0 <gtk-scroll-type>)
   (arg1 <gdouble>) ⇒ <gboolean>

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 ‘#t’ to prevent further processing. Or, by returning ‘#f’, 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; the default GTK+ handler clamps the value based on range->round-digits. It is not possible to use delayed update policies in an overridden ::change-value handler. Since 2.6

[Function] gtk-range-get-adjustment (self <gtk-range>)
   ⇒ (ret <gtk-adjustment>)
[Method] get-adjustment

Get the <gtk-adjustment> which is the "model" object for <gtk-range>. See gtkrange-set-adjustment for details. The return value does not have a reference added, so should not be unreferenced.

range  a <gtk-range>
ret  a <gtk-adjustment>
[Function] gtk-range-set-update-policy (self <gtk-range>)
   (policy <gtk-update-type>)
[Method] set-update-policy

Sets the update policy for the range. <gtk-update-continuous> means that anytime the range slider is moved, the range value will change and the value changed signal will be emitted. <gtk-update-delayed> means that the value will be updated after a brief timeout where no slider motion occurs, so updates are spaced by a short time rather than continuous. <gtk-update-discontinuous> means that the value will only be updated when the user releases the button and ends the slider drag operation.

range  a <gtk-range>

policy update policy

[Function] gtk-range-set-adjustment (self <gtk-range>)
   (adjustment <gtk-adjustment>)
[Method] set-adjustment

Sets the adjustment to be used as the "model" object for this range widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/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.

range  a <gtk-range>

adjustment

          a <gtk-adjustment>
[Function] gtk-range-get-inverted (self <gtk-range>) ⇒ (ret bool)
[Method] get-inverted
Gets the value set by gtk-range-set-inverted.

range  a <gtk-range>

ret ‘#t’ if the range is inverted

[Function] gtk-range-set-inverted (self <gtk-range>) (setting bool)
[Method] set-inverted

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 on the right rather than on the bottom or left.

range  a <gtk-range>

setting ‘#t’ to invert the range

[Function] gtk-range-get-update-policy (self <gtk-range>)
   ⇒ (ret <gtk-update-type>)
[Method] get-update-policy

Gets the update policy of range. See gtk-range-set-update-policy.

range  a <gtk-range>

ret the current update policy

[Function] gtk-range-get-value (self <gtk-range>) ⇒ (ret double)
[Method] get-value

Gets the current value of the range.

range  a <gtk-range>

ret current value of the range.

[Function] gtk-range-set-increments (self <gtk-range>) (step double)
   (page double)
[Method] set-increments

Sets the step and page sizes for the range. The step size is used when the user clicks the <gtk-scrollbar> arrows or moves <gtk-scale> via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.

range  a <gtk-range>

step step size

page page size

[Function] gtk-range-set-range (self <gtk-range>) (min double) (max double)
[Method] set-range

Sets the allowable values in the <gtk-range>, and clamps the range value to be between min and max. (If the range has a non-zero page size, it is clamped between min and max - page-size.)

range  a <gtk-range>

min minimum range value

max maximum range value

[Function] gtk-range-set-value (self <gtk-range>) (value double)
[Method] set-value

Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The range emits the "value changed" signal if the value changes.

range  a <gtk-range>

value new value of the range

135 GtkScale

Base class for GtkHScale and GtkVScale

135.1 Overview

A <gtk-scale> is a slider control used to select a numeric value. To use it, you’ll probably want to investigate the methods on its base class, <gtk-range>, in addition to the methods for <gtk-scale> itself. To set the value of a scale, you would normally use gtk-range-set-value. To detect changes to the value, you would normally use the "value changed" signal.

The <gtk-scale> widget is an abstract class, used only for deriving the subclasses <gtk-

hscale> and <gtk-vscale>. To create a scale widget, call gtk-hscale-new-with-range
or gtk-vscale-new-with-range.

135.2 Usage

[Class] <gtk-scale>

Derives from <gtk-range>. This class defines the following slots:

digits The number of decimal places that are displayed in the value

draw-value

Whether the current value is displayed as a string next to the slider

value-pos

The position in which the current value is displayed

[Signal on <gtk-scale>] format-value (arg0 <gdouble>) ⇒ <gchararray>

Signal which allows you to change how the scale value is displayed. Connect a signal handler which returns an allocated string representing value. That string will then be used to display the scale’s value. Here’s an example signal handler which displays a value 1.0 as with "–>1.0<–".

     static gchar*
     format_value_callback (GtkScale *scale,
                            gdouble   value)
     {
       return g_strdup_printf ("-->%0.*g<--",
                               gtk_scale_get_digits (scale), value);
     }
[Function] gtk-scale-set-digits (self <gtk-scale>) (digits int)
[Method] set-digits

Sets the number of decimal places that are displayed in the value. Also causes the value of the adjustment to be rounded off to this number of digits, so the retrieved value matches the value the user saw.

scale  a <gtk-scale>.

digits the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00 etc.

[Function] gtk-scale-set-draw-value (self <gtk-scale>) (draw value bool)
[Method] set-draw-value

Specifies whether the current value is displayed as a string next to the slider.

scale  a <gtk-scale>.

draw-value a boolean.

[Function] gtk-scale-set-value-pos (self <gtk-scale>)
   (pos <gtk-position-type>)
[Method] set-value-pos

Sets the position in which the current value is displayed.

scale  a <gtk-scale>.

pos the position in which the current value is displayed.

[Function] gtk-scale-get-digits (self <gtk-scale>) ⇒ (ret int)
[Method] get-digits

Gets the number of decimal places that are displayed in the value.

scale  a <gtk-scale>.

ret the number of decimal places that are displayed.

[Function] gtk-scale-get-draw-value (self <gtk-scale>) ⇒ (ret bool)
[Method] get-draw-value

Returns whether the current value is displayed as a string next to the slider.

scale  a <gtk-scale>.

ret whether the current value is displayed as a string.

[Function] gtk-scale-get-value-pos (self <gtk-scale>)
   ⇒ (ret <gtk-position-type>)
[Method] get-value-pos

Gets the position in which the current value is displayed.

scale  a <gtk-scale>.

ret the position in which the current value is displayed.

[Function] gtk-scale-get-layout (self <gtk-scale>) ⇒ (ret <pango-layout>)
[Method] get-layout

Gets the <pango-layout> used to display the scale. The returned object is owned by the scale so does not need to be freed by the caller.

scale  A <gtk-scale>

ret the <pango-layout> for this scale, or ‘#f’ if the draw value property is ‘#f’.

Since 2.4

[Function] gtk-scale-get-layout-offsets (self <gtk-scale>) ⇒ (x int)
   (y int)
[Method] get-layout-offsets

Obtains 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 pango-pixels or <pango-scale>. If the draw value property is ‘#f’, the return values are undefined.

scale  a <gtk-scale>

x location to store X offset of layout, or ‘#f’

y location to store Y offset of layout, or ‘#f’

Since 2.4

136 GtkScrollbar

Base class for GtkHScrollbar and GtkVScrollbar

136.1 Overview

The <gtk-scrollbar> widget is an abstract base class for <gtk-hscrollbar> and <gtk-

vscrollbar>. It is not very useful in itself.

The position of the thumb in a scrollbar is controlled by the scroll adjustments. See <gtk-adjustment> for the fields in an adjustment - for <gtk-scrollbar>, the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper - page size." The "page size" field represents the size of the visible scrollable area. The "step increment" and "page increment" fields are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).

136.2 Usage

[Class] <gtk-scrollbar>

Derives from <gtk-range>.

This class defines no direct slots.

137 GtkSeparator

Base class for and

137.1 Overview

The <gtk-separator> widget is an abstract class, used only for deriving the subclasses

<gtk-hseparator> and <gtk-vseparator>.

137.2 Usage

[Class] <gtk-separator>
     Derives from <gtk-widget>.

This class defines no direct slots.

138 GtkWidget

Base class for all widgets

138.1 Overview

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 gtk-widget-class-install-style-property to install style properties for a wid-
get class, gtk-widget-class-find-style-property or gtk-widget-class-list-style-

properties to get information about existing style properties and gtk-widget-style-

get-property, gtk-widget-style-get or gtk-widget-style-get-valist to obtain the

value of a style property.

138.2 Usage

[Class] <gtk-widget>
Derives from <atk-implementor-iface>, <gtk-buildable>, <gtk-object>.

This class defines the following slots:

name The name of the widget

parent The parent widget of this widget. Must be a Container widget

width-request

Override for width request of the widget, or -1 if natural request should be used

height-request

Override for height request of the widget, or -1 if natural request should be used

visible Whether the widget is visible

sensitive

Whether the widget responds to input

app-paintable

Whether the application will paint directly on the widget

can-focus

Whether the widget can accept the input focus

has-focus

Whether the widget has the input focus

is-focus Whether the widget is the focus widget within the toplevel

can-default

Whether the widget can be the default widget

has-default

Whether the widget is the default widget

receives-default

If TRUE, the widget will receive the default action when it is focused

composite-child

Whether the widget is part of a composite widget

style The style of the widget, which contains information about how it will

look (colors etc)

events The event mask that decides what kind of GdkEvents this widget gets

extension-events

The mask that decides what kind of extension events this widget gets

no-show-all

Whether gtk widget show all() should not affect this widget

has-tooltip

Whether this widget has a tooltip

tooltip-markup

The contents of the tooltip for this widget

tooltip-text

The contents of the tooltip for this widget

[Signal on <gtk-widget>] composited-changed
[Signal on <gtk-widget>] show
[Signal on <gtk-widget>] hide
[Signal on <gtk-widget>] map
[Signal on <gtk-widget>] unmap
[Signal on <gtk-widget>] realize
[Signal on <gtk-widget>] unrealize
[Signal on <gtk-widget>] size-request (arg0 <gtk-requisition>)
[Signal on <gtk-widget>] size-allocate (arg0 <gdk-rectangle>)
[Signal on <gtk-widget>] state-changed (arg0 <gtk-state-type>)
[Signal on <gtk-widget>] parent-set (arg0 <gtk-widget>)

The parent-set signal is emitted when a new parent has been set on a widget.

[Signal on <gtk-widget>] hierarchy-changed (arg0 <gtk-widget>)

Emitted when there is a chance in the hierarchy to which a widget belong. More precisely, a widget is anchored when its toplevel ancestor is a <gtk-window>. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

[Signal on <gtk-widget>] style-set (arg0 <gtk-style>)

The style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like gtk-widget-modify-base also cause this signal to be emitted.

[Signal on <gtk-widget>] direction-changed (arg0 <gtk-text-direction>)
[Signal on <gtk-widget>] grab-notify (arg0 <gboolean>)

The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed. A widget is shadowed by a gtk-grab-add when the topmost grab widget in the grab stack of its window group is not its ancestor.

[Signal on <gtk-widget>] child-notify (arg0 <gparam>)

The ::child-notify signal is emitted for each child property that has changed on an object. The signal’s detail holds the property name.

[Signal on <gtk-widget>] mnemonic-activate (arg0 <gboolean>) ⇒ <gboolean>
[Signal on <gtk-widget>] grab-focus
[Signal on <gtk-widget>] focus (arg0 <gtk-direction-type>) ⇒ <gboolean>
[Signal on <gtk-widget>] move-focus (arg0 <gtk-direction-type>)

undocumented

[Signal on <gtk-widget>] event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] event-after (arg0 <gdk-event>)
[Signal on <gtk-widget>] button-press-event (arg0 <gdk-event>)
   ⇒ <gboolean>
[Signal on <gtk-widget>] button-release-event (arg0 <gdk-event>)
   ⇒ <gboolean>
[Signal on <gtk-widget>] scroll-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] motion-notify-event (arg0 <gdk-event>)
   ⇒ <gboolean>
[Signal on <gtk-widget>] keynav-failed (arg0 <gtk-direction-type>)
   ⇒ <gboolean>

undocumented

[Signal on <gtk-widget>] delete-event (arg0 <gdk-event>) ⇒ <gboolean>

The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting gtk-widget-hide-on-delete to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

[Signal on <gtk-widget>] destroy-event (arg0 <gdk-event>) ⇒ <gboolean>

The ::destroy-event signal is emitted when a <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.

[Signal on <gtk-widget>] expose-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] key-press-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] key-release-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] enter-notify-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] leave-notify-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] configure-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] focus-in-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] focus-out-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] map-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] unmap-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] property-notify-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] selection-clear-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] selection-request-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] selection-notify-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] selection-received (arg0 <gtk-selection-data>)
        (arg1 <guint>)
[Signal on <gtk-widget>] selection-get (arg0 <gtk-selection-data>)
        (arg1 <guint>) (arg2 <guint>)
[Signal on <gtk-widget>] proximity-in-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] proximity-out-event (arg0 <gdk-event>)
        ⇒ <gboolean>
[Signal on <gtk-widget>] drag-leave (arg0 <gdk-drag-context>)
        (arg1 <guint>)

The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in ::drag-motion, e.g.

     undo highlighting with gtk-drag-unhighlight
[Signal on <gtk-widget>] drag-begin (arg0 <gdk-drag-context>)

The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with gtk-

     drag-source-set-icon.

[Signal on <gtk-widget>] drag-end (arg0 <gdk-drag-context>)

The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in ::drag-begin.

[Signal on <gtk-widget>] drag-data-delete (arg0 <gdk-drag-context>)

The ::drag-data-delete signal is emitted on the drag source when a drag with the action ‘GDK_ACTION_MOVE’ is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What "delete" means, depends on the context of the drag operation.

[Signal on <gtk-widget>] drag-failed (arg0 <gdk-drag-context>)
   (arg1 <gtk-drag-result>) ⇒ <gboolean>

undocumented

[Signal on <gtk-widget>] drag-motion (arg0 <gdk-drag-context>)
   (arg1 <gint>) (arg2 <gint>) (arg3 <guint>) ⇒ <gboolean>

The ::drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. 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 ‘#f’ and no further processing is necessary. Otherwise, the handler returns ‘#t’. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk-drag-status. If the decision whether the drop will be accepted or rejected 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 gtk-drag-get-data and defer the gdk-drag-status call to the ::drag-data-received handler. Note that there is no ::drag-enter signal. The drag receiver has to keep track of whether he has received any ::drag-motion signals since the last ::drag-leave and if not, treat the ::drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with gtk-drag-highlight.

     static void
     drag_motion (GtkWidget *widget,
              GdkDragContext *context,
                  gint x,
                  gint y,
                  guint time)
     {
       GdkAtom target;
       PrivateData *private_data = GET_PRIVATE_DATA (widget);
       if (!private_data->drag_highlight)
        {
          private_data->drag_highlight = 1;
          gtk_drag_highlight (widget);
        }

target = gtk_drag_dest_find_target (widget, context, NULL);
if (target == GDK_NONE)
gdk_drag_status (context, 0, time);
else
{
private_data->pending_status = context->suggested_action;
gtk_drag_get_data (widget, context, target, time);
}
return TRUE;
}
static void
drag_data_received (GtkWidget        *widget,
               GdkDragContext   *context,
               gint              x,
               gint              y,
               GtkSelectionData *selection_data,
               guint             info,
               guint             time)
{
PrivateData *private_data = GET_PRIVATE_DATA (widget);
if (private_data->suggested_action)
{
private_data->suggested_action = 0;
/* We are getting this data due to a request in drag_motion,
* rather than due to a request in drag_drop, so we are just
* supposed to call gdk_drag_status(), not actually paste in
* the data.
*/
str = gtk_selection_data_get_text (selection_data);
if (!data_is_acceptable (str))
  gdk_drag_status (context, 0, time);
else
  gdk_drag_status (context, private_data->suggested_action, time);
}
else
{
/* accept the drop */
}
}

[Signal on <gtk-widget>] drag-drop (arg0 <gdk-drag-context>) (arg1 <gint>)
   (arg2 <gint>) (arg3 <guint>) ⇒ <gboolean>

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the 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 ‘#f’ and no further processing is necessary. Otherwise, the handler returns ‘#t’. In this case, the handler must ensure that gtk-drag-finish is called to let the source know that the drop is done. The call to gtk-drag-finish can be done either directly or in a ::drag-data-received handler which gets triggered by calling gtk-drop-get-data to receive the data for one or more of the supported targets.

[Signal on <gtk-widget>] drag-data-get (arg0 <gdk-drag-context>)
   (arg1 <gtk-selection-data>) (arg2 <guint>) (arg3 <guint>)

The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info. See gtk-selection-data-set

and gtk-selection-data-set-text.
[Signal on <gtk-widget>] drag-data-received (arg0 <gdk-drag-context>)
   (arg1 <gint>) (arg2 <gint>) (arg3 <gtk-selection-data>)
   (arg4 <guint>) (arg5 <guint>)

The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk-drag-status 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 gtk-drag-finish, setting the success parameter depending on whether the data was processed successfully. The handler may inspect and modify drag-context->action before calling gtk-drag-finish, e.g. to implement ‘GDK_ACTION_ASK’ as shown in the following example:

     void
     drag_data_received (GtkWidget          *widget,
                         GdkDragContext     *drag_context,
                         gint                x,
                         gint                y,
                         GtkSelectionData   *data,
                         guint               info,
                         guint               time)
     {
       if ((data->length >= 0) && (data->format == 8))
         {
           if (drag_context->action == GDK_ACTION_ASK)
             {
               GtkWidget *dialog;
               gint response;

               dialog = gtk_message_dialog_new (NULL,
                                                GTK_DIALOG_MODAL |
                                                GTK_DIALOG_DESTROY_WITH_PARENT,
                                                GTK_MESSAGE_INFO,
                                                GTK_BUTTONS_YES_NO,
                                                "Move the data ?\n");
               response = gtk_dialog_run (GTK_DIALOG (dialog));
               gtk_widget_destroy (dialog);
               if (response == GTK_RESPONSE_YES)
                 drag_context->action = GDK_ACTION_MOVE;
               else
                 drag_context->action = GDK_ACTION_COPY;
              }
           gtk_drag_finish (drag_context, TRUE, FALSE, time);
           return;
         }
        gtk_drag_finish (drag_context, FALSE, FALSE, time);
      }
[Signal on <gtk-widget>] visibility-notify-event (arg0 <gdk-event>)
   ⇒ <gboolean>
[Signal on <gtk-widget>] client-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] no-expose-event (arg0 <gdk-event>) ⇒ <gboolean>
[Signal on <gtk-widget>] window-state-event (arg0 <gdk-event>)
   ⇒ <gboolean>
[Signal on <gtk-widget>] grab-broken-event (arg0 <gdk-event>)
   ⇒ <gboolean>

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. Since 2.8

[Signal on <gtk-widget>] query-tooltip (arg0 <gint>) (arg1 <gint>)
   (arg2 <gboolean>) (arg3 <gtk-tooltip>) ⇒ <gboolean>

undocumented

[Signal on <gtk-widget>] popup-menu ⇒ <gboolean>

This signal gets emitted whenever a widget should pop up a context-sensitive menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the <gtk-entry> widget creates a menu with clipboard commands. See (the missing figure, checklist-popup-menu for an example of how to use this signal.

[Signal on <gtk-widget>] show-help (arg0 <gtk-widget-help-type>)
   ⇒ <gboolean>
[Signal on <gtk-widget>] accel-closures-changed
[Signal on <gtk-widget>] screen-changed (arg0 <gdk-screen>)
[Signal on <gtk-widget>] can-activate-accel (arg0 <guint>) ⇒ <gboolean>

Determines whether an 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 <gtk-widget> handling for determining whether an accelerator can be activated.

[Class] <gtk-requisition>

Derives from <gboxed>. This class defines no direct slots.

[Class] <gtk-selection-data>

Derives from <gboxed>. This class defines no direct slots.

[Function] gtk-widget-destroy (self <gtk-widget>)

[Method] destroy

Destroys a widget. Equivalent to gtk-object-destroy, except that you don’t have to cast the widget to <gtk-object>. 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 <gtkwindow>), it will be removed from the list of toplevels, and the reference GTK+ holds to it will be removed. Removing a widget from its container or the list of toplevels results in the widget being finalized, unless you’ve added additional references to the

widget with g-object-ref.

In most cases, only toplevel widgets (windows) require explicit destruction, because when you destroy a toplevel its children will be destroyed as well.

widget  a <gtk-widget>
[Function] gtk-widget-unparent (self <gtk-widget>)
[Method] unparent

This function is only for use in widget implementations. Should be called by implementations of the remove method on <gtk-container>, to dissociate a child from the container.

widget  a <gtk-widget>
[Function] gtk-widget-show (self <gtk-widget>)

[Method] show

Flags a widget to be displayed. 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 gtk-widget-show-all on the container, instead of individually showing the widgets. Remember that you have to show the containers containing a widget, in addition to 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.

widget  a <gtk-widget>
[Function] gtk-widget-show-now (self <gtk-widget>)
[Method] show-now

Shows a widget. If the widget is an unmapped toplevel widget (i.e. a <gtk-window> that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.

widget  a <gtk-widget>
[Function] gtk-widget-hide (self <gtk-widget>)

[Method] hide

Reverses the effects of gtk-widget-show, causing the widget to be hidden (invisible to the user).

widget  a <gtk-widget>
[Function] gtk-widget-show-all (self <gtk-widget>)
[Method] show-all

Recursively shows a widget, and any child widgets (if the widget is a container).

widget  a <gtk-widget>
[Function] gtk-widget-hide-all (self <gtk-widget>)
[Method] hide-all

Recursively hides a widget and any child widgets.

widget  a <gtk-widget>
[Function] gtk-widget-map (self <gtk-widget>)

[Method] map

This function is only for use in widget implementations. Causes a widget to be mapped if it isn’t already.

widget  a <gtk-widget>
[Function] gtk-widget-unmap (self <gtk-widget>)

[Method] unmap

This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.

widget  a <gtk-widget>
[Function] gtk-widget-realize (self <gtk-widget>)

[Method] realize

Creates the GDK (windowing system) resources associated with a widget. For example, widget->window will be created when a 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 gtkwidget-realize realizes the widget’s parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen. This function is primarily used in widget implementations, and isn’t very useful otherwise. 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 g-signal-connect-after to the "realize" signal.

widget  a <gtk-widget>
[Function] gtk-widget-unrealize (self <gtk-widget>)
[Method] unrealize

This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as widget->window).

widget  a <gtk-widget>
[Function] gtk-widget-queue-draw (self <gtk-widget>)
[Method] queue-draw

Equivalent to calling gtk-widget-queue-draw-area for the entire area of a widget.

widget  a <gtk-widget>
[Function] gtk-widget-queue-resize (self <gtk-widget>)
[Method] queue-resize

This function is only for use in widget implementations. Flags a widget to have its size renegotiated; 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>, <gtk-label> queues a resize to ensure there’s enough space for the new text.

widget  a <gtk-widget>
[Function] gtk-widget-queue-resize-no-redraw (self <gtk-widget>)
[Method] queue-resize-no-redraw

This function works like gtk-widget-queue-resize, except that the widget is not invalidated.

widget  a <gtk-widget>

Since 2.4

[Function] gtk-widget-size-request (self <gtk-widget>)
   (requisition <gtk-requisition>)
[Method] size-request

This function is typically used when implementing a <gtk-container> subclass. Obtains the preferred size of a widget. The container uses this information to arrange its child widgets and decide what size allocations to give them with gtk-widget-size-

allocate.

You can also call this function from an application, with some caveats. Most notably, getting a size request requires the widget to be associated with a screen, because font information may be needed. Multihead-aware applications should keep this in mind. Also remember that the size request is not necessarily the size a widget will actually be allocated.

See also gtk-widget-get-child-requisition.
widget  a <gtk-widget>

requisition a <gtk-requisition> to be filled in

[Function] gtk-widget-get-child-requisition (self <gtk-widget>)
   (requisition <gtk-requisition>)
[Method] get-child-requisition

This function is only for use in widget implementations. Obtains widget->requisition, unless someone has forced a particular geometry on the widget (e.g. with gtkwidget-set-usize), in which case it returns that geometry instead of the widget’s requisition. This function differs from gtk-widget-size-request in that it retrieves the last size request value from widget->requisition, while gtk-widget-size-request actually calls the "size request" method on widget to compute the size request and fill in widget->requisition, and only then returns widget->requisition. Because this function does not call the "size request" method, it can only be used when you know that widget->requisition is up-to-date, that is, gtk-widget-size-request has been called since the last time a resize was queued. In general, only container implementations have this information; applications should use gtk-widget-

size-request.
widget  a <gtk-widget>

requisition a <gtk-requisition> to be filled in

[Function] gtk-widget-size-allocate (self <gtk-widget>)
   (allocation <gdk-rectangle>)
[Method] size-allocate

This function is only used by <gtk-container> subclasses, to assign a size and position to their child widgets.

widget  a <gtk-widget>

allocation position and size to be allocated to widget

[Function] gtk-widget-add-accelerator (self <gtk-widget>)

(accel signal mchars) (accel group <gtk-accel-group>)

   (accel key unsigned-int) (accel mods <gdk-modifier-type>)
   (accel flags <gtk-accel-flags>)
[Method] add-accelerator

Installs an accelerator for this widget in accel-group that causes accel-signal to be emitted if the accelerator is activated. The accel-group needs to be added to the widget’s toplevel via gtk-window-add-accel-group, and the signal must be of type ‘G_RUN_ACTION’. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by

the user, use gtk-accel-map-add-entry and gtk-widget-set-accel-path or gtk-
menu-item-set-accel-path instead.

widget widget to install an accelerator on

accel-signal widget signal to emit on accelerator activation

accel-group accel group for this widget, added to its toplevel

accel-key GDK keyval of the accelerator

accel-mods modifier key combination of the accelerator

accel-flags flag accelerators, e.g. ‘GTK_ACCEL_VISIBLE’

[Function] gtk-widget-remove-accelerator (self <gtk-widget>)
   (accel group <gtk-accel-group>) (accel key unsigned-int)
   (accel mods <gdk-modifier-type>) ⇒ (ret bool)
[Method] remove-accelerator

Removes an accelerator from widget, previously installed with gtk-widget-add-

accelerator.

widget widget to install an accelerator on

accel-group accel group for this widget

accel-key GDK keyval of the accelerator

accel-mods modifier key combination of the accelerator

ret whether an accelerator was installed and could be removed

[Function] gtk-widget-set-accel-path (self <gtk-widget>)
   (accel path mchars) (accel group <gtk-accel-group>)
[Method] set-accel-path

Given an accelerator group, accel-group, and an accelerator path, accel-path, sets up an accelerator in accel-group so whenever the key binding that is defined for accel-path is pressed, widget will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to gtk-widget-set-accel-path. Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See gtk-accel-map-save.) This function is a low level function that would most likely be used by a menu cre-

ation system like <gtk-item-factory>. If you use <gtk-item-factory>, setting up

accelerator paths will be done automatically. Even when you you aren’t using <gtk-item-factory>, if you only want to set up accelerators on menu items gtk-menu-item-set-accel-path provides a somewhat more convenient interface.

widget  a <gtk-widget>

accel-path path used to look up the accelerator

accel-group

          a <gtk-accel-group>.
[Function] gtk-widget-list-accel-closures (self <gtk-widget>)
   ⇒ (ret glist-of)
[Method] list-accel-closures

Lists the closures used by widget for accelerator group connections with gtk-accel-

group-connect-by-path or gtk-accel-group-connect. The closures can be used

to monitor accelerator changes on widget, by connecting to the ::accel changed signal of the <gtk-accel-group> of a closure which can be found out with gtk-accel-

group-from-accel-closure.

widget widget to list accelerator closures for

ret a newly allocated <g-list> of closures

[Function] gtk-widget-can-activate-accel (self <gtk-widget>)
   (signal id unsigned-int) ⇒ (ret bool)
[Method] can-activate-accel

Determines whether an accelerator that activates the signal identified by signal-id can currently be activated. This is done by emitting the GtkWidget::can-activate-accel signal on widget; 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.

widget  a <gtk-widget>

signal-id the ID of a signal installed on widget

ret ‘#t’ if the accelerator can be activated.

Since 2.4

[Function] gtk-widget-event (self <gtk-widget>) (event <gdk-event>)

⇒ (ret bool)

[Method] event

Rarely-used function. This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don’t use this function; instead, use gtk-main-do-event so the event will behave as if it were in the event queue. Don’t synthesize expose events; instead, use gdk-window-invalidate-rect to invalidate a region of the window.

widget  a <gtk-widget>
event  a <gdk-event>

ret return from the event signal emission (‘#t’ if the event was handled)

[Function] gtk-widget-activate (self <gtk-widget>) ⇒ (ret bool)
[Method] activate

For widgets that can be "activated" (buttons, menu items, etc.) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If widget isn’t activatable, the function returns ‘#f’.

widget a <gtk-widget> that’s activatable

ret ‘#t’ if the widget was activatable

[Function] gtk-widget-reparent (self <gtk-widget>)
   (new parent <gtk-widget>)
[Method] reparent

Moves a widget from one <gtk-container> to another, handling reference count issues to avoid destroying the widget.

widget  a <gtk-widget>

new-parent a <gtk-container> to move the widget into

[Function] gtk-widget-is-focus (self <gtk-widget>) ⇒ (ret bool)
[Method] is-focus

Determines if the widget is the focus widget within its toplevel. (This does not mean that the ‘HAS_FOCUS’ flag is necessarily set; ‘HAS_FOCUS’ will only be set if the toplevel widget additionally has the global input focus.)

widget  a <gtk-widget>

ret ‘#t’ if the widget is the focus widget.

[Function] gtk-widget-grab-focus (self <gtk-widget>)
[Method] grab-focus

Causes widget to have the keyboard focus for the <gtk-window> it’s inside. widget must be a focusable widget, such as a <gtk-entry>; something like <gtk-frame> won’t work. (More precisely, it must have the ‘GTK_CAN_FOCUS’ flag set.)

widget  a <gtk-widget>
[Function] gtk-widget-grab-default (self <gtk-widget>)
[Method] grab-default

Causes widget to become the default widget. widget must have the ‘GTK_CAN_DEFAULT’ flag set; typically you have to set this flag yourself by calling

‘GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT)’. The default widget is

activated when the user presses Enter in a window. Default widgets must be activatable, that is, gtk-widget-activate should affect them.

widget  a <gtk-widget>
[Function] gtk-widget-set-name (self <gtk-widget>) (name mchars)
[Method] set-name

Widgets can be named, which allows you to refer to them from a gtkrc file. You can apply a style to widgets with a particular name in the gtkrc file. See the documentation for gtkrc files (on the same page as the docs for <gtk-rc-style>).

Note that widget names are separated by periods in paths (see gtk-widget-path), so names with embedded periods may cause confusion.

widget  a <gtk-widget>

name name for the widget

[Function] gtk-widget-get-name (self <gtk-widget>) ⇒ (ret mchars)
[Method] get-name

Retrieves the name of a widget. See gtk-widget-set-name for the significance of widget names.

widget  a <gtk-widget>

ret name of the widget. This string is owned by GTK+ and should not be modified or freed

[Function] gtk-widget-set-state (self <gtk-widget>)
   (state <gtk-state-type>)
[Method] set-state

This function is for use in widget implementations. Sets the state of a widget (insensitive, prelighted, etc.) Usually you should set the state using wrapper functions such

as gtk-widget-set-sensitive.
widget  a <gtk-widget>

state new state for widget

[Function] gtk-widget-set-sensitive (self <gtk-widget>) (sensitive bool)
[Method] set-sensitive

Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are "grayed out" and the user can’t interact with them. Insensitive widgets are known as "inactive", "disabled", or "ghosted" in some other toolkits.

widget  a <gtk-widget>

sensitive ‘#t’ to make the widget sensitive

[Function] gtk-widget-set-parent (self <gtk-widget>) (parent <gtk-widget>)
[Method] set-parent

This function is useful only when implementing subclasses of <gtk-container>. Sets the container as the parent of widget, and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is

gtk-widget-unparent.
widget  a <gtk-widget>

parent parent container

[Function] gtk-widget-set-parent-window (self <gtk-widget>)

(parent window <gdk-window>)

[Method] set-parent-window

Sets a non default parent window for widget.

widget  a <gtk-widget>.

parent-window the new parent window.

[Function] gtk-widget-get-parent-window (self <gtk-widget>)
   ⇒ (ret <gdk-window>)
[Method] get-parent-window

Gets widget’s parent window.

widget  a <gtk-widget>.

ret the parent window of widget.

[Function] gtk-widget-set-events (self <gtk-widget>)
   (events <gdk-event-mask>)
[Method] set-events

Sets the event mask (see <gdk-event-mask>) for a widget. 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 function must be called while a widget is unrealized. Consider gtk-widget-add-events for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with <gtk-no-window> widgets; to get events on those widgets, place them inside a <gtk-event-box> and receive events on the event box.

widget  a <gtk-widget>

events event mask

[Function] gtk-widget-add-events (self <gtk-widget>)
   (events <gdk-event-mask>)
[Method] add-events

Adds the events in the bitfield events to the event mask for widget. See gtk-widget-set-events for details.

widget  a <gtk-widget>

events an event mask, see <gdk-event-mask>

[Function] gtk-widget-set-extension-events (self <gtk-widget>)
   (mode <gdk-extension-mode>)
[Method] set-extension-events

Sets the extension events mask to mode. See <gdk-extension-mode> and gdk-input-

set-extension-events.
widget  a <gtk-widget>

mode bitfield of extension events to receive

[Function] gtk-widget-get-extension-events (self <gtk-widget>)
   ⇒ (ret <gdk-extension-mode>)
[Method] get-extension-events

Retrieves the extension events the widget will receive; see gdk-input-set-

extension-events.

widget  a <gtk-widget>

ret extension events for widget

[Function] gtk-widget-get-toplevel (self <gtk-widget>)
   ⇒ (ret <gtk-widget>)
[Method] get-toplevel

This function returns the topmost widget in the container hierarchy widget is a part of. If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced. Note the difference in behavior vs. gtk-widget-get-ancestor;

‘gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)’  would  return

‘#f’ if widget wasn’t inside a toplevel window, and if the window was inside a <gtk-window-derived> widget which was 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 gtk-widget-get-toplevel and check if the ‘TOPLEVEL’ flags is set on the result.

      GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
      if (GTK_WIDGET_TOPLEVEL (toplevel))
        {
          [ Perform action on toplevel. ]
        }
widget  a <gtk-widget>

ret the topmost ancestor of widget, or widget itself if there’s no ancestor.

[Function] gtk-widget-get-ancestor (self <gtk-widget>)
   (widget type <gtype>) ⇒ (ret <gtk-widget>)
[Method] get-ancestor

Gets the first ancestor of widget with type widget-type. For example,

‘gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)’ gets the first <gtk-box>

that’s an ancestor of widget. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel <gtk-window> in

the docs for gtk-widget-get-toplevel.
Note that unlike gtk-widget-is-ancestor, gtk-widget-get-ancestor considers

widget to be an ancestor of itself.

widget  a <gtk-widget>

widget-type ancestor type

ret the ancestor widget, or ‘#f’ if not found

[Function] gtk-widget-get-colormap (self <gtk-widget>)
   ⇒ (ret <gdk-colormap>)
[Method] get-colormap

Gets the colormap that will be used to render widget. No reference will be added to the returned colormap; it should not be unreferenced.

widget  a <gtk-widget>

ret the colormap used by widget

[Function] gtk-widget-set-colormap (self <gtk-widget>)
   (colormap <gdk-colormap>)
[Method] set-colormap

Sets the colormap for the widget to the given value. Widget must not have been previously realized. This probably should only be used from an init function (i.e. from the constructor for the widget).

widget  a <gtk-widget>

colormap a colormap

[Function] gtk-widget-get-visual (self <gtk-widget>) ⇒ (ret <gdk-visual>)
[Method] get-visual

Gets the visual that will be used to render widget.

widget  a <gtk-widget>

ret the visual for widget

[Function] gtk-widget-get-events (self <gtk-widget>) ⇒ (ret int)
[Method] get-events

Returns the event mask for the widget (a bitfield containing flags from the <gdkevent-mask> enumeration). These are the events that the widget will receive.

widget  a <gtk-widget>

ret event mask for widget

[Function] gtk-widget-get-pointer (self <gtk-widget>) ⇒ (x int) (y int)
[Method] get-pointer

Obtains the location of the mouse pointer in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that are not <gtk-no-window> widgets, and are relative to widget- >allocation.x, widget->allocation.y for widgets that are <gtk-no-window> widgets.

widget  a <gtk-widget>

x return location for the X coordinate, or ‘#f’

y return location for the Y coordinate, or ‘#f’

[Function] gtk-widget-is-ancestor (self <gtk-widget>)
   (ancestor <gtk-widget>) ⇒ (ret bool)
[Method] is-ancestor

Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.

widget  a <gtk-widget>

ancestor another <gtk-widget>

ret ‘#t’ if ancestor contains widget as a child, grandchild, great grandchild, etc.

[Function] gtk-widget-translate-coordinates (self <gtk-widget>)

(dest widget <gtk-widget>) (src x int) (src y int) ⇒ (ret bool)

(dest x int) (dest y int)

[Method] translate-coordinates

Translate coordinates relative to src-widget’s allocation to coordinates relative to dest-widget’s allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel.

src-widget a <gtk-widget>

dest-widget

          a <gtk-widget>

src-x X position relative to src-widget

src-y Y position relative to src-widget

dest-x location to store X position relative to dest-widget

dest-y location to store Y position relative to dest-widget

ret ‘#f’ if either widget was not realized, or there was no common ancestor. In this case, nothing is stored in *dest-x and *dest-y. Otherwise ‘#t’.

[Function] gtk-widget-hide-on-delete (self <gtk-widget>) ⇒ (ret bool)
[Method] hide-on-delete

Utility function; intended to be connected to the "delete event" signal on a <gtkwindow>. The function calls gtk-widget-hide on its argument, then returns ‘#t’. 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, GTK+ destroys windows when "delete event" is received.

widget  a <gtk-widget>

ret ‘#t’

[Function] gtk-widget-set-style (self <gtk-widget>) (style <gtk-style>)
[Method] set-style

Sets the <gtk-style> for a widget (widget->style). You probably don’t want to use this function; it interacts badly with themes, because themes work by replacing the

<gtk-style>. Instead, use gtk-widget-modify-style.
widget  a <gtk-widget>

style a <gtk-style>, or ‘#f’ to remove the effect of a previous gtk-widget-set-style and go back to the default style

[Function] gtk-widget-ensure-style (self <gtk-widget>)
[Method] ensure-style

Ensures that widget has a style (widget->style). Not a very useful function; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.

widget  a <gtk-widget>

[Function] gtk-widget-get-style (self <gtk-widget>) ⇒ (ret <gtk-style>)
[Method] get-style

Simply an accessor function that returns widget->style.

widget  a <gtk-widget>

ret the widget’s <gtk-style>

[Function] gtk-widget-reset-rc-styles (self <gtk-widget>)
[Method] reset-rc-styles

Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings. This function is not useful for applications.

widget  a <gtk-widget>.
[Function] gtk-widget-push-colormap (cmap <gdk-colormap>)

Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets. Remove cmap with gtk-widget-pop-colormap. There’s little reason to use this function.

cmap  a <gdk-colormap>
[Function] gtk-widget-pop-colormap

Removes a colormap pushed with gtk-widget-push-colormap.

[Function] gtk-widget-set-default-colormap (colormap <gdk-colormap>)

Sets the default colormap to use when creating widgets. gtk-widget-push-colormap is a better function to use if you only want to affect a few widgets, rather than all widgets.

colormap a <gdk-colormap>
[Function] gtk-widget-get-default-style ⇒ (ret <gtk-style>)

Returns the default style used by all widgets initially.

ret the default style. This <gtk-style> object is owned by GTK+ and should not be modified or freed.

[Function] gtk-widget-get-default-colormap ⇒ (ret <gdk-colormap>)

Obtains the default colormap used to create widgets.

ret default widget colormap

[Function] gtk-widget-get-default-visual ⇒ (ret <gdk-visual>)

Obtains the visual of the default colormap. Not really useful; used to be useful before

gdk-colormap-get-visual existed.

ret visual of the default colormap

[Function] gtk-widget-set-direction (self <gtk-widget>)
   (dir <gtk-text-direction>)
[Method] set-direction

Sets the reading direction on a particular widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitely visual rather than logical (such as buttons for text justification). If the direction is set to ‘GTK_TEXT_DIR_NONE’, then the value set by gtk-widget-

set-default-direction will be used.
widget  a <gtk-widget>

dir the new direction

[Function] gtk-widget-get-direction (self <gtk-widget>)
   ⇒ (ret <gtk-text-direction>)
[Method] get-direction

Gets the reading direction for a particular widget. See gtk-widget-set-direction.

widget  a <gtk-widget>

ret the reading direction for the widget.

[Function] gtk-widget-set-default-direction (dir <gtk-text-direction>)

Sets the default reading direction for widgets where the direction has not been ex-

plicitly set by gtk-widget-set-direction.

dir the new default direction. This cannot be ‘GTK_TEXT_DIR_NONE’.

[Function] gtk-widget-get-default-direction
   ⇒ (ret <gtk-text-direction>)

Obtains the current default reading direction. See gtk-widget-set-default-

direction.

ret the current default direction.

[Function] gtk-widget-shape-combine-mask (self <gtk-widget>)

(shape mask <gdk-drawable>) (offset x int) (offset y int)

[Method] shape-combine-mask

Sets a shape for this widget’s GDK window. This allows for transparent windows

etc., see gdk-window-shape-combine-mask for more information.
widget  a <gtk-widget>.

shape-mask shape to be added, or ‘#f’ to remove an existing shape.

offset-x X position of shape mask with respect to window.

offset-y Y position of shape mask with respect to window.

[Function] gtk-widget-input-shape-combine-mask (self <gtk-widget>)

(shape mask <gdk-drawable>) (offset x int) (offset y int)

[Method] input-shape-combine-mask

Sets an input shape for this widget’s GDK window. This allows for windows which react to mouse click in a nonrectangular region, see gdk-window-input-shape-combine-mask for more information.

widget  a <gtk-widget>.

shape-mask shape to be added, or ‘#f’ to remove an existing shape.

offset-x X position of shape mask with respect to window.

offset-y Y position of shape mask with respect to window.

Since 2.10

[Function] gtk-widget-path (self <gtk-widget>)

⇒ (path length unsigned-int) (path mchars) (path reversed mchars)

[Method] path

Obtains the full path to 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 gtk-widget-get-name. 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 gtk-widget-set-name. By setting the name of a widget, you allow users or theme authors to apply styles to that specific widget in their gtkrc file. path-reversed-p fills in the path in reverse order, i.e. starting with widget’s name instead of starting with the name of widget’s outermost ancestor.

widget  a <gtk-widget>

path-length location to store length of the path, or ‘#f’

path location to store allocated path string, or ‘#f’

path-reversed location to store allocated reverse path string, or ‘#f’

[Function] gtk-widget-class-path (self <gtk-widget>)

⇒ (path length unsigned-int) (path mchars) (path reversed mchars)

[Method] class-path

Same as gtk-widget-path, but always uses the name of a widget’s type, never uses

a custom name set with gtk-widget-set-name.
widget  a <gtk-widget>

path-length location to store the length of the class path, or ‘#f’

path location to store the class path as an allocated string, or ‘#f’

path-reversed location to store the reverse class path as an allocated string, or ‘#f’

[Function] gtk-widget-get-composite-name (self <gtk-widget>)
   ⇒ (ret mchars)
[Method] get-composite-name

Obtains the composite name of a widget.

widget  a <gtk-widget>.

ret the composite name of widget, or ‘#f’ if widget is not a composite child. The string should not be freed when it is no longer needed.

[Function] gtk-widget-modify-style (self <gtk-widget>)
   (style <gtk-rc-style>)
[Method] modify-style

Modifies style values on the widget. Modifications made using this technique take precedence over style values set via an RC file, however, they will be overriden if a style is explicitely set on the widget using gtk-widget-set-style. The <gtk-rc-style> structure is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged. Note that modifications made with this function are not cumulative with previous calls

to gtk-widget-modify-style or with such functions as gtk-widget-modify-fg. If

you wish to retain previous values, you must first call gtk-widget-get-modifier-style, make your modifications to the returned style, then call gtk-widget-modify-style with that style. On the other hand, if you first call gtk-widget-modify-style, subsequent calls to such functions gtk-widget-modify-fg will have a cumulative effect with the initial modifications.

widget  a <gtk-widget>

style the <gtk-rc-style> holding the style modifications

[Function] gtk-widget-get-modifier-style (self <gtk-widget>)
   ⇒ (ret <gtk-rc-style>)
[Method] get-modifier-style

Returns the current modifier style for the widget. (As set by gtk-widget-modify-style.) If no style has previously set, a new <gtk-rc-style> 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 gtk-widget-modify-style, passing in the returned rc style, to make sure that your changes take effect. Caution: passing the style back to gtk-widget-modify-style will normally end up destroying it, because gtk-widget-modify-style copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive.

widget  a <gtk-widget>

ret the modifier style for the widget. This rc style is owned by the widget. If you want to keep a pointer to value this around, you must add a refcount

          using g-object-ref.
[Function] gtk-widget-modify-fg (self <gtk-widget>)
   (state <gtk-state-type>) (color <gdk-color>)
[Method] modify-fg

Sets the foreground color for a widget in a particular state. All other style values are

left untouched. See also gtk-widget-modify-style.
widget  a <gtk-widget>.

state the state for which to set the foreground color.

color the color to assign (does not need to be allocated), or ‘#f’ to undo the effect of previous calls to of gtk-widget-modify-fg.

[Function] gtk-widget-modify-bg (self <gtk-widget>)
   (state <gtk-state-type>) (color <gdk-color>)
[Method] modify-bg

Sets the background color for a widget in a particular state. All other style values are left untouched. See also gtk-widget-modify-style. Note that "no window" widgets (which have the ‘GTK_NO_WINDOW’ flag set) draw on their parent container’s window and thus may not draw any background themselves. This is the case for e.g. <gtk-label>. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a <gtk-event-box> widget and setting the background color on that.

widget  a <gtk-widget>.

state the state for which to set the background color.

color the color to assign (does not need to be allocated), or ‘#f’ to undo the effect of previous calls to of gtk-widget-modify-bg.

[Function] gtk-widget-modify-text (self <gtk-widget>)
   (state <gtk-state-type>) (color <gdk-color>)
[Method] modify-text

Sets the text color for a widget in a particular state. All other style values are left untouched. The text color is the foreground color used along with the base color (see

gtk-widget-modify-base) for widgets such as <gtk-entry> and <gtk-text-view>.
See also gtk-widget-modify-style.
widget  a <gtk-widget>.

state the state for which to set the text color.

color the color to assign (does not need to be allocated), or ‘#f’ to undo the effect of previous calls to of gtk-widget-modify-text.

[Function] gtk-widget-modify-base (self <gtk-widget>)
   (state <gtk-state-type>) (color <gdk-color>)
[Method] modify-base

Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see

gtk-widget-modify-text) for widgets such as <gtk-entry> and <gtk-text-view>.
See also gtk-widget-modify-style.

Note that "no window" widgets (which have the ‘GTK_NO_WINDOW’ flag set) draw on their parent container’s window and thus may not draw any background themselves. This is the case for e.g. <gtk-label>. To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a <gtk-event-box> widget and setting the base color on that.

widget  a <gtk-widget>.

state the state for which to set the base color.

color the color to assign (does not need to be allocated), or ‘#f’ to undo the effect of previous calls to of gtk-widget-modify-base.

[Function] gtk-widget-modify-font (self <gtk-widget>)
   (font desc <pango-font-description>)
[Method] modify-font

Sets the font to use for a widget. All other style values are left untouched. See also

gtk-widget-modify-style.
widget  a <gtk-widget>

font-desc the font description to use, or ‘#f’ to undo the effect of previous calls to

          gtk-widget-modify-font.
[Function] gtk-widget-create-pango-context (self <gtk-widget>)
   ⇒ (ret <pango-context>)
[Method] create-pango-context

Creates a new <pango-context> with the appropriate font map, font description, and base direction for drawing text for this widget. See also gtk-widget-get-pango-

context.
widget  a <gtk-widget>
ret  the new <pango-context>
[Function] gtk-widget-get-pango-context (self <gtk-widget>)
   ⇒ (ret <pango-context>)
[Method] get-pango-context

Gets a <pango-context> with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by gtk-widget-create-pango-context, this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), 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 pango-layout-context-changed on the layout in response to the ::style-set and ::direction-changed signals for the widget.

widget  a <gtk-widget>

ret the <pango-context> for the widget.

[Function] gtk-widget-create-pango-layout (self <gtk-widget>)
   (text mchars) ⇒ (ret <pango-layout>)
[Method] create-pango-layout

Creates a new <pango-layout> with the appropriate font map, font description, and base direction for drawing text for this widget. If you keep a <pango-layout> created in this way around, in order to notify the layout of changes to the base direction or font of this widget, you must call pango-layout-context-changed in response to the ::style-set and ::direction-changed signals for the widget.

widget  a <gtk-widget>

text text to set on the layout (can be ‘#f’)

ret  the new <pango-layout>
[Function] gtk-widget-render-icon (self <gtk-widget>) (stock id mchars)
   (size <gtk-icon-size>) (detail mchars) ⇒ (ret <gdk-pixbuf>)
[Method] render-icon

A convenience function that uses the theme engine and RC file settings for widget to look up stock-id and render it to a pixbuf. stock-id should be a stock icon ID such

as <gtk-stock-open> or <gtk-stock-ok>. size should be a size such as <gtk-icon-

size-menu>. detail should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code.

The pixels in the returned <gdk-pixbuf> are shared with the rest of the application and should not be modified. The pixbuf should be freed after use with g-object-

unref.
widget  a <gtk-widget>

stock-id a stock ID

size a stock size. A size of (GtkIconSize)-1 means render at the size of the source and don’t scale (if there are multiple source sizes, GTK+ picks one of the available sizes).

detail render detail to pass to theme engine

ret a new pixbuf, or ‘#f’ if the stock ID wasn’t known

[Function] gtk-widget-pop-composite-child

Cancels the effect of a previous call to gtk-widget-push-composite-child.

[Function] gtk-widget-push-composite-child

Makes all newly-created widgets as composite children until the corresponding gtk-

widget-pop-composite-child 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 by GTK (but see gtk-container-foreach vs. gtk-container-

forall), but e.g. GUI builders might want to treat them in a different way.

Here is a simple example:

       gtk_widget_push_composite_child ();
       scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
       gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
       gtk_widget_pop_composite_child ();
       gtk_widget_set_parent (scrolled_window->hscrollbar,
                              GTK_WIDGET (scrolled_window));
       g_object_ref (scrolled_window->hscrollbar);

[Function] gtk-widget-queue-draw-area (self <gtk-widget>) (x int) (y int)

(width int) (height int)

[Method] queue-draw-area

Invalidates the rectangular area of widget defined by x, y, width and height by calling gdk-window-invalidate-rect 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 function in widget implementations. You might also use it, or gdk-window-invalidate-rect directly, to schedule a redraw of a <gtkdrawing-area> or some portion thereof.

Frequently you can just call gdk-window-invalidate-rect or gdk-window-

invalidate-region instead of this function. Those functions 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.

widget  a <gtk-widget>

x x coordinate of upper-left corner of rectangle to redraw

y y coordinate of upper-left corner of rectangle to redraw

width width of region to draw

height height of region to draw

[Function] gtk-widget-reset-shapes (self <gtk-widget>)
[Method] reset-shapes

Recursively resets the shape on this widget and its descendants.

widget  a <gtk-widget>.
[Function] gtk-widget-set-app-paintable (self <gtk-widget>)

(app paintable bool)

[Method] set-app-paintable

Sets whether the application intends to draw on the widget in an ::expose-event handler. This is a hint to the widget and does not affect the behavior of the GTK+ core; many widgets ignore this flag entirely. For widgets that do pay attention to the flag, such as <gtk-event-box> and <gtk-window>, the effect is to suppress default themed drawing of the widget’s background. (Children of the widget will still be drawn.) The application is then entirely responsible for drawing the widget background. Note that the background is still drawn when the widget is mapped. If this is not suitable (e.g. because you want to make a transparent window using an RGBA visual), you can work around this by doing:

      gtk_widget_realize (window);
      gdk_window_set_back_pixmap (window->window, NULL, FALSE);
      gtk_widget_show (window);

widget  a <gtk-widget>

app-paintable ‘#t’ if the application will paint on the widget

[Function] gtk-widget-set-double-buffered (self <gtk-widget>)

(double buffered bool)

[Method] set-double-buffered

Widgets are double buffered by default; you can use this function to turn off the buffering. "Double buffered" simply means that gdk-window-begin-paint-region and gdk-window-end-paint are called automatically around expose events sent to the widget. gdk-window-begin-paint diverts all drawing to a widget’s window to an offscreen buffer, and gdk-window-end-paint 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 function to turn off double buffering if you had special needs and really knew what you were doing.

Note: if you turn off double-buffering, you have to handle expose events, since even the clearing to the background color or pixmap will not happen automatically (as it

is done in gdk-window-begin-paint).
widget  a <gtk-widget>

double-buffered ‘#t’ to double-buffer a widget

[Function] gtk-widget-set-redraw-on-allocate (self <gtk-widget>)

(redraw on allocate bool)

[Method] set-redraw-on-allocate

Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is ‘#t’ and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting on will improve performance.

Note that for ‘NO_WINDOW’ widgets setting this flag to ‘#f’ turns off all allocation on resizing: the widget will not even redraw 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 widget->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.

widget  a <gtk-widget>

redraw-on-allocate if ‘#t’, 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.

[Function] gtk-widget-set-composite-name (self <gtk-widget>)
   (name mchars)
[Method] set-composite-name

Sets a widgets composite name. The widget must be a composite child of its parent;

see gtk-widget-push-composite-child.
widget  a <gtk-widget>.

name the name to set.

[Function] gtk-widget-set-scroll-adjustments (self <gtk-widget>)
   (hadjustment <gtk-adjustment>) (vadjustment <gtk-adjustment>)

⇒ (ret bool)

[Method] set-scroll-adjustments

For widgets that support scrolling, sets the scroll adjustments and returns ‘#t’. For widgets that don’t support scrolling, does nothing and returns ‘#f’. Widgets that don’t support scrolling can be scrolled by placing them in a <gtk-viewport>, which does support scrolling.

widget  a <gtk-widget>

hadjustment an adjustment for horizontal scrolling, or ‘#f’

vadjustment an adjustment for vertical scrolling, or ‘#f’

ret ‘#t’ if the widget supports scrolling

[Function] gtk-widget-mnemonic-activate (self <gtk-widget>)

(group cycling bool) ⇒ (ret bool)

[Method] mnemonic-activate

widget

group-cycling ret

[Function] gtk-widget-region-intersect (self <gtk-widget>)
   (region <gdk-region>) ⇒ (ret <gdk-region>)
[Method] region-intersect

Computes the intersection of a widget’s area and region, returning the intersection. The result may be empty, use gdk-region-empty to check.

widget  a <gtk-widget>

region a <gdk-region>, in the same coordinate system as widget->allocation. That is, relative to widget->window for ‘NO_WINDOW’ widgets; relative to the parent window of widget->window for widgets with their own window.

ret A newly allocated region holding the intersection of widget and region. The coordinates of the return value are relative to widget->window for ‘NO_WINDOW’ widgets, and relative to the parent window of widget->window for widgets with their own window.

[Function] gtk-widget-send-expose (self <gtk-widget>) (event <gdk-event>)

⇒ (ret int)

[Method] send-expose

Very rarely-used function. This function is used to emit an expose event signals on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a child ‘NO_WINDOW’ widget, and that is normally done

using gtk-container-propagate-expose.

If you want to force an area of a window to be redrawn, use gdk-window-invalidate-rect or gdk-window-invalidate-region. To cause the redraw to be done immediately, follow that call with a call to gdk-window-process-updates.

widget  a <gtk-widget>

event a expose <gdk-event>

ret return from the event signal emission (‘#t’ if the event was handled)

[Function] gtk-widget-style-get-property (self <gtk-widget>)

(property name mchars) (value <gvalue>)

[Method] style-get-property

Gets the value of a style property of widget.

widget  a <gtk-widget>

property-name the name of a style property

value location to return the property value

[Function] gtk-widget-get-accessible (self <gtk-widget>)
   ⇒ (ret <atk-object>)
[Method] get-accessible

Returns the accessible object that describes the widget to an assistive technology. If no accessibility library is loaded (i.e. no ATK implementation library is loaded via GTK_MODULES or via another application library, such as libgnome), then this <atk-object> instance may be a no-op. Likewise, if no class-specific <atk-object> implementation is available for the widget instance in question, it will inherit an <atk-object> implementation from the first ancestor class for which such an implementation is defined.

The documentation of the ATK (http://developer.gnome.org/doc/API/2.0/atk/index.html)

library contains more information about accessible objects and their uses.

widget  a <gtk-widget>

ret the <atk-object> associated with widget

[Function] gtk-widget-child-focus (self <gtk-widget>)
   (direction <gtk-direction-type>) ⇒ (ret bool)
[Method] child-focus

This function is used by custom widget implementations; if you’re writing an app, you’d use gtk-widget-grab-focus to move the focus to a particular widget, and gtk-container-set-focus-chain to change the focus tab order. So you may want to investigate those functions instead. gtk-widget-child-focus is called by containers as the user moves around the window using keyboard shortcuts. direction indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). gtk-widget-child-focus invokes the "focus" signal on <gtk-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 ‘#t’ if moving in direction left the focus on a focusable location inside that widget, and ‘#f’ if moving in direction moved the focus outside the widget. If returning ‘#t’, widgets normally call gtk-widget-grab-focus to place the focus accordingly; if returning ‘#f’, they don’t modify the current focus location. This function replaces gtk-container-focus from GTK+ 1.2. It was necessary to check that the child was visible, sensitive, and focusable before calling gtk-

container-focus. gtk-widget-child-focus returns ‘#f’ if the widget is not cur-

rently in a focusable state, so there’s no need for those checks.

widget  a <gtk-widget>

direction direction of focus movement

ret ‘#t’ if focus ended up inside widget

[Function] gtk-widget-child-notify (self <gtk-widget>)

(child property mchars)

[Method] child-notify

Emits a "child-notify" signal for the child propertychild-property on widget. This is the analogue of g-object-notify for child properties.

widget  a <gtk-widget>

child-property the name of a child property installed on the class of widget’s parent.

[Function] gtk-widget-freeze-child-notify (self <gtk-widget>)
[Method] freeze-child-notify

Stops emission of "child-notify" signals on widget. The signals are queued until gtk-

widget-thaw-child-notify is called on widget.

This is the analogue of g-object-freeze-notify for child properties.

widget  a <gtk-widget>
[Function] gtk-widget-get-child-visible (self <gtk-widget>) ⇒ (ret bool)
[Method] get-child-visible

Gets the value set with gtk-widget-set-child-visible. If you feel a need to use this function, your code probably needs reorganization. This function is only useful for container implementations and never should be called by an application.

widget  a <gtk-widget>

ret ‘#t’ if the widget is mapped with the parent.

[Function] gtk-widget-get-parent (self <gtk-widget>) ⇒ (ret <gtk-widget>)
[Method] get-parent

Returns the parent container of widget.

widget  a <gtk-widget>

ret the parent container of widget, or ‘#f’

[Function] gtk-widget-get-settings (self <gtk-widget>)
   ⇒ (ret <gtk-settings>)
[Method] get-settings

Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget. Note that this function can only be called when the <gtk-widget> is attached to a toplevel, since the settings object is specific to a particular <gdk-screen>.

widget  a <gtk-widget>

ret the relevant <gtk-settings> object

[Function] gtk-widget-get-clipboard (self <gtk-widget>)
   (selection <gdk-atom>) ⇒ (ret <gtk-clipboard>)
[Method] get-clipboard

Returns the clipboard object for the given selection to be used with widget. widget must have a <gdk-display> associated with it, so must be attached to a toplevel window.

widget  a <gtk-widget>

selection a <gdk-atom> which identifies the clipboard to use. ‘GDK_SELECTION_CLIPBOARD’ gives the default clipboard. Another common value is ‘GDK_SELECTION_PRIMARY’, which gives the primary X selection.

ret the appropriate 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.

Since 2.2

[Function] gtk-widget-get-display (self <gtk-widget>)
   ⇒ (ret <gdk-display>)
[Method] get-display

Get the <gdk-display> for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a <gtk-window> at the top. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

widget  a <gtk-widget>

ret the <gdk-display> for the toplevel for this widget.

Since 2.2

[Function] gtk-widget-get-root-window (self <gtk-widget>)
   ⇒ (ret <gdk-window>)
[Method] get-root-window

Get the root window where this widget is located. This function can only be called after the widget has been added to a widget heirarchy with <gtk-window> at the top. The root window is useful for such purposes as creating a popup <gdk-window> associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

widget  a <gtk-widget>

ret the <gdk-window> root window for the toplevel for this widget.

Since 2.2

[Function] gtk-widget-get-screen (self <gtk-widget>) ⇒ (ret <gdk-screen>)
[Method] get-screen

Get the <gdk-screen> from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a <gtk-window> at the top. In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

widget  a <gtk-widget>

ret the <gdk-screen> for the toplevel for this widget.

Since 2.2

[Function] gtk-widget-has-screen (self <gtk-widget>) ⇒ (ret bool)
[Method] has-screen

Checks whether there is a <gdk-screen> is associated with this widget. All toplevel widgets have an associated screen, and all widgets added into a heirarchy with a toplevel window at the top.

widget  a <gtk-widget>

ret ‘#t’ if there is a <gdk-screen> associcated with the widget.

Since 2.2

[Function] gtk-widget-get-size-request (self <gtk-widget>) ⇒ (width int)

(height int)

[Method] get-size-request

Gets the size request that was explicitly set for the widget using gtk-widget-set-size-request. A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used intead. See gtk-widget-set-size-request. To get the size a widget will actually use, call gtk-widget-size-request instead of this function.

widget  a <gtk-widget>

width return location for width, or ‘#f’

height return location for height, or ‘#f’

[Function] gtk-widget-set-child-visible (self <gtk-widget>) (is visible bool)
[Method] set-child-visible

Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with gtk-widget-show. The child visibility can be set for widget before it is added to a container with gtkwidget-set-parent, to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of ‘#t’ 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 function is only useful for container implementations and never should be called by an application.

widget  a <gtk-widget>

is-visible if ‘#t’, widget should be mapped along with its parent.

[Function] gtk-widget-set-size-request (self <gtk-widget>) (width int)

(height int)

[Method] set-size-request

Sets the minimum size of a widget; that is, the widget’s size request will be width by height. You can use this function to force a widget to be either larger or smaller than it normally would be. In most cases, gtk-window-set-default-size is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, gtk-window-set-geometry-hints can be a useful function as well. Note the inherent danger of 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 hardcode 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 function to mean "as small as possible."

widget  a <gtk-widget>

width width widget should request, or -1 to unset

height height widget should request, or -1 to unset

[Function] gtk-widget-thaw-child-notify (self <gtk-widget>)
[Method] thaw-child-notify

Reverts the effect of a previous call to gtk-widget-freeze-child-notify. This causes all queued "child-notify" signals on widget to be emitted.

widget  a <gtk-widget>
[Function] gtk-widget-set-no-show-all (self <gtk-widget>)

(no show all bool)

[Method] set-no-show-all

Sets the "no show all" property, which determines whether calls to gtk-widget-

show-all and gtk-widget-hide-all will affect this widget.

This is mostly for use in constructing widget hierarchies with externally controlled

visibility, see <gtk-ui-manager>.
widget  a <gtk-widget>

no-show-all the new value for the "no show all" property

Since 2.4

[Function] gtk-widget-get-no-show-all (self <gtk-widget>) ⇒ (ret bool)
[Method] get-no-show-all

Returns the current value of the "no show all" property, which determines whether

calls to gtk-widget-show-all and gtk-widget-hide-all will affect this widget.
widget  a <gtk-widget>

ret the current value of the "no show all" property.

Since 2.4

[Function] gtk-widget-list-mnemonic-labels (self <gtk-widget>)
   ⇒ (ret glist-of)
[Method] list-mnemonic-labels

Returns a newly allocated list of the widgets, normally labels, for which this widget is a the target of a mnemonic (see for example, gtk-label-set-mnemonic-widget). The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you

must call ‘g_list_foreach (result, (GFunc)g_object_ref, NULL)’ first, and then

unref all the widgets afterwards.

widget  a <gtk-widget>

ret the list of mnemonic labels; free this list with g-list-free when you are done with it.

Since 2.4

[Function] gtk-widget-add-mnemonic-label (self <gtk-widget>)
   (label <gtk-widget>)
[Method] add-mnemonic-label

Adds a widget to the list of mnemonic labels for this widget. (See gtk-widget-list-mnemonic-labels). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well, by using a connection to the ::destroy signal or a weak notifier.

widget  a <gtk-widget>

label a <gtk-widget> that acts as a mnemonic label for widget.

Since 2.4

[Function] gtk-widget-remove-mnemonic-label (self <gtk-widget>)
   (label <gtk-widget>)
[Method] remove-mnemonic-label

Removes a widget from the list of mnemonic labels for this widget. (See gtk-widget-list-mnemonic-labels). The widget must have previously been added to the list

with gtk-widget-add-mnemonic-label.
widget  a <gtk-widget>

label a <gtk-widget> that was previously set as a mnemnic label for widget

          with gtk-widget-add-mnemonic-label.

Since 2.4

[Function] gtk-widget-get-action (self <gtk-widget>) ⇒ (ret <gtk-action>)
[Method] get-action

Returns the <gtk-action> that widget is a proxy for. See also gtk-action-get-

proxies.
widget  a <gtk-widget>

ret the action that a widget is a proxy for, or ‘#f’, if it is not attached to an action.

Since 2.10

[Function] gtk-widget-is-composited (self <gtk-widget>) ⇒ (ret bool)
[Method] is-composited

Whether widget can rely on having its alpha channel drawn correctly. On X11 this function returns whether a compositing manager is running for widget’s screen

widget  a <gtk-widget>

ret ‘#t’ if the widget can rely on its alpha channel being drawn correctly.

Since 2.10

[Function] gtk-requisition-copy (self <gtk-requisition>)
   ⇒ (ret <gtk-requisition>)
Copies a <gtk-requisition>.
requisition a <gtk-requisition>.

ret a copy of requisition.

139 GtkIMContext

Base class for input method contexts

139.1 Overview

139.2 Usage

[Class] <gtk-im-context>

Derives from <gobject>. This class defines no direct slots.

[Signal on <gtk-im-context>] preedit-start
[Signal on <gtk-im-context>] preedit-end
[Signal on <gtk-im-context>] preedit-changed
[Signal on <gtk-im-context>] commit (arg0 <gchararray>)
[Signal on <gtk-im-context>] retrieve-surrounding ⇒ <gboolean>
[Signal on <gtk-im-context>] delete-surrounding (arg0 <gint>) (arg1 <gint>)
   ⇒ <gboolean>
[Function] gtk-im-context-set-client-window (self <gtk-im-context>)
   (window <gdk-window>)
[Method] set-client-window

Set the client window for the input context; this is the <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.

context  a <gtk-im-context>

window the client window. This may be ‘#f’ to indicate that the previous client window no longer exists.

[Function] gtk-im-context-filter-keypress (self <gtk-im-context>)
   (event <gdk-event-key>) ⇒ (ret bool)
[Method] filter-keypress

Allow an input method to internally handle key press and release events. If this function returns ‘#t’, then no further processing should be done for this key event.

context  a <gtk-im-context>

event the key event

ret ‘#t’ if the input method handled the key event.

[Function] gtk-im-context-focus-in (self <gtk-im-context>)
[Method] focus-in

Notify 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.

context  a <gtk-im-context>

[Function] gtk-im-context-focus-out (self <gtk-im-context>)
[Method] focus-out

Notify 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 contexts state to reflect this change.

context  a <gtk-im-context>
[Function] gtk-im-context-reset (self <gtk-im-context>)

[Method] reset

Notify the input method that a change such as a change in cursor position has been made. This will typically cause the input method to clear the preedit state.

context  a <gtk-im-context>
[Function] gtk-im-context-set-cursor-location (self <gtk-im-context>)
   (area <gdk-rectangle>)
[Method] set-cursor-location

Notify the input method that a change in cursor position has been made. The location is relative to the client window.

context  a <gtk-im-context>

area new location

[Function] gtk-im-context-set-use-preedit (self <gtk-im-context>)

(use preedit bool)

[Method] set-use-preedit

Sets whether the IM context should use the preedit string to display feedback. If use-preedit is FALSE (default is TRUE), then the IM context may use some other method to display feedback, such as displaying it in a child of the root window.

context  a <gtk-im-context>

use-preedit whether the IM context should use the preedit string.

[Function] gtk-im-context-set-surrounding (self <gtk-im-context>)

(text mchars) (len int) (cursor index int)

[Method] set-surrounding

Sets surrounding context around the insertion point and preedit string. This function is expected to be called in response to the GtkIMContext::retrieve surrounding signal, and will likely have no effect if called at other times.

context  a <gtk-im-context>

text text surrounding the insertion point, as UTF-8. the preedit string should not be included within text.

len the length of text, or -1 if text is nul-terminated

cursor-index the byte index of the insertion cursor within text.

[Function] gtk-im-context-get-surrounding (self <gtk-im-context>)

⇒ (ret bool) (text mchars) (cursor index int)

[Method] get-surrounding

Retrieves context around the insertion point. 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 GtkIMContext::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 gtk-im-context-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.

context  a <gtk-im-context>

text location to store a UTF-8 encoded string of text holding context around the insertion point. If the function returns ‘#t’, then you must free the result stored in this location with g-free.

cursor-index location to store byte index of the insertion cursor within text.

ret ‘#t’ if surrounding text was provided; in this case you must free the result stored in *text.

[Function] gtk-im-context-delete-surrounding (self <gtk-im-context>)

(offset int) (n chars int) ⇒ (ret bool)

[Method] delete-surrounding

Asks the widget that the input context is attached to to delete characters around the cursor position by emitting the GtkIMContext::delete surrounding signal. Note that offset and n-chars are in characters not in bytes which differs from the usage other

places in <gtk-im-context>.

In order to use this function, you should first call gtk-im-context-get-surrounding to get the current context, and call this function immediately afterwards 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 subsitutions in the existing text in response to new input. It is not useful for applications.

context  a <gtk-im-context>

offset offset from cursor position in chars; a negative value means start before the cursor.

n-chars number of characters to delete.

ret ‘#t’ if the signal was handled.

140 GtkPlug

Toplevel for embedding into other processes

140.1 Overview

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.

The <gtk-plug> and <gtk-socket> widgets are currently not available on all platforms supported by GTK+.

140.2 Usage

[Class] <gtk-plug>
Derives from <gtk-window>.

This class defines the following slots:

embedded Whether or not the plug is embedded

[Signal on <gtk-plug>] embedded
[Function] gtk-plug-construct (self <gtk-plug>) (socket id unsigned-long)
[Method] construct

Finish the initialization of plug for a given <gtk-socket> identified by socket-id. This function will generally only be used by classes deriving from <gtk-plug>.

plug  a <gtk-plug>.

socket-id the XID of the socket’s window.

[Function] gtk-plug-construct-for-display (self <gtk-plug>)
   (display <gdk-display>) (socket id unsigned-long)
[Method] construct-for-display

Finish the initialization of plug for a given <gtk-socket> identified by socket-id which is currently displayed on display. This function will generally only be used by classes deriving from <gtk-plug>.

plug  a <gtk-plug>.

display the <gdk-display> associated with socket-id’s <gtk-socket>.

socket-id the XID of the socket’s window.

Since 2.2

[Function] gtk-plug-new (socket id unsigned-long) ⇒ (ret <gtk-widget>)

Creates a new plug widget inside the <gtk-socket> identified by socket-id. If socketid is 0, the plug is left "unplugged" and can later be plugged into a <gtk-socket>

by gtk-socket-add-id.

socket-id the window ID of the socket, or 0. ret the new <gtk-plug> widget.

[Function] gtk-plug-new-for-display (display <gdk-display>)
   (socket id unsigned-long) ⇒ (ret <gtk-widget>)

Create a new plug widget inside the <gtk-socket> identified by socket id. display the <gdk-display> on which socket-id is displayed socket-id the XID of the socket’s window. ret the new <gtk-plug> widget. Since 2.2

[Function] gtk-plug-get-id (self <gtk-plug>) ⇒ (ret unsigned-long)

[Method] get-id

Gets the window ID of a <gtk-plug> widget, which can then be used to embed this window inside another window, for instance with gtk-socket-add-id.

plug  a <gtk-plug>.

ret the window ID for the plug

141 GtkSocket

Container for widgets from other processes

141.1 Overview

Together with <gtk-plug>, <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 gtk-socket-get-id. Before using this function, the socket must have been realized, and for hence, have been added to its parent.

     GtkWidget *socket = gtk_socket_new ();
     gtk_widget_show (socket);
     gtk_container_add (GTK_CONTAINER (parent), socket);
     /* The following call is only necessary if one of
      * the ancestors of the socket is not yet visible.
      */
     gtk_widget_realize (socket);
     g_print ("The ID of the sockets window is %x\n",
              gtk_socket_get_id (socket));

Note that if you pass the window ID of the socket to another process that will create a plug in the socket, you must make sure that the socket widget is not destroyed until that plug is created. Violating this rule will cause unpredictable consequences, the most likely consequence being that the plug will appear as a separate toplevel window. You can check if the plug has been created by examining the field of the <gtk-socket> structure. If this field is non-‘#f’, then the plug has been successfully created inside of the socket.

When GTK+ is notified that the embedded window has been destroyed, then it will destroy the socket as well. You should always, therefore, be prepared for your sockets to be destroyed at any time when the main event loop is running.

The communication between a <gtk-socket> and a <gtk-plug> follows the XEm-

bed (http://www.freedesktop.org/standards/xembed-spec) protocol. This protocol

has also been implemented in other toolkits, e.g. , allowing the same level of integration when embedding a widget in GTK or vice versa.

A socket can also be used to swallow arbitrary pre-existing top-level windows using gtksocket-steal, though the integration when this is done will not be as close as between a

<gtk-plug> and a <gtk-socket>.

The <gtk-plug> and <gtk-socket> widgets are currently not available on all platforms supported by GTK+.

141.2 Usage

[Class] <gtk-socket>
Derives from <gtk-container>.

This class defines no direct slots.

[Signal on <gtk-socket>] plug-added

This signal is emitted when a client is successfully added to the socket.

[Signal on <gtk-socket>] plug-removed ⇒ <gboolean>

This signal is emitted when a client 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 ‘#t’.

[Function] gtk-socket-new ⇒ (ret <gtk-widget>)

Create a new empty <gtk-socket>.

ret  the new <gtk-socket>.
[Function] gtk-socket-add-id (self <gtk-socket>) (window id unsigned-long)

[Method] add-id

Adds an XEMBED client, 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> with ‘gtk_plug_new (0)’, call gtk-plug-get-id to get the window ID of the plug,

and then pass that to the gtk-socket-add-id, or you can call gtk-socket-get-id

to get the window ID for the socket, and call gtk-plug-new passing in that ID. The <gtk-socket> must have already be added into a toplevel window before you can make this call.

socket  a <gtk-socket>

window-id the window ID of a client participating in the XEMBED protocol.

[Function] gtk-socket-get-id (self <gtk-socket>) ⇒ (ret unsigned-long)

[Method] get-id

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-new. The <gtk-socket> must have already be added into a toplevel window before you can make this call.

socket  a <gtk-socket>.

ret the window ID for the socket

142 GtkCurve

Allows direct editing of a curve

142.1 Overview

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it’s just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

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.

142.2 Usage

[Class] <gtk-curve>
Derives from <gtk-drawing-area>.

This class defines the following slots:

curve-type

Is this curve linear, spline interpolated, or free-form

min-x Minimum possible value for X

max-x Maximum possible X value

min-y Minimum possible value for Y

max-y Maximum possible value for Y

[Signal on <gtk-curve>] curve-type-changed

Emitted when the curve type has been changed. The curve type can be changed explicitly with a call to gtk-curve-set-curve-type. It is also changed as a side-

effect of calling gtk-curve-reset or gtk-curve-set-gamma.
[Function] gtk-curve-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-curve>.

ret  a new <gtk-curve>.
[Function] gtk-curve-reset (self <gtk-curve>)

[Method] reset

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.

curve  a <gtk-curve>.

[Function] gtk-curve-set-gamma (self <gtk-curve>) (gamma float)
[Method] set-gamma

Recomputes the entire curve using the given gamma value. A gamma value of 1 results in a straight line. Values greater than 1 result in a curve above the straight line. Values less than 1 result in a curve below the straight line. The curve type is changed to ‘GTK_CURVE_TYPE_FREE’. FIXME: Needs a more precise definition of gamma.

curve  a <gtk-curve>.

gamma the gamma value.

[Function] gtk-curve-set-range (self <gtk-curve>) (min x float)

(max x float) (min y float) (max y float)

[Method] set-range

Sets the minimum and maximum x and y values of the curve. The curve is also reset

with a call to gtk-curve-reset.
curve  a <gtk-curve>.

min-x the minimum x value.

max-x the maximum x value.

min-y the minimum y value.

max-y the maximum y value.

143 GtkGammaCurve

a subclass of for editing gamma curves.

143.1 Overview

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it’s just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

The <gtk-gamma-curve> widget is a variant of <gtk-curve> specifically for editing gamma curves, which are used in graphics applications such as the Gimp.

The <gtk-gamma-curve> 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.

143.2 Usage

[Class] <gtk-gamma-curve>

Derives from <gtk-vbox>.

This class defines no direct slots.

[Function] gtk-gamma-curve-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-gamma-curve>.
     ret  a new <gtk-gamma-curve>.

144 GtkRuler

Base class for horizontal or vertical rulers

144.1 Overview

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it’s just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

The GTKRuler widget is a base class for horizontal and vertical rulers. Rulers are used to show the mouse pointer’s location in a window. The ruler can either be horizontal or vertical on the window. Within the ruler a small triangle indicates the location of the mouse relative to the horizontal or vertical ruler. See <gtk-hruler> to learn how to create a new horizontal ruler. See <gtk-vruler> to learn how to create a new vertical ruler.

144.2 Usage

[Class] <gtk-ruler>
Derives from <gtk-widget>.

This class defines the following slots:

lower Lower limit of ruler

upper Upper limit of ruler

position Position of mark on the ruler

max-size Maximum size of the ruler

metric The metric used for the ruler

[Function] gtk-ruler-set-metric (self <gtk-ruler>)
   (metric <gtk-metric-type>)
[Method] set-metric

This calls the <gtk-metric-type> to set the ruler to units defined. Available units are GTK PIXELS, GTK INCHES, or GTK CENTIMETERS. The default unit of measurement is GTK PIXELS.

ruler the gtkruler

metric the unit of measurement

[Function] gtk-ruler-set-range (self <gtk-ruler>) (lower double)

(upper double) (position double) (max size double)

[Method] set-range

This sets the range of the ruler using gfloat lower, gfloat upper, gfloat position, and gfloat max size.

ruler the gtkruler

lower the lower limit of the ruler upper the upper limit of the ruler position the mark on the ruler max-size the maximum size of the ruler

[Function] gtk-ruler-get-metric (self <gtk-ruler>)
   ⇒ (ret <gtk-metric-type>)
[Method] get-metric
Gets the units used for a <gtk-ruler>. See gtk-ruler-set-metric.
ruler  a <gtk-ruler>

ret the units currently used for ruler

[Function] gtk-ruler-get-range (self <gtk-ruler>) ⇒ (lower double)

(upper double) (position double) (max size double)

[Method] get-range

Retrieves values indicating the range and current position of a <gtk-ruler>. See

gtk-ruler-set-range.
ruler  a <gtk-ruler>

lower location to store lower limit of the ruler, or ‘#f’ upper location to store upper limit of the ruler, or ‘#f’ position location to store the current position of the mark on the ruler, or ‘#f’ max-size location to store the maximum size of the ruler used when calculating the

space to leave for the text, or ‘#f’.

145 GtkHRuler

A horizontal ruler.

145.1 Overview

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it’s just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

The HRuler widget is a widget arranged horizontally creating a ruler that is utilized around other widgets such as a text widget. The ruler is used to show the location of the mouse on the window and to show the size of the window in specified units. The available units of measurement are GTK PIXELS, GTK INCHES and GTK CENTIMETERS. GTK PIXELS is the default. rulers.

145.2 Usage

[Class] <gtk-hruler>

Derives from <gtk-ruler>.

This class defines no direct slots.

[Function] gtk-hruler-new ⇒ (ret <gtk-widget>)

Creates a new horizontal ruler.

     ret  a new <gtk-hruler>.

146 GtkVRuler

A vertical ruler.

146.1 Overview

This widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it’s just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.

The VRuler widget is a widget arranged vertically creating a ruler that is utilized around other widgets such as a text widget. The ruler is used to show the location of the mouse on the window and to show the size of the window in specified units. The available units of measurement are GTK PIXELS, GTK INCHES and GTK CENTIMETERS. GTK PIXELS is the default. rulers.

146.2 Usage

[Class] <gtk-vruler>

Derives from <gtk-ruler>.

This class defines no direct slots.

[Function] gtk-vruler-new ⇒ (ret <gtk-widget>)

Creates a new vertical ruler

     ret  a new <gtk-vruler>.

147 GtkRecentManager

Managing Recently Used Files

147.1 Overview

<gtk-recent-manager> 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-recent-manager> acts like a database of all the recently used files. You can create new <gtk-recent-manager> objects, but it is more efficient to use the standard recent manager for the <gdk-screen> so that informations 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:

GtkRecentManager *manager;
manager = gtk_recent_manager_get_default ();
gtk_recent_manager_add_item (manager, file_uri);

GtkRecentManager *manager;
GtkRecentInfo *info;
GError *error = NULL;
manager = gtk_recent_manager_get_default ();
info = gtk_recent_manager_lookup_item (manager, file_uri, &error);
if (error)
  {
    g_warning ("Could not find the file: %s", error->message);
    g_error_free (error);
  }
else
  {
    /* Use the info object */
    gtk_recent_info_unref (info);
  }

Recently used files are supported since GTK+ 2.10.

147.2 Usage

[Class] <gtk-recent-manager>

Derives from <gobject>. This class defines the following slots: filename The full path to the file to be used to store and read the list

limit The maximum number of items to be returned by gtk recent manager get items()

size The size of the recently used resources list

[Signal on <gtk-recent-manager>] changed

Emitted when the current recently used resources manager changes its contents. Since 2.10

[Class] <gtk-recent-info>

Derives from <gboxed>. This class defines no direct slots.

[Function] gtk-recent-manager-new ⇒ (ret <gtk-recent-manager>)

Creates a new recent manager object. Recent manager objects are used to handle the list of recently used resources. A <gtk-recent-manager> object monitors the recently used resources list, and emits the "changed" signal each time something inside the list changes. <gtk-recent-manager> objects are expensive: be sure to create them only when

needed. You should use the gtk-recent-manager-new-for-screen or the gtk-
recent-manager-get-default functions instead.

ret A newly created <gtk-recent-manager> object.

Since 2.10

[Function] gtk-recent-manager-get-default ⇒ (ret <gtk-recent-manager>)

Gets the recent manager for the default screen. See gtk-recent-manager-get-for-

screen.

ret A unique <gtk-recent-manager> associated with the default screen. This recent manager is associated with the screen and can be used as long as the screen is open. Do not ref or unref it.

Since 2.10

[Function] gtk-recent-manager-get-for-screen (screen <gdk-screen>)
   ⇒ (ret <gtk-recent-manager>)

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 gtk-recent-manager-new and setting the screen yourself; by using this function a single recent manager object will be shared between users.

screen  a <gdk-screen>

ret A unique <gtk-recent-manager> 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. Do not ref or unref it.

Since 2.10

[Function] gtk-recent-manager-set-screen (self <gtk-recent-manager>)
   (screen <gdk-screen>)
[Method] set-screen

Sets the screen for a recent manager; the screen is used to track the user’s currently configured recently used documents storage.

manager a <gtk-recent-manager>
screen  a <gdk-screen>

Since 2.10

[Function] gtk-recent-manager-add-item (self <gtk-recent-manager>)

(uri mchars) ⇒ (ret bool)

[Method] add-item

Adds a new resource, pointed by uri, into the recently used resources list. This function automatically retrieving some of the needed metadata and setting other metadata to common default values; it then feeds the data to gtk-recent-manager-

add-full.

See gtk-recent-manager-add-full if you want to explicitely define the metadata for the resource pointed by uri.

manager a <gtk-recent-manager>

uri a valid URI

ret ‘#t’ if the new item was successfully added to the recently used resources list

Since 2.10

[Function] gtk-recent-manager-remove-item (self <gtk-recent-manager>)

(uri mchars) ⇒ (ret bool)

[Method] remove-item

Removes a resource pointed by uri from the recently used resources list handled by a recent manager.

manager a <gtk-recent-manager>

uri the URI of the item you wish to remove

error return location for a <g-error>, or ‘#f’

ret ‘#t’ if the item pointed by uri has been successfully removed by the recently used resources list, and ‘#f’ otherwise.

Since 2.10

[Function] gtk-recent-manager-lookup-item (self <gtk-recent-manager>)
   (uri mchars) ⇒ (ret <gtk-recent-info>)
[Method] lookup-item

Searches for a URI inside the recently used resources list, and returns a structure containing informations about the resource like its MIME type, or its display name.

manager a <gtk-recent-manager>

uri a URI

error a return location for a <g-error>, or ‘#f’

ret a <gtk-recent-info> structure containing information about the resource pointed by uri, or ‘#f’ if the URI was not registered in the recently used resources list. Free with gtk-recent-info-unref.

Since 2.10

[Function] gtk-recent-manager-has-item (self <gtk-recent-manager>)

(uri mchars) ⇒ (ret bool)

[Method] has-item

Checks whether there is a recently used resource registered with uri inside the recent manager.

manager a <gtk-recent-manager>

uri a URI

ret ‘#t’ if the resource was found, ‘#f’ otherwise.

Since 2.10

[Function] gtk-recent-manager-move-item (self <gtk-recent-manager>)

(uri mchars) (new uri mchars) ⇒ (ret bool)

[Method] move-item

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.

manager a <gtk-recent-manager>

uri the URI of a recently used resource

new-uri the new URI of the recently used resource, or ‘#f’ to remove the item pointed by uri in the list

error a return location for a <g-error>, or ‘#f’

ret ‘#t’ on success.

Since 2.10

[Function] gtk-recent-manager-get-limit (self <gtk-recent-manager>)

⇒ (ret int)

[Method] get-limit

Gets the maximum number of items that the gtk-recent-manager-get-items function should return.

manager a <gtk-recent-manager>

ret the number of items to return, or -1 for every item.

[Function] gtk-recent-manager-set-limit (self <gtk-recent-manager>)

(limit int)

[Method] set-limit

Sets the maximum number of item that the gtk-recent-manager-get-items function should return. If limit is set to -1, then return all the items.

manager a <gtk-recent-manager>

limit the maximum number of items to return, or -1.

Since 2.10

[Function] gtk-recent-manager-get-items (self <gtk-recent-manager>)
   ⇒ (ret glist-of)
[Method] get-items

Gets the list of recently used resources.

manager a <gtk-recent-manager>

ret a list of newly allocated <gtk-recent-info> objects. Use gtk-recent-info-unref on each item inside the list, and then free the list itself using

          g-list-free.

Since 2.10

[Function] gtk-recent-manager-purge-items (self <gtk-recent-manager>)

⇒ (ret int)

[Method] purge-items

Purges every item from the recently used resources list.

manager a <gtk-recent-manager>

error a return location for a <g-error>, or ‘#f’

ret the number of items that have been removed from the recently used resources list.

Since 2.10

[Function] gtk-recent-info-get-uri (self <gtk-recent-info>)
   ⇒ (ret mchars)

Gets the URI of the resource.

info  a <gtk-recent-info>

ret the URI of the resource. The returned string is owned by the recent manager, and should not be freed.

Since 2.10

[Function] gtk-recent-info-get-display-name (self <gtk-recent-info>)
   ⇒ (ret mchars)

Gets the name of the resource. If none has been defined, the basename of the resource is obtained.

info  a <gtk-recent-info>

ret the display name of the resource. The returned string is owned by the

recent manager, and should not be freed.

Since 2.10

[Function] gtk-recent-info-get-description (self <gtk-recent-info>)
   ⇒ (ret mchars)

Gets the (short) description of the resource.

info  a <gtk-recent-info>

ret the description of the resource. The returned string is owned by the

recent manager, and should not be freed.

Since 2.10

[Function] gtk-recent-info-get-mime-type (self <gtk-recent-info>)
   ⇒ (ret mchars)

Gets the MIME type of the resource.

info  a <gtk-recent-info>

ret the MIME type of the resource. The returned string is owned by the

recent manager, and should not be freed.

Since 2.10

[Function] gtk-recent-info-get-added (self <gtk-recent-info>)

⇒ (ret long) Gets the timestamp (seconds from system’s Epoch) when the resource was added to the recently used resources list.

info  a <gtk-recent-info>

ret the number of seconds elapsed from system’s Epoch when the resource

was added to the list, or -1 on failure.

Since 2.10

[Function] gtk-recent-info-get-modified (self <gtk-recent-info>)

⇒ (ret long) Gets the timestamp (seconds from system’s Epoch) when the resource was last modified.

info  a <gtk-recent-info>

ret the number of seconds elapsed from system’s Epoch when the resource

was last modified, or -1 on failure.

Since 2.10

[Function] gtk-recent-info-get-visited (self <gtk-recent-info>)

⇒ (ret long) Gets the timestamp (seconds from system’s Epoch) when the resource was last visited.

info  a <gtk-recent-info>

ret the number of seconds elapsed from system’s Epoch when the resource

was last visited, or -1 on failure.

Since 2.10

[Function] gtk-recent-info-get-private-hint (self <gtk-recent-info>)

⇒ (ret bool) Gets the value of the "private" flag. Resources in the recently used list that have this flag set to ‘#t’ should only be displayed by the applications that have registered them.

info  a <gtk-recent-info>

ret ‘#t’ if the private flag was found, ‘#f’ otherwise. Since 2.10

[Function] gtk-recent-info-last-application (self <gtk-recent-info>)
   ⇒ (ret mchars)

Gets the name of the last application that have registered the recently used resource represented by info.

info  a <gtk-recent-info>

ret an application name. Use g-free to free it. Since 2.10

[Function] gtk-recent-info-has-group (self <gtk-recent-info>)

(group name mchars) ⇒ (ret bool) Checks whether group-name appears inside the groups registered for the recently used item info.

info  a <gtk-recent-info>

group-name

name of a group

ret ‘#t’ if the group was found. Since 2.10

[Function] gtk-recent-info-has-application (self <gtk-recent-info>)

(app name mchars) ⇒ (ret bool) Checks whether an application registered this resource using app-name.

info  a <gtk-recent-info>

app-name a string containing an application name ret ‘#t’ if an application with name app-name was found, ‘#f’ otherwise. Since 2.10

[Function] gtk-recent-info-get-icon (self <gtk-recent-info>) (size int)
   ⇒ (ret <gdk-pixbuf>)

Retrieves the icon of size size associated to the resource MIME type.

info  a <gtk-recent-info>

size the size of the icon in pixels ret a <gdk-pixbuf> containing the icon, or ‘#f’. Since 2.10

[Function] gtk-recent-info-get-short-name (self <gtk-recent-info>)
   ⇒ (ret mchars)

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".

info  an <gtk-recent-info>

ret A newly-allocated string in UTF-8 encoding; free it with g-free. Since 2.10

[Function] gtk-recent-info-get-uri-display (self <gtk-recent-info>)
   ⇒ (ret mchars)

Gets a displayable version of the resource’s URI.

info  a <gtk-recent-info>

ret a UTF-8 string containing the resource’s URI or ‘#f’ Since 2.10

[Function] gtk-recent-info-get-age (self <gtk-recent-info>) ⇒ (ret int)

Gets the number of days elapsed since the last update of the resource pointed by info.

info  a <gtk-recent-info>

ret a positive integer containing the number of days elapsed since the time

this resource was last modified.

Since 2.10

[Function] gtk-recent-info-is-local (self <gtk-recent-info>) ⇒ (ret bool)

Checks whether the resource is local or not by looking at the scheme of its URI.

info  a <gtk-recent-info>

ret ‘#t’ if the resource is local. Since 2.10

[Function] gtk-recent-info-exists (self <gtk-recent-info>) ⇒ (ret bool)

Checks whether the resource pointed by info still exists. At the moment this check is done only on resources pointing to local files.

info  a <gtk-recent-info>

ret ‘#t’ if the resource exists Since 2.10

[Function] gtk-recent-info-match (self <gtk-recent-info>)
   (info b <gtk-recent-info>) ⇒ (ret bool)

Checks whether two <gtk-recent-info> structures point to the same resource.

info-a  a <gtk-recent-info>
info-b  a <gtk-recent-info>

ret ‘#t’ if both <gtk-recent-info> structures point to se same resource, ‘#f’

otherwise.

Since 2.10

148 GtkRecentChooser

Interface implemented by GtkRecentChooserWidget, GtkRecentChooserMenu and GtkRecentChooserDialog

148.1 Overview

<gtk-recent-chooser> is an interface that can be implemented by widgets displaying the list of recently used files. In GTK+, the main objects that implement this interface

are <gtk-recent-chooser-widget>, <gtk-recent-chooser-dialog> and <gtk-recent-
chooser-menu>.

Recently used files are supported since GTK+ 2.10.

148.2 Usage

[Class] <gtk-recent-chooser>
Derives from <ginterface>.

This class defines the following slots:

recent-manager

The RecentManager object to use

show-private

Whether the private items should be displayed

show-not-found

Whether the items pointing to unavailable resources should be displayed

show-tips

Whether there should be a tooltip on the item

show-icons

Whether there should be an icon near the item

sort-type

The sorting order of the items displayed

select-multiple

Whether to allow multiple items to be selected

filter The current filter for selecting which resources are displayed

limit The maximum number of items to be displayed

local-only

Whether the selected resource(s) should be limited to local file: URIs

[Signal on <gtk-recent-chooser>] selection-changed

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 explicitely calling functions to change the selection. Since 2.10

[Signal on <gtk-recent-chooser>] item-activated

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

Since 2.10

[Function] gtk-recent-chooser-set-show-private
   (self <gtk-recent-chooser>) (show private bool)
[Method] set-show-private

Whether to show recently used resources marked registered as private.

chooser  a <gtk-recent-chooser>

show-private ‘#t’ to show private items, ‘#f’ otherwise

Since 2.10

[Function] gtk-recent-chooser-get-show-private
   (self <gtk-recent-chooser>) ⇒ (ret bool)
[Method] get-show-private

Returns whether chooser should display recently used resources registered as private.

chooser  a <gtk-recent-chooser>

ret ‘#t’ if the recent chooser should show private items, ‘#f’ otherwise.

Since 2.10

[Function] gtk-recent-chooser-set-show-icons (self <gtk-recent-chooser>)

(show icons bool)

[Method] set-show-icons

Sets whether chooser should show an icon near the resource when displaying it.

chooser  a <gtk-recent-chooser>

show-icons whether to show an icon near the resource

Since 2.10

[Function] gtk-recent-chooser-get-show-icons (self <gtk-recent-chooser>)

⇒ (ret bool)

[Method] get-show-icons

Retrieves whether chooser should show an icon near the resource.

chooser  a <gtk-recent-chooser>

ret ‘#t’ if the icons should be displayed, ‘#f’ otherwise.

[Function] gtk-recent-chooser-set-local-only (self <gtk-recent-chooser>)

(local only bool)

[Method] set-local-only

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If local-only is ‘#t’ (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.

chooser  a <gtk-recent-chooser>

local-only ‘#t’ if only local files can be shown

Since 2.10

[Function] gtk-recent-chooser-get-local-only (self <gtk-recent-chooser>)

⇒ (ret bool)

[Method] get-local-only

Gets whether only local resources should be shown in the recently used resources

selector. See gtk-recent-chooser-set-local-only
chooser  a <gtk-recent-chooser>

ret ‘#t’ if only local resources should be shown.

Since 2.10

[Function] gtk-recent-chooser-set-limit (self <gtk-recent-chooser>)

(limit int)

[Method] set-limit

Sets the number of items that should be returned by gtk-recent-chooser-get-

items and gtk-recent-chooser-get-uris.
chooser  a <gtk-recent-chooser>

limit a positive integer, or -1 for all items

Since 2.10

[Function] gtk-recent-chooser-get-limit (self <gtk-recent-chooser>)

⇒ (ret int)

[Method] get-limit

Gets the number of items returned by gtk-recent-chooser-get-items and gtk-

recent-chooser-get-uris.
chooser  a <gtk-recent-chooser>

ret A positive integer, or -1 meaning that all items are returned.

Since 2.10

[Function] gtk-recent-chooser-set-show-tips (self <gtk-recent-chooser>)

(show tips bool)

[Method] set-show-tips

Sets whether to show a tooltips on the widget.

chooser  a <gtk-recent-chooser>

show-tips ‘#t’ if tooltips should be shown

Since 2.10

[Function] gtk-recent-chooser-get-show-tips (self <gtk-recent-chooser>)

⇒ (ret bool)

[Method] get-show-tips

Gets whether chooser should display tooltips.

chooser  a <gtk-recent-chooser>

ret ‘#t’ if the recent chooser should show tooltips, ‘#f’ otherwise.

Since 2.10

[Function] gtk-recent-chooser-set-show-numbers
   (self <gtk-recent-chooser>) (show numbers bool)
[Method] set-show-numbers

Whether to show recently used resources prepended by a unique number.

Do not use this function: use gtk-recent-chooser-menu-set-show-numbers in-

stead.

chooser  a <gtk-recent-chooser>

show-numbers ‘#t’ to show numbers, ‘#f’ otherwise

Since 2.10

[Function] gtk-recent-chooser-get-show-numbers
   (self <gtk-recent-chooser>) ⇒ (ret bool)
[Method] get-show-numbers

Returns whether chooser should display recently used resources prepended by a unique number.

Do not use this function: use gtk-recent-chooser-menu-get-show-numbers in-

stead.

chooser  a <gtk-recent-chooser>

ret ‘#t’ if the recent chooser should show display numbers, ‘#f’ otherwise.

Since 2.10

[Function] gtk-recent-chooser-set-sort-type (self <gtk-recent-chooser>)
   (sort type <gtk-recent-sort-type>)
[Method] set-sort-type

Changes the sorting order of the recently used resources list displayed by chooser.

chooser  a <gtk-recent-chooser>

sort-type sort order that the chooser should use

[Function] gtk-recent-chooser-get-sort-type (self <gtk-recent-chooser>)
   ⇒ (ret <gtk-recent-sort-type>)
[Method] get-sort-type
Gets the value set by gtk-recent-chooser-set-sort-type.
chooser  a <gtk-recent-chooser>

ret the sorting order of the chooser.

Since 2.10

[Function] gtk-recent-chooser-set-current-uri
   (self <gtk-recent-chooser>) (uri mchars) ⇒ (ret bool)
[Method] set-current-uri

Sets uri as the current URI for chooser.

chooser  a <gtk-recent-chooser>

uri a URI

error return location for a <g-error>, or ‘#f’

ret ‘#t’ if the URI was found.

Since 2.10

[Function] gtk-recent-chooser-get-current-uri
   (self <gtk-recent-chooser>) ⇒ (ret mchars)
[Method] get-current-uri

Gets the URI currently selected by chooser.

chooser  a <gtk-recent-chooser>

ret a newly allocated string holding a URI.

Since 2.10

[Function] gtk-recent-chooser-get-current-item
   (self <gtk-recent-chooser>) ⇒ (ret <gtk-recent-info>)
[Method] get-current-item

Gets the <gtk-recent-info> currently selected by chooser.

chooser  a <gtk-recent-chooser>
ret  a <gtk-recent-info>. Use gtk-recent-info-unref when when you

have finished using it.

Since 2.10

[Function] gtk-recent-chooser-select-uri (self <gtk-recent-chooser>)

(uri mchars) ⇒ (ret bool)

[Method] select-uri

Selects uri inside chooser.

chooser  a <gtk-recent-chooser>

uri a URI error return location for a <g-error>, or ‘#f’

ret ‘#t’ if uri was found.

Since 2.10

[Function] gtk-recent-chooser-unselect-uri (self <gtk-recent-chooser>)
   (uri mchars)
[Method] unselect-uri

Unselects uri inside chooser.

chooser  a <gtk-recent-chooser>

uri a URI

Since 2.10

[Function] gtk-recent-chooser-select-all (self <gtk-recent-chooser>)
[Method] select-all

Selects all the items inside chooser, if the chooser supports multiple selection.

chooser  a <gtk-recent-chooser>

Since 2.10

[Function] gtk-recent-chooser-unselect-all (self <gtk-recent-chooser>)
[Method] unselect-all

Unselects all the items inside chooser.

chooser  a <gtk-recent-chooser>

Since 2.10

[Function] gtk-recent-chooser-get-items (self <gtk-recent-chooser>)
   ⇒ (ret glist-of)
[Method] get-items

Gets the list of recently used resources in form of <gtk-recent-info> objects. The return value of this function is affected by the "sort-type" and "limit" properties of chooser.

chooser  a <gtk-recent-chooser>

ret A newly allocated list of <gtk-recent-info> objects. You should use gtk-recent-info-unref on every item of the list, and then free the list itself using g-list-free.

Since 2.10

[Function] gtk-recent-chooser-add-filter (self <gtk-recent-chooser>)
   (filter <gtk-recent-filter>)
[Method] add-filter

Adds filter to the list of <gtk-recent-filter> objects held by chooser. If no previous filter objects were defined, this function will call gtk-recent-chooser-

set-filter.

chooser  a <gtk-recent-chooser>
filter  a <gtk-recent-filter>

Since 2.10

[Function] gtk-recent-chooser-remove-filter (self <gtk-recent-chooser>)
   (filter <gtk-recent-filter>)
[Method] remove-filter

Removes filter from the list of <gtk-recent-filter> objects held by chooser.

chooser  a <gtk-recent-chooser>
filter  a <gtk-recent-filter>

Since 2.10

[Function] gtk-recent-chooser-list-filters (self <gtk-recent-chooser>)
   ⇒ (ret gslist-of)
[Method] list-filters

Gets the <gtk-recent-filter> objects held by chooser.

chooser  a <gtk-recent-chooser>

ret A singly linked list of <gtk-recent-filter> objects. You should just free the returned list using g-slist-free.

Since 2.10

[Function] gtk-recent-chooser-set-filter (self <gtk-recent-chooser>)
   (filter <gtk-recent-filter>)
[Method] set-filter

Sets filter as the current <gtk-recent-filter> object used by chooser to affect the displayed recently used resources.

chooser  a <gtk-recent-chooser>
filter  a <gtk-recent-filter>

Since 2.10

[Function] gtk-recent-chooser-get-filter (self <gtk-recent-chooser>)
   ⇒ (ret <gtk-recent-filter>)
[Method] get-filter

Gets the <gtk-recent-filter> object currently used by chooser to affect the display of the recently used resources.

chooser  a <gtk-recent-chooser>
ret  a <gtk-recent-filter> object.

Since 2.10

149 GtkRecentChooserDialog

Displays recently used files in a dialog

149.1 Overview

<gtk-recent-chooser-dialog> is a dialog box suitable for displaying the recently used documents. This widgets works by putting a <gtk-recent-chooser-widget> inside a

<gtk-dialog>. It exposes the <gtk-recent-chooser-iface> interface, so you can use

all the <gtk-recent-chooser> functions on the recent chooser dialog as well as those for

<gtk-dialog>.

Note that <gtk-recent-chooser-dialog> does not have any methods of its own. Instead, you should use the functions that work on a <gtk-recent-chooser>.

In the simplest of cases, you can use the following code to use a <gtk-recent-chooser-dialog> to select a recently used file:

GtkWidget *dialog;
dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
parent_window,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
  {
    GtkRecentInfo *info;
    info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (dialog));
    open_file (gtk_recent_info_get_uri (info));
    gtk_recent_info_unref (info);
  }
gtk_widget_destroy (dialog);

Recently used files are supported since GTK+ 2.10.

149.2 Usage

[Class] <gtk-recent-chooser-dialog>
Derives from <gtk-recent-chooser>, <gtk-dialog>.

This class defines no direct slots.

150 GtkRecentChooserMenu

Displays recently used files in a menu

150.1 Overview

<gtk-recent-chooser-menu> is a widget suitable for displaying recently used files inside a menu. It can be used to set a sub-menu of a <gtk-menu-item> using gtk-menu-item-set-

submenu, or as the menu of a <gtk-menu-tool-button>.

Note that <gtk-recent-chooser-menu> does not have any methods of its own. Instead, you should use the functions that work on a <gtk-recent-chooser>.

Note also that <gtk-recent-chooser-menu> does not support multiple filters, as it has no way to let the user choose between them as the <gtk-recent-chooser-widget>

and <gtk-recent-chooser-dialog> widgets do. Thus using gtk-recent-chooser-add-

filter on a <gtk-recent-chooser-menu> widget will yield the same effects as using gtkrecent-chooser-set-filter, replacing any currently set filter with the supplied filter;

gtk-recent-chooser-remove-filter will remove any currently set <gtk-recent-filter>

object and will unset the current filter; gtk-recent-chooser-list-filters will return a list containing a single <gtk-recent-filter> object.

Recently used files are supported since GTK+ 2.10.

150.2 Usage

[Class] <gtk-recent-chooser-menu>
     Derives from <gtk-recent-chooser>, <gtk-menu>.

This class defines the following slots:

     show-numbers

Whether the items should be displayed with a number

[Function] gtk-recent-chooser-menu-new ⇒ (ret <gtk-widget>)
     Creates a new <gtk-recent-chooser-menu> widget.

This kind of widget shows the list of recently used resources as a menu, each item as a menu item. Each item inside the menu might have an icon, representing its MIME type, and a number, for mnemonic access. This widget implements the <gtk-recent-chooser> interface. This widget creates its own <gtk-recent-manager> object. See the gtk-recent-

     chooser-menu-new-for-manager function to know how to create a <gtk-recent-
     chooser-menu> widget bound to another <gtk-recent-manager> object.
     ret  a new <gtk-recent-chooser-menu>

Since 2.10

151 GtkRecentChooserWidget

Displays recently used files

151.1 Overview

<gtk-recent-chooser-widget> is a widget suitable for selecting recently used files. It is the main building block of a <gtk-recent-chooser-dialog>. Most applications will only need to use the latter; you can use <gtk-recent-chooser-widget> as part of a larger window if you have special needs.

Note that <gtk-recent-chooser-widget> does not have any methods of its own. Instead, you should use the functions that work on a <gtk-recent-chooser>.

Recently used files are supported since GTK+ 2.10.

151.2 Usage

[Class] <gtk-recent-chooser-widget>
     Derives from <gtk-recent-chooser>, <gtk-vbox>.

This class defines no direct slots.

[Function] gtk-recent-chooser-widget-new ⇒ (ret <gtk-widget>)

Creates a new <gtk-recent-chooser-widget> object. This is an embeddable widget used to access the recently used resources list.

     ret  a new <gtk-recent-chooser-widget>

Since 2.10

152 GtkRecentFilter

A filter for selecting a subset of recently used files

152.1 Overview

A <gtk-recent-filter> can be used to restrict the files being shown in a <gtk-recent-chooser>. Files can be filtered based on their name (with gtk-recent-filter-add-pattern), on their mime type (with gtk-file-filter-add-mime-type), on the application that has registered them (with gtk-recent-filter-add-application), or by a custom fil-

ter function (with gtk-recent-filter-add-custom).

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-recent-filter> 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-recent-chooser>, see gtk-recent-chooser-add-filter, but it is also possible to manually use a filter on a file with gtk-

recent-filter-filter.

Recently used files are supported since GTK+ 2.10.

152.2 Usage

[Class] <gtk-recent-filter>
Derives from <gtk-object>.

This class defines no direct slots.

[Function] gtk-recent-filter-new ⇒ (ret <gtk-recent-filter>)

Creates a new <gtk-recent-filter> with no rules added to it. Such filter does not accept any recently used resources, so is not particularly useful until you add rules

with gtk-recent-filter-add-pattern, gtk-recent-filter-add-mime-type, gtk-
recent-filter-add-application, gtk-recent-filter-add-age. To create a filter

that accepts any recently used resource, use:

     GtkRecentFilter *filter = gtk_recent_filter_new ();
     gtk_recent_filter_add_pattern (filter, "*");
ret  a new <gtk-recent-filter>

Since 2.10

[Function] gtk-recent-filter-get-name (self <gtk-recent-filter>)
   ⇒ (ret mchars)
[Method] get-name

Gets the human-readable name for the filter. See gtk-recent-filter-set-name.

filter  a <gtk-recent-filter>

ret the name of the filter, or ‘#f’. The returned string is owned by the filter object and should not be freed.

Since 2.10

[Function] gtk-recent-filter-set-name (self <gtk-recent-filter>)
   (name mchars)
[Method] set-name

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.

filter  a <gtk-recent-filter>

name then human readable name of filter

Since 2.10

[Function] gtk-recent-filter-add-mime-type (self <gtk-recent-filter>)

(mime type mchars)

[Method] add-mime-type

Adds a rule that allows resources based on their registered MIME type.

filter  a <gtk-recent-filter>

mime-type a MIME type

Since 2.10

[Function] gtk-recent-filter-add-pattern (self <gtk-recent-filter>)

(pattern mchars)

[Method] add-pattern

Adds a rule that allows resources based on a pattern matching their display name.

filter  a <gtk-recent-filter>

pattern a file pattern

Since 2.10

[Function] gtk-recent-filter-add-application (self <gtk-recent-filter>)

(application mchars)

[Method] add-application

Adds a rule that allows resources based on the name of the application that has registered them.

filter  a <gtk-recent-filter>

application an application name

Since 2.10

[Function] gtk-recent-filter-add-group (self <gtk-recent-filter>)

(group mchars)

[Method] add-group

Adds a rule that allows resources based on the name of the group to which they belong

filter  a <gtk-recent-filter>

group a group name

Since 2.10

[Function] gtk-recent-filter-add-age (self <gtk-recent-filter>) (days int)

[Method] add-age

Adds a rule that allows resources based on their age - that is, the number of days elapsed since they were last modified.

filter  a <gtk-recent-filter>

days number of days

Since 2.10

[Function] gtk-recent-filter-get-needed (self <gtk-recent-filter>)
   ⇒ (ret <gtk-recent-filter-flags>)
[Method] get-needed

Gets the fields that need to be filled in for the structure passed to gtk-recent-

filter-filter

This function will not typically be used by applications; it is intended principally for use in the implementation of <gtk-recent-chooser>.

filter  a <gtk-recent-filter>

ret bitfield of flags indicating needed fields when calling gtk-recent-

          filter-filter

Since 2.10

153 Undocumented

The following symbols, if any, have not been properly documented.

153.1 (gnome gtk)

[Class] <guile-gtk-tree-model>
[Generic] create-tag
[Method] create-tag (buffer <gtk-text-buffer>) (tag-name <top>)
        (properties <top>)...

[Function] gtk-stock-id nick

[Function] gtk-text-buffer-create-tag buffer tag-name . properties

[Function] gtk-tree-or-list-store-set store iter . args
[Generic] on-get-column-type
[Generic] on-get-flags
[Method] on-get-flags (obj <guile-gtk-generic-tree-model>)
[Generic] on-get-iter
[Generic] on-get-n-columns
[Generic] on-get-path
[Generic] on-get-value
[Generic] on-iter-children
[Generic] on-iter-has-child
[Generic] on-iter-n-children
[Generic] on-iter-next
[Generic] on-iter-nth-child
[Generic] on-iter-parent

153.2 (gnome gw gtk)

[Function] %gtk-message-dialog-new
[Variable] <gtk-binding-set*>
[Variable] <gtk-radio-group*>
[Class] <guile-gtk-generic-tree-model>
[Variable] gtk-accel-group-activate
[Variable] gtk-accel-group-connect
[Variable] gtk-accel-group-connect-by-path
[Variable] gtk-accel-group-disconnect

[Variable] gtk-accel-group-disconnect-key
[Variable] gtk-accel-group-from-accel-closure
[Variable] gtk-accel-group-lock
[Variable] gtk-accel-group-new
[Variable] gtk-accel-group-unlock
[Variable] gtk-accel-groups-activate
[Function] gtk-accel-groups-from-object
[Variable] gtk-accel-map-add-entry
[Variable] gtk-accel-map-add-filter
[Variable] gtk-accel-map-change-entry
[Variable] gtk-accel-map-get
[Variable] gtk-accel-map-load
[Variable] gtk-accel-map-load-fd
[Variable] gtk-accel-map-lock-path
[Variable] gtk-accel-map-save
[Variable] gtk-accel-map-save-fd
[Variable] gtk-accel-map-unlock-path
[Variable] gtk-accelerator-get-default-mod-mask
[Variable] gtk-accelerator-get-label
[Variable] gtk-accelerator-name
[Variable] gtk-accelerator-set-default-mod-mask
[Variable] gtk-accelerator-valid
[Variable] gtk-accessible-connect-widget-destroyed
[Variable] gtk-action-group-add-action-with-accel
[Variable] gtk-action-group-set-translation-domain
[Variable] gtk-border-copy
[Variable] gtk-border-free
[Variable] gtk-calendar-get-display-options
[Variable] gtk-cell-renderer-text-set-fixed-height-from-font
[Variable] gtk-check-menu-item-get-draw-as-radio
[Variable] gtk-check-menu-item-get-inconsistent
[Variable] gtk-check-menu-item-new-with-mnemonic
[Variable] gtk-check-menu-item-set-draw-as-radio

[Variable] gtk-check-menu-item-set-inconsistent
[Variable] gtk-check-version
[Variable] gtk-clipboard-clear
[Variable] gtk-clipboard-get
[Variable] gtk-clipboard-get-display
[Variable] gtk-clipboard-get-for-display
[Variable] gtk-clipboard-get-owner
[Variable] gtk-clipboard-set-image
[Variable] gtk-clipboard-set-text
[Variable] gtk-clipboard-store
[Variable] gtk-clipboard-wait-for-contents
[Variable] gtk-clipboard-wait-for-image
[Variable] gtk-clipboard-wait-for-text
[Variable] gtk-clipboard-wait-is-image-available
[Variable] gtk-clipboard-wait-is-rich-text-available
[Variable] gtk-clipboard-wait-is-target-available
[Variable] gtk-clipboard-wait-is-text-available
[Variable] gtk-color-selection-dialog-get-cancel-button
[Variable] gtk-color-selection-dialog-get-colorsel
[Variable] gtk-color-selection-dialog-get-help-button
[Variable] gtk-color-selection-dialog-get-ok-button
[Variable] gtk-color-selection-get-current-alpha
[Variable] gtk-color-selection-get-current-color
[Variable] gtk-color-selection-get-has-opacity-control
[Variable] gtk-color-selection-get-previous-alpha
[Variable] gtk-color-selection-get-previous-color
[Variable] gtk-color-selection-palette-to-string
[Variable] gtk-color-selection-set-current-alpha
[Variable] gtk-color-selection-set-current-color
[Variable] gtk-color-selection-set-has-opacity-control
[Variable] gtk-color-selection-set-previous-alpha
[Variable] gtk-color-selection-set-previous-color
[Variable] gtk-combo-box-get-column-span-column

[Variable] gtk-combo-box-set-column-span-column
[Variable] gtk-container-set-reallocate-redraws
[Variable] gtk-dialog-get-action-area
[Variable] gtk-dialog-get-vbox
[Variable] gtk-disable-setlocale
[Variable] gtk-drag-check-threshold
[Variable] gtk-drag-dest-add-image-targets
[Variable] gtk-drag-dest-add-text-targets
[Variable] gtk-drag-dest-add-uri-targets
[Variable] gtk-drag-dest-get-track-motion
[Function] gtk-drag-dest-set
[Variable] gtk-drag-dest-set-proxy
[Variable] gtk-drag-dest-set-track-motion
[Variable] gtk-drag-dest-unset
[Function] gtk-drag-finish
[Function] gtk-drag-get-data
[Variable] gtk-drag-get-source-widget
[Variable] gtk-drag-highlight
[Variable] gtk-drag-set-icon-default
[Variable] gtk-drag-set-icon-name
[Variable] gtk-drag-set-icon-pixbuf
[Variable] gtk-drag-set-icon-pixmap
[Variable] gtk-drag-set-icon-stock
[Variable] gtk-drag-set-icon-widget
[Variable] gtk-drag-source-add-image-targets
[Variable] gtk-drag-source-add-text-targets
[Variable] gtk-drag-source-add-uri-targets
[Function] gtk-drag-source-set-icon
[Variable] gtk-drag-source-set-icon-name
[Variable] gtk-drag-source-set-icon-pixbuf
[Variable] gtk-drag-source-set-icon-stock
[Variable] gtk-drag-source-unset
[Variable] gtk-drag-unhighlight

[Variable] gtk-draw-insertion-cursor
[Variable] gtk-entry-completion-get-inline-completion
[Variable] gtk-entry-completion-get-minimum-key-length
[Variable] gtk-entry-completion-get-popup-completion
[Variable] gtk-entry-completion-get-popup-set-width
[Variable] gtk-entry-completion-get-popup-single-match
[Variable] gtk-entry-completion-get-text-column
[Variable] gtk-entry-completion-insert-action-markup
[Variable] gtk-entry-completion-insert-action-text
[Variable] gtk-entry-completion-set-inline-completion
[Variable] gtk-entry-completion-set-minimum-key-length
[Variable] gtk-entry-completion-set-popup-completion
[Variable] gtk-entry-completion-set-popup-set-width
[Variable] gtk-entry-completion-set-popup-single-match
[Variable] gtk-entry-completion-set-text-column
[Variable] gtk-entry-layout-index-to-text-index
[Variable] gtk-entry-text-index-to-layout-index
[Variable] gtk-events-pending

[Variable] gtk-false

[Function] gtk-file-chooser-add-shortcut-folder
[Function] gtk-file-chooser-add-shortcut-folder-uri
[Variable] gtk-file-chooser-button-get-focus-on-click
[Variable] gtk-file-chooser-button-get-width-chars
[Variable] gtk-file-chooser-button-new-with-backend
[Variable] gtk-file-chooser-button-new-with-dialog
[Variable] gtk-file-chooser-button-set-focus-on-click
[Variable] gtk-file-chooser-button-set-width-chars
[Variable] gtk-file-chooser-error-quark
[Variable] gtk-file-chooser-get-current-folder-uri
[Variable] gtk-file-chooser-get-do-overwrite-confirmation
[Variable] gtk-file-chooser-get-preview-filename
[Variable] gtk-file-chooser-get-preview-widget-active
[Variable] gtk-file-chooser-get-select-multiple

[Variable] gtk-file-chooser-get-use-preview-label
[Function] gtk-file-chooser-list-shortcut-folder-uris
[Function] gtk-file-chooser-list-shortcut-folders
[Function] gtk-file-chooser-remove-shortcut-folder
[Function] gtk-file-chooser-remove-shortcut-folder-uri
[Variable] gtk-file-chooser-set-current-folder-uri
[Variable] gtk-file-chooser-set-do-overwrite-confirmation
[Variable] gtk-file-chooser-set-preview-widget-active
[Variable] gtk-file-chooser-set-select-multiple
[Variable] gtk-file-chooser-set-use-preview-label
[Variable] gtk-file-chooser-widget-new-with-backend
[Variable] gtk-file-selection-get-select-multiple
[Variable] gtk-file-selection-hide-fileop-buttons
[Variable] gtk-file-selection-set-select-multiple
[Variable] gtk-file-selection-show-fileop-buttons
[Variable] gtk-file-selection:cancel-button
[Variable] gtk-file-selection:ok-button
[Variable] gtk-font-selection-dialog-get-font-name
[Variable] gtk-font-selection-dialog-get-preview-text
[Variable] gtk-font-selection-dialog-set-font-name
[Variable] gtk-font-selection-dialog-set-preview-text
[Variable] gtk-get-current-event-time
[Variable] gtk-get-default-language
[Variable] gtk-grab-add
[Variable] gtk-grab-get-current
[Variable] gtk-grab-remove
[Variable] gtk-icon-factory-add
[Variable] gtk-icon-factory-add-default
[Variable] gtk-icon-factory-lookup
[Variable] gtk-icon-factory-lookup-default
[Variable] gtk-icon-factory-new
[Variable] gtk-icon-factory-remove-default
[Variable] gtk-icon-set-add-source

[Variable] gtk-icon-set-copy
[Variable] gtk-icon-set-new
[Variable] gtk-icon-set-new-from-pixbuf
[Variable] gtk-icon-set-render-icon
[Variable] gtk-icon-size-from-name
[Variable] gtk-icon-size-get-name
[Function] gtk-icon-size-lookup
[Function] gtk-icon-size-lookup-for-settings
[Variable] gtk-icon-size-register
[Variable] gtk-icon-size-register-alias
[Variable] gtk-icon-source-copy
[Variable] gtk-icon-source-get-direction
[Variable] gtk-icon-source-get-direction-wildcarded
[Variable] gtk-icon-source-get-filename
[Variable] gtk-icon-source-get-icon-name
[Variable] gtk-icon-source-get-pixbuf
[Variable] gtk-icon-source-get-size
[Variable] gtk-icon-source-get-size-wildcarded
[Variable] gtk-icon-source-get-state
[Variable] gtk-icon-source-get-state-wildcarded
[Variable] gtk-icon-source-new
[Variable] gtk-icon-source-set-direction
[Variable] gtk-icon-source-set-direction-wildcarded
[Variable] gtk-icon-source-set-filename
[Variable] gtk-icon-source-set-icon-name
[Variable] gtk-icon-source-set-pixbuf
[Variable] gtk-icon-source-set-size
[Variable] gtk-icon-source-set-size-wildcarded
[Variable] gtk-icon-source-set-state
[Variable] gtk-icon-source-set-state-wildcarded
[Variable] gtk-icon-theme-add-builtin-icon
[Variable] gtk-icon-theme-append-search-path
[Variable] gtk-icon-theme-error-quark

[Variable] gtk-icon-theme-get-default
[Variable] gtk-icon-theme-get-example-icon-name
[Variable] gtk-icon-theme-get-for-screen
[Variable] gtk-icon-theme-has-icon
[Function] gtk-icon-theme-list-icons
[Function] gtk-icon-theme-load-icon
[Variable] gtk-icon-theme-new
[Variable] gtk-icon-theme-prepend-search-path
[Variable] gtk-icon-theme-rescan-if-needed
[Variable] gtk-icon-theme-set-custom-theme
[Variable] gtk-icon-theme-set-screen
[Variable] gtk-icon-view-unset-model-drag-source
[Variable] gtk-im-multicontext-append-menuitems
[Variable] gtk-image-menu-item-new-with-mnemonic

[Variable] gtk-main

[Variable] gtk-main-do-event
[Variable] gtk-main-iteration
[Function] gtk-main-iteration-do
[Variable] gtk-main-level
[Variable] gtk-main-quit
[Variable] gtk-menu-bar-get-child-pack-direction
[Variable] gtk-menu-bar-set-child-pack-direction
[Variable] gtk-menu-tool-button-set-arrow-tooltip
[Variable] gtk-page-setup-set-paper-size-and-default-margins
[Variable] gtk-paint-arrow
[Variable] gtk-paint-box
[Variable] gtk-paint-box-gap
[Variable] gtk-paint-check
[Variable] gtk-paint-diamond
[Variable] gtk-paint-expander
[Variable] gtk-paint-extension
[Variable] gtk-paint-flat-box
[Variable] gtk-paint-focus

[Variable] gtk-paint-handle
[Variable] gtk-paint-hline
[Variable] gtk-paint-layout
[Variable] gtk-paint-option
[Variable] gtk-paint-resize-grip
[Variable] gtk-paint-shadow
[Variable] gtk-paint-shadow-gap
[Variable] gtk-paint-slider
[Variable] gtk-paint-tab
[Variable] gtk-paint-vline
[Variable] gtk-paper-size-get-default-bottom-margin
[Variable] gtk-paper-size-get-default-left-margin
[Variable] gtk-paper-size-get-default-right-margin
[Variable] gtk-paper-size-get-default-top-margin
[Variable] gtk-print-context-create-pango-context
[Variable] gtk-print-context-create-pango-layout
[Variable] gtk-print-error-quark
[Variable] gtk-print-operation-get-default-page-setup
[Variable] gtk-print-operation-get-print-settings
[Variable] gtk-print-operation-get-status-string
[Variable] gtk-print-operation-preview-end-preview
[Variable] gtk-print-operation-preview-is-selected
[Variable] gtk-print-operation-preview-render-page
[Variable] gtk-print-operation-set-current-page
[Variable] gtk-print-operation-set-custom-tab-label
[Variable] gtk-print-operation-set-default-page-setup
[Variable] gtk-print-operation-set-export-filename
[Variable] gtk-print-operation-set-print-settings
[Variable] gtk-print-operation-set-show-progress
[Variable] gtk-print-operation-set-track-print-status
[Variable] gtk-print-operation-set-use-full-page
[Variable] gtk-print-settings-get-default-source
[Variable] gtk-print-settings-get-double-with-default

[Variable] gtk-print-settings-get-int-with-default
[Variable] gtk-print-settings-set-default-source
[Variable] gtk-progress-bar-get-orientation
[Variable] gtk-propagate-event
[Variable] gtk-radio-button-new-with-label-from-widget
[Variable] gtk-radio-button-new-with-mnemonic-from-widget
[Variable] gtk-radio-menu-item-new-with-label-from-widget
[Variable] gtk-radio-menu-item-new-with-mnemonic
[Variable] gtk-radio-menu-item-new-with-mnemonic-from-widget
[Function] gtk-radio-tool-button-new-from-stock
[Variable] gtk-radio-tool-button-new-from-widget
[Variable] gtk-radio-tool-button-new-with-stock-from-widget
[Variable] gtk-range-get-lower-stepper-sensitivity
[Variable] gtk-range-get-upper-stepper-sensitivity
[Variable] gtk-range-set-lower-stepper-sensitivity
[Variable] gtk-range-set-upper-stepper-sensitivity
[Variable] gtk-rc-add-default-file
[Variable] gtk-rc-find-module-in-path
[Variable] gtk-rc-get-im-module-file
[Variable] gtk-rc-get-im-module-path
[Variable] gtk-rc-get-module-dir
[Variable] gtk-rc-get-style
[Function] gtk-rc-get-style-by-paths
[Variable] gtk-rc-get-theme-dir
[Variable] gtk-rc-parse
[Variable] gtk-rc-parse-string
[Variable] gtk-rc-property-parse-border
[Variable] gtk-rc-property-parse-color
[Variable] gtk-rc-property-parse-enum
[Variable] gtk-rc-property-parse-flags
[Variable] gtk-rc-property-parse-requisition
[Variable] gtk-rc-reparse-all
[Variable] gtk-rc-reparse-all-for-settings

[Variable] gtk-rc-reset-styles
[Function] gtk-rc-set-default-files
[Variable] gtk-rc-style-copy
[Variable] gtk-rc-style-new
[Variable] gtk-recent-chooser-error-quark
[Variable] gtk-recent-chooser-get-select-multiple
[Variable] gtk-recent-chooser-get-show-not-found
[Variable] gtk-recent-chooser-menu-get-show-numbers
[Variable] gtk-recent-chooser-menu-new-for-manager
[Variable] gtk-recent-chooser-menu-set-show-numbers
[Variable] gtk-recent-chooser-set-select-multiple
[Variable] gtk-recent-chooser-set-show-not-found
[Variable] gtk-recent-chooser-widget-new-for-manager
[Variable] gtk-recent-filter-add-pixbuf-formats
[Function] gtk-recent-info-get-application-info
[Variable] gtk-recent-manager-error-quark
[Variable] gtk-ruler-draw-pos
[Variable] gtk-ruler-draw-ticks
[Variable] gtk-scrolled-window-add-with-viewport
[Variable] gtk-selection-add-target
[Variable] gtk-selection-clear-targets
[Function] gtk-selection-convert
[Variable] gtk-selection-data-get-as-string
[Variable] gtk-selection-data-get-pixbuf
[Variable] gtk-selection-data-set-pixbuf
[Variable] gtk-selection-data-set-text
[Variable] gtk-selection-data-targets-include-image
[Variable] gtk-selection-data-targets-include-rich-text
[Variable] gtk-selection-data-targets-include-text
[Variable] gtk-selection-data-targets-include-uri
[Function] gtk-selection-owner-set
[Function] gtk-selection-owner-set-for-display
[Variable] gtk-selection-remove-all

[Variable] gtk-settings-get-default
[Variable] gtk-settings-get-for-screen
[Variable] gtk-settings-install-property
[Variable] gtk-settings-set-double-property
[Variable] gtk-settings-set-long-property
[Variable] gtk-settings-set-string-property
[Variable] gtk-spin-button-get-update-policy
[Variable] gtk-stock-add
[Variable] gtk-stock-add-static
[Variable] gtk-stock-item-copy
[Function] gtk-stock-list-ids
[Variable] gtk-stock-lookup
[Variable] gtk-style-apply-default-background
[Variable] gtk-style-attach
[Variable] gtk-style-copy
[Variable] gtk-style-detach
[Variable] gtk-style-get-bg-gc
[Variable] gtk-style-get-black-gc
[Variable] gtk-style-get-fg-gc
[Variable] gtk-style-get-white-gc
[Variable] gtk-style-lookup-color
[Variable] gtk-style-lookup-icon-set
[Variable] gtk-style-new
[Variable] gtk-style-render-icon
[Variable] gtk-style-set-background
[Variable] gtk-text-buffer-add-selection-clipboard
[Variable] gtk-text-buffer-deserialize-get-can-create-tags
[Variable] gtk-text-buffer-deserialize-set-can-create-tags
[Variable] gtk-text-buffer-get-iter-at-child-anchor
[Variable] gtk-text-buffer-get-iter-at-line-index
[Variable] gtk-text-buffer-get-iter-at-line-offset
[Variable] gtk-text-buffer-get-selection-bounds
[Variable] gtk-text-buffer-insert-interactive-at-cursor

[Variable] gtk-text-buffer-insert-range-interactive
[Function] gtk-text-buffer-insert-with-tags-by-name
[Variable] gtk-text-buffer-register-deserialize-tagset
[Variable] gtk-text-buffer-register-serialize-tagset
[Variable] gtk-text-buffer-remove-selection-clipboard
[Variable] gtk-text-iter-backward-cursor-position
[Variable] gtk-text-iter-backward-cursor-positions
[Variable] gtk-text-iter-backward-sentence-start
[Variable] gtk-text-iter-backward-sentence-starts
[Variable] gtk-text-iter-backward-to-tag-toggle
[Variable] gtk-text-iter-backward-visible-cursor-position
[Variable] gtk-text-iter-backward-visible-cursor-positions
[Variable] gtk-text-iter-backward-visible-lines
[Variable] gtk-text-iter-backward-visible-word-start
[Variable] gtk-text-iter-backward-visible-word-starts
[Variable] gtk-text-iter-forward-cursor-position
[Variable] gtk-text-iter-forward-cursor-positions
[Variable] gtk-text-iter-forward-visible-cursor-position
[Variable] gtk-text-iter-forward-visible-cursor-positions
[Variable] gtk-text-iter-forward-visible-word-end
[Variable] gtk-text-iter-forward-visible-word-ends
[Variable] gtk-text-iter-get-visible-line-index
[Variable] gtk-text-iter-get-visible-line-offset
[Variable] gtk-text-iter-set-visible-line-index
[Variable] gtk-text-iter-set-visible-line-offset
[Variable] gtk-text-view-backward-display-line-start
[Function] gtk-text-view-buffer-to-window-coords
[Variable] gtk-text-view-forward-display-line-end
[Variable] gtk-text-view-get-border-window-size
[Variable] gtk-text-view-get-default-attributes
[Variable] gtk-text-view-get-pixels-above-lines
[Variable] gtk-text-view-get-pixels-below-lines
[Variable] gtk-text-view-get-pixels-inside-wrap

[Variable] gtk-text-view-set-border-window-size
[Variable] gtk-text-view-set-pixels-above-lines
[Variable] gtk-text-view-set-pixels-below-lines
[Variable] gtk-text-view-set-pixels-inside-wrap
[Function] gtk-text-view-window-to-buffer-coords
[Variable] gtk-toggle-tool-button-new-from-stock
[Variable] gtk-tool-item-get-visible-horizontal
[Variable] gtk-tool-item-retrieve-proxy-menu-item
[Variable] gtk-tool-item-set-visible-horizontal
[Variable] gtk-tree-drag-dest-drag-data-received
[Variable] gtk-tree-drag-dest-row-drop-possible
[Variable] gtk-tree-drag-source-drag-data-delete
[Variable] gtk-tree-model-filter-convert-child-iter-to-iter
[Variable] gtk-tree-model-filter-convert-child-path-to-path
[Variable] gtk-tree-model-filter-convert-iter-to-child-iter
[Variable] gtk-tree-model-filter-convert-path-to-child-path
[Variable] gtk-tree-model-filter-set-visible-column
[Variable] gtk-tree-model-row-has-child-toggled
[Variable] gtk-tree-model-sort-convert-child-iter-to-iter
[Variable] gtk-tree-model-sort-convert-child-path-to-path
[Variable] gtk-tree-model-sort-convert-iter-to-child-iter
[Variable] gtk-tree-model-sort-convert-path-to-child-path
[Variable] gtk-tree-model-sort-reset-default-sort-func
[Variable] gtk-tree-selection-count-selected-rows
[Variable] gtk-tree-sortable-has-default-sort-func
[Variable] gtk-tree-sortable-set-sort-column-id
[Variable] gtk-tree-sortable-sort-column-changed
[Function] gtk-tree-view-column-cell-get-position
[Variable] gtk-tree-view-column-cell-is-visible
[Variable] gtk-tree-view-column-cell-set-cell-data
[Variable] gtk-tree-view-column-clear-attributes
[Function] gtk-tree-view-column-get-cell-renderers
[Variable] gtk-tree-view-column-get-fixed-width

[Variable] gtk-tree-view-column-get-reorderable
[Variable] gtk-tree-view-column-get-sort-column-id
[Variable] gtk-tree-view-column-get-sort-indicator
[Variable] gtk-tree-view-column-set-cell-data-func
[Variable] gtk-tree-view-column-set-fixed-width
[Variable] gtk-tree-view-column-set-reorderable
[Variable] gtk-tree-view-column-set-sort-column-id
[Variable] gtk-tree-view-column-set-sort-indicator
[Variable] gtk-tree-view-unset-rows-drag-source

[Variable] gtk-true

[Function] gtk-vscrollbar-get-type
[Variable] gtk-widget-get-allocation
[Variable] gtk-widget-get-state
[Variable] gtk-widget-get-window
[Variable] gtk-window-set-auto-startup-notification
[Function] gtk-window-set-default-icon-from-file

Type Index 614

Type Index

<gtk-about-dialog> . . . . . . . . . . . . . . . . . . . . . . . . . . 38 <gtk-accel-label>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 <gtk-accessible>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 <gtk-action-group> . . . . . . . . . . . . . . . . . . . . . . . . . 329 <gtk-action> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 <gtk-adjustment>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 <gtk-alignment>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 <gtk-arrow> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 <gtk-aspect-frame> . . . . . . . . . . . . . . . . . . . . . . . . . 391 <gtk-assistant> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 <gtk-bin>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 <gtk-box>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 <gtk-button-box>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 <gtk-button> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 <gtk-calendar> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 <gtk-cell-editable> . . . . . . . . . . . . . . . . . . . . . . . . 244 <gtk-cell-layout> . . . . . . . . . . . . . . . . . . . . . . . . . . 237

<gtk-cell-renderer-accel> . . . . . . . . . . . . . . . . . 245
<gtk-cell-renderer-combo> . . . . . . . . . . . . . . . . . 246
<gtk-cell-renderer-pixbuf> . . . . . . . . . . . . . . . . 247
<gtk-cell-renderer-progress> . . . . . . . . . . . . . . 248
<gtk-cell-renderer-spin> . . . . . . . . . . . . . . . . . . 249
<gtk-cell-renderer-text> . . . . . . . . . . . . . . . . . . 250
<gtk-cell-renderer-toggle> . . . . . . . . . . . . . . . . 253

<gtk-cell-renderer> . . . . . . . . . . . . . . . . . . . . . . . . 239 <gtk-cell-view>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 <gtk-check-button> . . . . . . . . . . . . . . . . . . . . . . . . . . 90 <gtk-check-menu-item> . . . . . . . . . . . . . . . . . . . . . . 295 <gtk-color-button> . . . . . . . . . . . . . . . . . . . . . . . . . 347

<gtk-color-selection-dialog> . . . . . . . . . . . . . . 352

<gtk-color-selection> . . . . . . . . . . . . . . . . . . . . . . 350 <gtk-combo-box-entry> . . . . . . . . . . . . . . . . . . . . . . 274 <gtk-combo-box>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 <gtk-container>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 <gtk-curve> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 <gtk-dialog> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 <gtk-drawing-area> . . . . . . . . . . . . . . . . . . . . . . . . . 478 <gtk-editable> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 <gtk-entry-completion>. . . . . . . . . . . . . . . . . . . . . 107 <gtk-entry> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 <gtk-event-box>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 <gtk-expander> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

<gtk-file-chooser-button> . . . . . . . . . . . . . . . . . 372
<gtk-file-chooser-dialog> . . . . . . . . . . . . . . . . . 376
<gtk-file-chooser-widget> . . . . . . . . . . . . . . . . . 377

<gtk-file-chooser> . . . . . . . . . . . . . . . . . . . . . . . . . 361 <gtk-file-filter> . . . . . . . . . . . . . . . . . . . . . . . . . . 378 <gtk-file-selection> . . . . . . . . . . . . . . . . . . . . . . . 354 <gtk-fixed> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 <gtk-font-button> . . . . . . . . . . . . . . . . . . . . . . . . . . 380

<gtk-font-selection-dialog> . . . . . . . . . . . . . . . 386

<gtk-font-selection> . . . . . . . . . . . . . . . . . . . . . . . 384 <gtk-frame> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 <gtk-gamma-curve> . . . . . . . . . . . . . . . . . . . . . . . . . . 572

<gtk-handle-box>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
<gtk-hbox> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
<gtk-hbutton-box> . . . . . . . . . . . . . . . . . . . . . . . . . . 395
<gtk-hpaned> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
<gtk-hruler> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
<gtk-hscale> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
<gtk-hscrollbar>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
<gtk-hseparator>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
<gtk-icon-view>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

                                                <gtk-im-context-simple> . . . . . . . . . . . . . . . . . . . 484

<gtk-im-context>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
<gtk-im-multicontext> . . . . . . . . . . . . . . . . . . . . . . 485
<gtk-image-menu-item> . . . . . . . . . . . . . . . . . . . . . . 291
<gtk-image> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
<gtk-input-dialog> . . . . . . . . . . . . . . . . . . . . . . . . . 387
<gtk-invisible> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
<gtk-item> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
<gtk-label> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
<gtk-layout> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
<gtk-link-button>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
<gtk-list-store>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
<gtk-menu-bar> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
<gtk-menu-item>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
<gtk-menu-shell>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
<gtk-menu-tool-button>. . . . . . . . . . . . . . . . . . . . . 316
<gtk-menu> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
<gtk-message-dialog> . . . . . . . . . . . . . . . . . . . . . . . . . 9
<gtk-misc> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
<gtk-notebook> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
<gtk-object> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
<gtk-page-setup>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
<gtk-paned> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
<gtk-paper-size>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
<gtk-plug> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
<gtk-print-context> . . . . . . . . . . . . . . . . . . . . . . . . 448

                                                <gtk-print-operation-preview>. . . . . . . . . . . . . 442

<gtk-print-operation> . . . . . . . . . . . . . . . . . . . . . . 439
<gtk-print-settings> . . . . . . . . . . . . . . . . . . . . . . . 451
<gtk-progress-bar> . . . . . . . . . . . . . . . . . . . . . . . . . . 71
<gtk-radio-action> . . . . . . . . . . . . . . . . . . . . . . . . . 344
<gtk-radio-button> . . . . . . . . . . . . . . . . . . . . . . . . . . 92
<gtk-radio-menu-item> . . . . . . . . . . . . . . . . . . . . . . 293

                                                <gtk-radio-tool-button> . . . . . . . . . . . . . . . . . . . 319

<gtk-range> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517

                                                <gtk-recent-chooser-dialog> . . . . . . . . . . . . . . . 593
                                                <gtk-recent-chooser-menu> . . . . . . . . . . . . . . . . . 594
                                                <gtk-recent-chooser-widget> . . . . . . . . . . . . . . . 595

<gtk-recent-chooser> . . . . . . . . . . . . . . . . . . . . . . . 586
<gtk-recent-filter> . . . . . . . . . . . . . . . . . . . . . . . . 596
<gtk-recent-info> . . . . . . . . . . . . . . . . . . . . . . . . . . 578
<gtk-recent-manager> . . . . . . . . . . . . . . . . . . . . . . . 577
<gtk-requisition> . . . . . . . . . . . . . . . . . . . . . . . . . . 534
<gtk-ruler> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
<gtk-scale> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521

Type Index 615

<gtk-scrollbar>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 <gtk-scrolled-window> . . . . . . . . . . . . . . . . . . . . . . 433 <gtk-selection-data> . . . . . . . . . . . . . . . . . . . . . . . 534

<gtk-separator-menu-item> . . . . . . . . . . . . . . . . . 297
<gtk-separator-tool-item> . . . . . . . . . . . . . . . . . 310

<gtk-separator>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 <gtk-size-group>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 <gtk-socket> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 <gtk-spin-button> . . . . . . . . . . . . . . . . . . . . . . . . . . 113 <gtk-status-icon>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 <gtk-statusbar> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 <gtk-table> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

<gtk-tearoff-menu-item> . . . . . . . . . . . . . . . . . . . 298

<gtk-text-attributes> . . . . . . . . . . . . . . . . . . . . . . 158 <gtk-text-buffer> . . . . . . . . . . . . . . . . . . . . . . . . . . 140

<gtk-text-child-anchor> . . . . . . . . . . . . . . . . . . . 163

<gtk-text-iter>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 <gtk-text-mark>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 <gtk-text-tag-table> . . . . . . . . . . . . . . . . . . . . . . . 160 <gtk-text-tag> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 <gtk-text-view>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 <gtk-toggle-action> . . . . . . . . . . . . . . . . . . . . . . . . 342 <gtk-toggle-button> . . . . . . . . . . . . . . . . . . . . . . . . . 94

<gtk-toggle-tool-button> . . . . . . . . . . . . . . . . . . 318

<gtk-tool-button> . . . . . . . . . . . . . . . . . . . . . . . . . . 311 <gtk-tool-item>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 <gtk-toolbar> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 <gtk-tooltips> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 <gtk-tree-drag-dest> . . . . . . . . . . . . . . . . . . . . . . . 215 <gtk-tree-drag-source>. . . . . . . . . . . . . . . . . . . . . 215 <gtk-tree-iter>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

                                                <gtk-tree-model-filter> . . . . . . . . . . . . . . . . . . . 235

<gtk-tree-model-sort> . . . . . . . . . . . . . . . . . . . . . . 234 <gtk-tree-model>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 <gtk-tree-path>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

                                                <gtk-tree-row-reference> . . . . . . . . . . . . . . . . . . 178

<gtk-tree-selection> . . . . . . . . . . . . . . . . . . . . . . . 187 <gtk-tree-sortable> . . . . . . . . . . . . . . . . . . . . . . . . 231 <gtk-tree-store>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 <gtk-tree-view-column>. . . . . . . . . . . . . . . . . . . . . 191 <gtk-tree-view>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 <gtk-ui-manager>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 <gtk-vbox> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 <gtk-vbutton-box> . . . . . . . . . . . . . . . . . . . . . . . . . . 396 <gtk-viewport> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 <gtk-vpaned> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 <gtk-vruler> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 <gtk-vscale> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 <gtk-vscrollbar>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 <gtk-vseparator>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 <gtk-widget> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 <gtk-window-group> . . . . . . . . . . . . . . . . . . . . . . . . . . 37 <gtk-window> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

                                                <guile-gtk-generic-tree-model> . . . . . . . . . . . 599

<guile-gtk-tree-model>. . . . . . . . . . . . . . . . . . . . . 599

Function Index 616

Function Index

%

%gtk-message-dialog-new . . . . . . . . . . . . . . . . . . . 599

A

accel-cleared on <gtk-cell-renderer-accel>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

accel-closures-changed on <gtk-widget> . . . 534
accel-edited on <gtk-cell-renderer-accel>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

accept-position on <gtk-paned> . . . . . . . . . . . . 515
action-activated on <gtk-entry-completion>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

actions-changed on <gtk-ui-manager> . . . . . . 324

activate . . . . . . . . . . . . . . . . . . . . . . 241, 285, 338, 540 activate on <gtk-action> . . . . . . . . . . . . . . . . . . . 336 activate on <gtk-button> . . . . . . . . . . . . . . . . . . . . 84 activate on <gtk-entry> . . . . . . . . . . . . . . . . . . . . 101

activate on <gtk-expander> . . . . . . . . . . . . . . . . . 422
activate on <gtk-menu-item>. . . . . . . . . . . . . . . . 283
activate on <gtk-status-icon> . . . . . . . . . . . . . . 79
activate-current on <gtk-menu-shell> . . . . . 287
activate-cursor-item on <gtk-icon-view> . . 221

activate-default. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

activate-default on <gtk-window> . . . . . . . . . . . 12

activate-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

activate-focus on <gtk-window> . . . . . . . . . . . . . 12

activate-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

activate-item on <gtk-menu-item> . . . . . . . . . . 283

activate-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160, 503 add on <gtk-container> . . . . . . . . . . . . . . . . . . . . . 503 add-accel-group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 add-accelerator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 add-action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 add-action-widget . . . . . . . . . . . . . . . . . . . . . . . . . 6, 47 add-actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 add-age . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 add-application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 add-attribute . . . . . . . . . . . . . . . . . . . . . . . . . . 192, 238 add-button. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 add-child-at-anchor . . . . . . . . . . . . . . . . . . . . . . . . 168 add-child-in-window . . . . . . . . . . . . . . . . . . . . . . . . 169 add-events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 add-filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370, 591 add-group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 add-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 add-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 add-mime-type . . . . . . . . . . . . . . . . . . . . . . . . . . 379, 597 add-mnemonic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 add-mnemonic-label . . . . . . . . . . . . . . . . . . . . . . . . . 561 add-pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379, 597 add-pixbuf-formats . . . . . . . . . . . . . . . . . . . . . . . . . 379 add-radio-actions . . . . . . . . . . . . . . . . . . . . . . . . . . 333 add-table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 add-toggle-actions . . . . . . . . . . . . . . . . . . . . . . . . . 333 add-ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 add-ui-from-file. . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 add-ui-from-string . . . . . . . . . . . . . . . . . . . . . . . . . 326 add-widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487

add-widget on <gtk-ui-manager> . . . . . . . . . . . . 323

add-window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 add1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 add2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

adjust-bounds on <gtk-range> . . . . . . . . . . . . . . 517

append. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258, 263, 287 append-column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 append-page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 405 append-page-menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 append-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 apply on <gtk-assistant> . . . . . . . . . . . . . . . . . . . . 43 apply-tag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

apply-tag on <gtk-text-buffer> . . . . . . . . . . . . 141

apply-tag-by-name . . . . . . . . . . . . . . . . . . . . . . . . . . 151 attach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277, 417 attach-defaults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

B

backspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 backspace on <gtk-entry> . . . . . . . . . . . . . . . . . . . 101

backspace on <gtk-text-view> . . . . . . . . . . . . . . 163

backward-display-line . . . . . . . . . . . . . . . . . . . . . . 167 begin-move-drag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

begin-print on <gtk-print-operation> . . . . . 440

begin-resize-drag. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 begin-user-action . . . . . . . . . . . . . . . . . . . . . . . . . . 154

begin-user-action on <gtk-text-buffer> . . . 142

block-activate-from . . . . . . . . . . . . . . . . . . . . . . . . 340

button-press-event on <gtk-widget>. . . . . . . . 528
button-release-event on <gtk-widget> . . . . . 528

C

can-activate-accel . . . . . . . . . . . . . . . . . . . . . . . . . 539

can-activate-accel on <gtk-widget>. . . . . . . . 534

cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289, 445 cancel on <gtk-assistant> . . . . . . . . . . . . . . . . . . . 43

cancel on <gtk-menu-shell> . . . . . . . . . . . . . . . . . 287
cancel-position on <gtk-paned> . . . . . . . . . . . . 515
change-current-page on <gtk-notebook> . . . . 405
change-value on <gtk-range>. . . . . . . . . . . . . . . . 517
change-value on <gtk-spin-button> . . . . . . . . . 114

changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472

changed on <gtk-adjustment>. . . . . . . . . . . . . . . . 470
changed on <gtk-combo-box> . . . . . . . . . . . . . . . . . 267

changed on <gtk-editable> . . . . . . . . . . . . . . . . . . 119

changed on <gtk-radio-action> . . . . . . . . . . . . . 344
changed on <gtk-recent-manager> . . . . . . . . . . . 578

changed on <gtk-text-buffer> . . . . . . . . . . . . . . 140
changed on <gtk-tree-selection> . . . . . . . . . . . 187

check-resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

check-resize on <gtk-container> . . . . . . . . . . . 503
child-attached on <gtk-handle-box>. . . . . . . . 481
child-detached on <gtk-handle-box>. . . . . . . . 481

child-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 child-get-property . . . . . . . . . . . . . . . . . . . . . . . . . 506 child-notify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

child-notify on <gtk-widget> . . . . . . . . . . . . . . 528

child-set-property . . . . . . . . . . . . . . . . . . . . . . . . . 506 child-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 clamp-page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 class-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 clear . . . . . . . . . . . . . . . . . . . . . . 58, 192, 238, 258, 264 clear-attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 clear-cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234, 236 clear-marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 clicked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86, 195 clicked on <gtk-button> . . . . . . . . . . . . . . . . . . . . . 85

clicked on <gtk-tool-button> . . . . . . . . . . . . . . 311
clicked on <gtk-tree-view-column> . . . . . . . . . 192
client-event on <gtk-widget> . . . . . . . . . . . . . . 533

close on <gtk-assistant> . . . . . . . . . . . . . . . . . . . . 43 close on <gtk-dialog> . . . . . . . . . . . . . . . . . . . . . . . . . 4 collapse-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 collapse-row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

color-changed on <gtk-color-selection> . . . 350
color-set on <gtk-color-button> . . . . . . . . . . . 347

columns-autosize. . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

columns-changed on <gtk-tree-view>. . . . . . . . 201
commit on <gtk-im-context> . . . . . . . . . . . . . . . . . 563

complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109, 355

composited-changed on <gtk-widget>. . . . . . . . 527

configure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

configure-event on <gtk-widget> . . . . . . . . . . . 529
confirm-overwrite on <gtk-file-chooser> . . 362

connect-accelerator . . . . . . . . . . . . . . . . . . . . . . . . 339 connect-proxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

connect-proxy on <gtk-action-group> . . . . . . 329
connect-proxy on <gtk-ui-manager> . . . . . . . . . 323

construct. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 construct-for-display . . . . . . . . . . . . . . . . . . . . . . 566 copy-clipboard . . . . . . . . . . . . . . . . . . . . . . . . . 121, 154

copy-clipboard on <gtk-entry> . . . . . . . . . . . . . 101
copy-clipboard on <gtk-label> . . . . . . . . . . . . . . 61
copy-clipboard on <gtk-text-view> . . . . . . . . . 163

create-child-anchor . . . . . . . . . . . . . . . . . . . . . . . . 147

create-custom-widget on
    <gtk-print-operation> . . . . . . . . . . . . . . . . . 442

create-drag-icon. . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 create-icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 create-mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 create-menu-item. . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

create-menu-proxy on <gtk-tool-item> . . . . . 304

create-pango-context . . . . . . . . . . . . . . . . . . . . . . . 551 create-pango-layout . . . . . . . . . . . . . . . . . . . . . . . . 551 create-row-drag-icon . . . . . . . . . . . . . . . . . . . . . . . 210 create-tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 create-tool-item. . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

                                                create-window on <gtk-notebook> . . . . . . . . . . . 405
                                                current-folder-changed on <gtk-file-chooser>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361

                                                cursor-changed on <gtk-tree-view> . . . . . . . . . 201
                                                cursor-on-match on <gtk-entry-completion>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

                                                curve-type-changed on <gtk-curve> . . . . . . . . . 570
                                                custom-widget-apply on <gtk-print-operation>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 cut-clipboard . . . . . . . . . . . . . . . . . . . . . . . . . . 121, 154

                                                cut-clipboard on <gtk-entry> . . . . . . . . . . . . . . 101
                                                cut-clipboard on <gtk-text-view> . . . . . . . . . . 163
                                                cycle-child-focus on <gtk-paned> . . . . . . . . . . 515
                                                cycle-focus on <gtk-menu-shell> . . . . . . . . . . . 287
                                                cycle-handle-focus on <gtk-paned> . . . . . . . . . 515

D

                                                day-selected on <gtk-calendar> . . . . . . . . . . . . 474
                                                day-selected-double-click on <gtk-calendar>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 deactivate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

                                                deactivate on <gtk-menu-shell> . . . . . . . . . . . . 287

deiconify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 delete-action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

                                                delete-event on <gtk-widget> . . . . . . . . . . . . . . 528
                                                delete-from-cursor on <gtk-entry> . . . . . . . . . 101
                                                delete-from-cursor on <gtk-text-view> . . . . 163

delete-interactive . . . . . . . . . . . . . . . . . . . . . . . . . 145 delete-mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 delete-mark-by-name . . . . . . . . . . . . . . . . . . . . . . . . 148

                                                delete-range on <gtk-text-buffer> . . . . . . . . . 141

delete-selection . . . . . . . . . . . . . . . . . . . . . . . 121, 153 delete-surrounding . . . . . . . . . . . . . . . . . . . . . . . . . 565

                                                delete-surrounding on <gtk-im-context> . . . 563

delete-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

                                                delete-text on <gtk-editable> . . . . . . . . . . . . . 120

deselect . . . . . . . . . . . . . . . . . . . . . . . . . . . 285, 289, 509 deselect on <gtk-item> . . . . . . . . . . . . . . . . . . . . . 509 destroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 destroy on <gtk-object> . . . . . . . . . . . . . . . . . . . . 513

                                                destroy-event on <gtk-widget> . . . . . . . . . . . . . 528

detach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

                                                direction-changed on <gtk-widget> . . . . . . . . . 528

disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490

                                                disable-device on <gtk-input-dialog> . . . . . 387

disconnect-accelerator. . . . . . . . . . . . . . . . . . . . . 339 disconnect-proxy. . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

                                                disconnect-proxy on <gtk-action-group> . . . 329
                                                disconnect-proxy on <gtk-ui-manager> . . . . . 323
                                                done on <gtk-print-operation> . . . . . . . . . . . . . 440
                                                drag-begin on <gtk-widget> . . . . . . . . . . . . . . . . . 529
                                                drag-data-delete on <gtk-widget> . . . . . . . . . . 530

drag-data-get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

                                                drag-data-get on <gtk-widget> . . . . . . . . . . . . . 532

drag-data-received on <gtk-widget>. . . . . . . . 532

drag-drop on <gtk-widget> . . . . . . . . . . . . . . . . . . 532 drag-end on <gtk-widget> . . . . . . . . . . . . . . . . . . . 530

drag-failed on <gtk-widget>. . . . . . . . . . . . . . . . 530
drag-leave on <gtk-widget> . . . . . . . . . . . . . . . . . 529
drag-motion on <gtk-widget>. . . . . . . . . . . . . . . . 530
draw-page on <gtk-print-operation>. . . . . . . . 440

E

edited on <gtk-cell-renderer-text>. . . . . . . . 252

editing-canceled. . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

editing-canceled on <gtk-cell-renderer> . . 240

editing-done . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

editing-done on <gtk-cell-editable> . . . . . . 244
editing-started on <gtk-cell-renderer> . . . 240

embedded on <gtk-plug> . . . . . . . . . . . . . . . . . . . . . 566 enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490

enable-device on <gtk-input-dialog> . . . . . . 387
end-print on <gtk-print-operation>. . . . . . . . 441

end-user-action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

end-user-action on <gtk-text-buffer> . . . . . 142

ensure-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 ensure-update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 enter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 enter on <gtk-button>. . . . . . . . . . . . . . . . . . . . . . . . 85

enter-notify-event on <gtk-widget>. . . . . . . . 529

event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159, 539 event on <gtk-text-tag> . . . . . . . . . . . . . . . . . . . . 158 event on <gtk-widget>. . . . . . . . . . . . . . . . . . . . . . . 528

event-after on <gtk-widget>. . . . . . . . . . . . . . . . 528

expand-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

expand-collapse-cursor-row on

<gtk-tree-view> . . . . . . . . . . . . . . . . . . . . . . . . 201 expand-row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 expand-to-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

expose-event on <gtk-widget> . . . . . . . . . . . . . . 529

F

file-activated on <gtk-file-chooser> . . . . . 362
file-set on <gtk-file-chooser-button> . . . . 372

filter-keypress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 filter-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 focus on <gtk-widget>. . . . . . . . . . . . . . . . . . . . . . . 528 focus-cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

focus-home-or-end on <gtk-toolbar>. . . . . . . . 300

focus-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

focus-in-event on <gtk-widget> . . . . . . . . . . . . 529

focus-out. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

focus-out-event on <gtk-widget> . . . . . . . . . . . 529
focus-tab on <gtk-notebook>. . . . . . . . . . . . . . . . 405
font-set on <gtk-font-button> . . . . . . . . . . . . . 380

force-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

format-value on <gtk-scale>. . . . . . . . . . . . . . . . 521

forward-display-line . . . . . . . . . . . . . . . . . . . . . . . 167

frame-event on <gtk-window> . . . . . . . . . . . . . . . . . 12

freeze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 freeze-child-notify . . . . . . . . . . . . . . . . . . . . . . . . 557 fullscreen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

G

get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 get-above-child. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 get-accel-closure . . . . . . . . . . . . . . . . . . . . . . . . . . 340 get-accel-group . . . . . . . . . . . . . . . . . . . . . . . . 279, 325 get-accel-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 get-accel-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 get-accel-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 get-accept-focus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 get-accepts-tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 get-accessible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 get-action . . . . . . . . . . . . . . . . . . . . 326, 331, 363, 562 get-action-groups . . . . . . . . . . . . . . . . . . . . . . . . . . 325 get-activates-default . . . . . . . . . . . . . . . . . . . . . . 102 get-active . . . . . . . 96, 254, 268, 280, 295, 318, 343 get-active-iter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 get-active-text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 get-add-tearoffs . . . . . . . . . . . . . . . . . . . . . . . 272, 324 get-adjustment . . . . . . . . . . . . . . . . . . . . . . . . . 115, 518 get-alignment . . . . . . . . . . . . . . . . . . 88, 104, 197, 511 get-alpha. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 get-ancestor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 get-angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 get-animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 get-attach-widget . . . . . . . . . . . . . . . . . . . . . . . . . . 281 get-attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 get-bin-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 get-blinking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 get-bool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 get-border-width. . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 get-bottom-margin . . . . . . . . . . . . . . . . . . . . . . . . . . 464 get-bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 get-buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139, 164 get-cairo-context . . . . . . . . . . . . . . . . . . . . . . . . . . 448 get-cell-renderers . . . . . . . . . . . . . . . . . . . . . . . . . 219 get-char-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 get-chars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 get-child. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 get-child-requisition . . . . . . . . . . . . . . . . . . . . . . 537 get-child-secondary . . . . . . . . . . . . . . . . . . . . . . . . 500 get-child-visible . . . . . . . . . . . . . . . . . . . . . . . . . . 557 get-child1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 get-child2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 get-children . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 get-clickable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 get-clipboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 get-col-spacing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 get-collate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 get-color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 get-colormap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 get-column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 get-column-spacing . . . . . . . . . . . . . . . . . . . . . . . . . 226 get-column-type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 get-columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204, 224 get-completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 get-composite-name . . . . . . . . . . . . . . . . . . . . . . . . . 548 get-context-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 get-copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 get-current-folder . . . . . . . . . . . . . . . . . . . . . . . . . 367 get-current-item. . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 get-current-page . . . . . . . . . . . . . . . . . . . . . . . . 44, 409 get-current-uri. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 get-current-value . . . . . . . . . . . . . . . . . . . . . . . . . . 345 get-cursor-visible . . . . . . . . . . . . . . . . . . . . . . . . . 171 get-date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 get-decorated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

get-default-col-spacing . . . . . . . . . . . . . . . . . . . 420
get-default-row-spacing . . . . . . . . . . . . . . . . . . . 419

get-default-size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 get-deletable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 get-deleted. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139, 169

get-destroy-with-parent. . . . . . . . . . . . . . . . . . . . . 27

get-digits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117, 522 get-direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 get-display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 get-displayed-row . . . . . . . . . . . . . . . . . . . . . . . . . . 218 get-dither . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 get-double . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 get-dpi-x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 get-dpi-y. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 get-draw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 get-draw-as-radio . . . . . . . . . . . . . . . . . . . . . . . . . . 343 get-draw-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 get-drop-index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 get-duplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 get-editable . . . . . . . . . . . . . . . . . . . . . . . . . . . 122, 170 get-ellipsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66, 74 get-enable-search . . . . . . . . . . . . . . . . . . . . . . . . . . 210 get-enable-tree-lines . . . . . . . . . . . . . . . . . . . . . . 213 get-end-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 get-entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 get-error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443, 446 get-events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 get-expand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196, 306 get-expanded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 get-expander-column . . . . . . . . . . . . . . . . . . . . . . . . 205 get-extension-events . . . . . . . . . . . . . . . . . . . . . . . 542 get-extra-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 get-filename . . . . . . . . . . . . . . . . . . . . . . . . . . . 355, 364 get-filenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 get-filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371, 592 get-finishings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 get-fixed-height-mode . . . . . . . . . . . . . . . . . . . . . . 211 get-fixed-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 get-flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 get-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 get-focus-hadjustment . . . . . . . . . . . . . . . . . . . . . . 505 get-focus-on-click. . . . . . . . . . . . . . . . . . . . . . 88, 273 get-focus-on-map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 get-focus-vadjustment . . . . . . . . . . . . . . . . . . . . . . 505 get-font-name . . . . . . . . . . . . . . . . . . . . . . . . . . 381, 384 get-fraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

get-frame-dimensions . . . . . . . . . . . . . . . . . . . . . . . . 27
get-gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
get-grid-lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
get-group . . . . . . . . . . . . . . . . . . . 31, 93, 294, 319, 345
get-group-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
get-hadjustment . . . . . . . . . . . . . . 202, 402, 434, 492
get-handle-position . . . . . . . . . . . . . . . . . . . . . . . . 482
get-has-frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 102
get-has-palette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
get-has-resize-grip . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-has-selection . . . . . . . . . . . . . . . . . . . . . . . . . . 149
get-has-separator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
get-has-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
get-headers-clickable . . . . . . . . . . . . . . . . . . . . . . 203
get-headers-visible . . . . . . . . . . . . . . . . . . . . . . . . 202
get-height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
get-homogeneous . . . . . . . . . . . . . . . . . . . 305, 419, 498
get-hover-expand. . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
get-hover-selection . . . . . . . . . . . . . . . . . . . . . . . . 212
get-hscrollbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
get-icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
get-icon-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
get-icon-name . . . . . . . . . . . . . . . . . . . . . . . . 28, 82, 314
get-icon-size . . . . . . . . . . . . . . . . . . . . . . . . . . 303, 308
get-icon-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
get-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567, 569
get-ignore-hidden . . . . . . . . . . . . . . . . . . . . . . . . . . 487
get-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89, 291
get-image-position . . . . . . . . . . . . . . . . . . . . . . . . . . 89
get-inconsistent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
get-increments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
get-indent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
get-inner-border. . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
get-insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
get-int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
get-inverted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
get-invisible-char . . . . . . . . . . . . . . . . . . . . . . . . . 104
get-is-important. . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
get-item-index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
get-item-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
get-items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581, 591
get-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
get-iter-at-line. . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
get-iter-at-location . . . . . . . . . . . . . . . . . . . . . . . 166
get-iter-at-mark. . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
get-iter-at-offset . . . . . . . . . . . . . . . . . . . . . . . . . 151
get-iter-first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
get-iter-location . . . . . . . . . . . . . . . . . . . . . . . . . . 166
get-justification . . . . . . . . . . . . . . . . . . . . . . . . . . 171
get-justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
get-label . . . . . . . . . . . . . . . . . . . 67, 86, 312, 423, 427
get-label-align. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
get-label-widget . . . . . . . . . . . . . . . . . . 315, 425, 427
get-layout . . . . . . . . . . . . . . . . . . . . . 67, 104, 500, 522
get-layout-offsets . . . . . . . . . . . . . . . . . 64, 104, 523
get-left-gravity. . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
get-left-margin . . . . . . . . . . . . . . . . . . . . . . . . 172, 464
get-length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

get-license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 get-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580, 588 get-line-at-y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 get-line-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 get-line-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 get-line-wrap-mode . . . . . . . . . . . . . . . . . . . . . . . . . . 68 get-line-yrange. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 get-local-only . . . . . . . . . . . . . . . . . . . . . . . . . 363, 588 get-logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 get-logo-icon-name . . . . . . . . . . . . . . . . . . . . . . . . . . 42 get-margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 get-mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 get-markup-column . . . . . . . . . . . . . . . . . . . . . . . . . . 222 get-max-length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 get-max-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 get-max-width-chars . . . . . . . . . . . . . . . . . . . . . . . . . 67 get-media-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 get-menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 get-menu-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 get-menu-label-text . . . . . . . . . . . . . . . . . . . . . . . . 413 get-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 get-min-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 get-mnemonic-keyval . . . . . . . . . . . . . . . . . . . . . . . . . 64 get-mnemonic-modifier . . . . . . . . . . . . . . . . . . . . . . . 28 get-mnemonic-widget . . . . . . . . . . . . . . . . . . . . . . . . . 68 get-modal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 get-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96, 187, 487 get-model . . . . . . . . . . . . 109, 201, 221, 234, 235, 269 get-modified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 get-modifier-style . . . . . . . . . . . . . . . . . . . . . . . . . 549 get-n-columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 get-n-copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 get-n-items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 get-n-pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44, 410 get-name . . . . . . . . . 39, 139, 330, 336, 379, 541, 596 get-needed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379, 598 get-no-show-all. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 get-nth-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 get-nth-page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44, 410 get-number-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 get-numeric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 get-orientation. . . . . . . . . . 224, 302, 308, 454, 463 get-output-bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 get-overwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 get-pack-direction . . . . . . . . . . . . . . . . . . . . . . . . . 282 get-padding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389, 511 get-page-complete. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 get-page-header-image . . . . . . . . . . . . . . . . . . . . . . . 46 get-page-height. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 get-page-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 get-page-setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 get-page-side-image . . . . . . . . . . . . . . . . . . . . . . . . . 47 get-page-title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 get-page-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 get-page-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 get-pango-context . . . . . . . . . . . . . . . . . . . . . . . . . . 551 get-pango-fontmap . . . . . . . . . . . . . . . . . . . . . . . . . . 450 get-paper-height . . . . . . . . . . . . . . . . . . . . . . . 456, 466

get-paper-size . . . . . . . . . . . . . . . . . . . . . . . . . 455, 463
get-paper-width . . . . . . . . . . . . . . . . . . . . . . . . 455, 465
get-parent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
get-parent-window . . . . . . . . . . . . . . . . . . . . . . . . . . 542
get-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
get-path-at-pos. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
get-pixbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54, 81
get-pixbuf-column . . . . . . . . . . . . . . . . . . . . . . . . . . 223
get-pixel-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
get-placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
get-pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
get-popup-accessible . . . . . . . . . . . . . . . . . . . . . . . 271
get-position . . . . . . . . . . . . . . . . . . . . . . . . 28, 122, 516
get-preview-text. . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
get-preview-uri. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
get-preview-widget . . . . . . . . . . . . . . . . . . . . . . . . . 369
get-printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
get-priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
get-proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
get-proxy-menu-item . . . . . . . . . . . . . . . . . . . . . . . . 309
get-pulse-step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
get-quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
get-radio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
get-range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118, 574
get-relief. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
get-relief-style . . . . . . . . . . . . . . . . . . . . . . . 303, 308
get-reorderable . . . . . . . . . . . . . . . . . . . . . . . . 209, 229
get-resizable . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 194
get-resize-mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
get-resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

                                                get-response-for-widget . . . . . . . . . . . . . . . . . . . . . . 7

get-reverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
get-right-justified . . . . . . . . . . . . . . . . . . . . . . . . 285
get-right-margin . . . . . . . . . . . . . . . . . . . . . . . 172, 465
get-role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
get-root-window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
get-row-spacing . . . . . . . . . . . . . . . . . . . . . . . . 226, 419
get-row-span-column . . . . . . . . . . . . . . . . . . . . . . . . 268
get-rubber-banding . . . . . . . . . . . . . . . . . . . . . . . . . 213
get-rules-hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
get-scale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
get-screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 16, 559
get-scrollable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
get-search-column . . . . . . . . . . . . . . . . . . . . . . . . . . 210
get-search-entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
get-selectable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
get-selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
get-selected-items . . . . . . . . . . . . . . . . . . . . . . . . . 227
get-selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
get-selection-bound . . . . . . . . . . . . . . . . . . . . . . . . 149
get-selection-bounds . . . . . . . . . . . . . . . . . . . 68, 120
get-selection-mode . . . . . . . . . . . . . . . . . . . . . . . . . 224
get-sensitive . . . . . . . . . . . . . . . . . . . . . . . . . . 330, 337
get-settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
get-shadow-type . . . . . . . . . . . . . . 428, 437, 483, 493
get-show-arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
get-show-border. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
get-show-hidden. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

get-show-icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 get-show-numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 get-show-private. . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 get-show-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 get-show-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 get-show-tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 get-show-tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 get-single-line-mode . . . . . . . . . . . . . . . . . . . . . . . . 69 get-size . . . . . . . . . . . . . . . . . . . . . . . . . 29, 82, 161, 402 get-size-of-row. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 get-size-request. . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 get-sizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 get-skip-pager-hint . . . . . . . . . . . . . . . . . . . . . . . . . 31 get-skip-taskbar-hint . . . . . . . . . . . . . . . . . . . . . . . 31 get-slice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 get-snap-edge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 get-snap-to-ticks . . . . . . . . . . . . . . . . . . . . . . . . . . 118 get-sort-order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 get-sort-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 get-spacing . . . . . . . . . . . . . . . . . . . 193, 225, 423, 498 get-start-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 get-status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 get-stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 get-stock-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 get-storage-type . . . . . . . . . . . . . . . . . . . . . . . . . 54, 81 get-string-from-iter . . . . . . . . . . . . . . . . . . . . . . . 184 get-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302, 546 get-submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 get-surrounding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 get-tab-detachable . . . . . . . . . . . . . . . . . . . . . . . . . 414 get-tab-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 get-tab-label-text . . . . . . . . . . . . . . . . . . . . . . . . . 413 get-tab-pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 get-tab-reorderable . . . . . . . . . . . . . . . . . . . . . . . . 414 get-tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 get-tag-table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 get-take-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 get-tearoff-state . . . . . . . . . . . . . . . . . . . . . . . . . . 279 get-text . . . . . . . . . . . . . . . . . . . . . . . . . 65, 73, 101, 146 get-text-column . . . . . . . . . . . . . . . . . . . . . . . . 222, 275 get-title . . . . . . . . 30, 196, 272, 280, 349, 373, 383 get-toolbar-style . . . . . . . . . . . . . . . . . . . . . . . . . . 308 get-tooltips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 get-top-margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 get-toplevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 get-toplevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 get-transient-for. . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 get-tree-view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 get-type-hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 get-ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 get-update-policy . . . . . . . . . . . . . . . . . . . . . . . . . . 519 get-urgency-hint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 get-uri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98, 367 get-uris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 get-use-alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 get-use-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 get-use-drag-window . . . . . . . . . . . . . . . . . . . . . . . . 306 get-use-font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 get-use-markup . . . . . . . . . . . . . . . . . . . . . . . . . . 68, 424 get-use-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 get-use-stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 get-use-underline . . . . . . . . . . . . . . 68, 87, 313, 424 get-vadjustment . . . . . . . . . . . . . . 202, 403, 434, 492 get-value . . . . . . . . . . . . . . . . . . . . . 118, 182, 471, 519 get-value-as-int. . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 get-value-pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 get-version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 get-visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 get-visible . . . . . . . . . . . . . . . 83, 139, 193, 331, 337 get-visible-rect. . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 get-visible-vertical . . . . . . . . . . . . . . . . . . . . . . . 307 get-visible-window . . . . . . . . . . . . . . . . . . . . . . . . . 480 get-visual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 get-vscrollbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 get-website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 get-website-label. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 get-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197, 325 get-widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 get-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194, 449 get-width-chars . . . . . . . . . . . . . . . . . . . . . . . . . 67, 103 get-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 get-window-type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 get-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 get-wrap-license. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 get-wrap-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 get-wrap-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

                                                got-page-size on
                                                    <gtk-print-operation-preview> . . . . . . . . 442
                                                grab-broken-event on <gtk-widget> . . . . . . . . . 533

grab-default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 grab-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

                                                grab-focus on <gtk-widget> . . . . . . . . . . . . . . . . . 528
                                                grab-notify on <gtk-widget>. . . . . . . . . . . . . . . . 528
                                                group-changed on <gtk-radio-button>. . . . . . . . 92
                                                group-changed on <gtk-radio-menu-item> . . . 293
                                                gtk-about-dialog-get-copyright. . . . . . . . . . . . . 40
                                                gtk-about-dialog-get-license . . . . . . . . . . . . . . . 40
                                                gtk-about-dialog-get-logo . . . . . . . . . . . . . . . . . . 42
                                                gtk-about-dialog-get-logo-icon-name . . . . . . . 42
                                                gtk-about-dialog-get-name . . . . . . . . . . . . . . . . . . 39
                                                gtk-about-dialog-get-version . . . . . . . . . . . . . . . 39
                                                gtk-about-dialog-get-website . . . . . . . . . . . . . . . 41
                                                gtk-about-dialog-get-website-label . . . . . . . . 41
                                                gtk-about-dialog-get-wrap-license . . . . . . . . . 41

gtk-about-dialog-new . . . . . . . . . . . . . . . . . . . . . . . . 39

                                                gtk-about-dialog-set-copyright. . . . . . . . . . . . . 40
                                                gtk-about-dialog-set-license . . . . . . . . . . . . . . . 40
                                                gtk-about-dialog-set-logo . . . . . . . . . . . . . . . . . . 42
                                                gtk-about-dialog-set-logo-icon-name . . . . . . . 42
                                                gtk-about-dialog-set-name . . . . . . . . . . . . . . . . . . 39
                                                gtk-about-dialog-set-version . . . . . . . . . . . . . . . 40
                                                gtk-about-dialog-set-website . . . . . . . . . . . . . . . 41
                                                gtk-about-dialog-set-website-label . . . . . . . . 42
                                                gtk-about-dialog-set-wrap-license . . . . . . . . . 41
                                                gtk-accel-groups-from-object . . . . . . . . . . . . . . 600
                                                gtk-accel-label-get-accel-widget . . . . . . . . . . 50

gtk-accel-label-get-accel-width . . . . . . . . . . . 50

gtk-accel-label-new . . . . . . . . . . . . . . . . . . . . . . . . . 50

gtk-accel-label-refetch. . . . . . . . . . . . . . . . . . . . . 51
gtk-accel-label-set-accel-closure . . . . . . . . . 50
gtk-accel-label-set-accel-widget . . . . . . . . . . 50

gtk-action-activate . . . . . . . . . . . . . . . . . . . . . . . . 338

gtk-action-block-activate-from . . . . . . . . . . . 340
gtk-action-connect-accelerator . . . . . . . . . . . 339
gtk-action-connect-proxy . . . . . . . . . . . . . . . . . . 339

gtk-action-create-icon. . . . . . . . . . . . . . . . . . . . . 338

gtk-action-create-menu-item . . . . . . . . . . . . . . . 338
gtk-action-create-tool-item . . . . . . . . . . . . . . . 338
gtk-action-disconnect-accelerator . . . . . . . . 339
gtk-action-disconnect-proxy . . . . . . . . . . . . . . . 339
gtk-action-get-accel-closure . . . . . . . . . . . . . . 340
gtk-action-get-accel-path . . . . . . . . . . . . . . . . . 340

gtk-action-get-name . . . . . . . . . . . . . . . . . . . . . . . . 336 gtk-action-get-proxies. . . . . . . . . . . . . . . . . . . . . 339

gtk-action-get-sensitive . . . . . . . . . . . . . . . . . . 337

gtk-action-get-visible. . . . . . . . . . . . . . . . . . . . . 337

gtk-action-group-add-action . . . . . . . . . . . . . . . 332
gtk-action-group-add-actions . . . . . . . . . . . . . . 332
gtk-action-group-add-radio-actions . . . . . . . 333
gtk-action-group-add-toggle-actions . . . . . . 333
gtk-action-group-get-action . . . . . . . . . . . . . . . 331
gtk-action-group-get-name . . . . . . . . . . . . . . . . . 330
gtk-action-group-get-sensitive . . . . . . . . . . . 330
gtk-action-group-get-visible . . . . . . . . . . . . . . 331
gtk-action-group-list-actions. . . . . . . . . . . . . 332

gtk-action-group-new . . . . . . . . . . . . . . . . . . . . . . . 330

gtk-action-group-remove-action . . . . . . . . . . . 332
gtk-action-group-set-sensitive . . . . . . . . . . . 331
gtk-action-group-set-visible . . . . . . . . . . . . . . 331
gtk-action-group-translate-string . . . . . . . . 333
gtk-action-is-sensitive . . . . . . . . . . . . . . . . . . . 337

gtk-action-is-visible . . . . . . . . . . . . . . . . . . . . . . 337 gtk-action-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

gtk-action-set-accel-group . . . . . . . . . . . . . . . . 341
gtk-action-set-accel-path . . . . . . . . . . . . . . . . . 340
gtk-action-set-sensitive . . . . . . . . . . . . . . . . . . 337

gtk-action-set-visible. . . . . . . . . . . . . . . . . . . . . 338

gtk-action-unblock-activate-from . . . . . . . . . 340

gtk-adjustment-changed. . . . . . . . . . . . . . . . . . . . . 472

gtk-adjustment-clamp-page . . . . . . . . . . . . . . . . . 471
gtk-adjustment-get-value . . . . . . . . . . . . . . . . . . 471

gtk-adjustment-new . . . . . . . . . . . . . . . . . . . . . . . . . 470

gtk-adjustment-set-value . . . . . . . . . . . . . . . . . . 471
gtk-adjustment-value-changed . . . . . . . . . . . . . . 472
gtk-alignment-get-padding . . . . . . . . . . . . . . . . . 389

gtk-alignment-new . . . . . . . . . . . . . . . . . . . . . . . . . . 388 gtk-alignment-set . . . . . . . . . . . . . . . . . . . . . . . . . . 389

gtk-alignment-set-padding . . . . . . . . . . . . . . . . . 390
gtk-alternative-dialog-button-order . . . . . . . . 7

gtk-arrow-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 gtk-arrow-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 gtk-aspect-frame-new . . . . . . . . . . . . . . . . . . . . . . . 391 gtk-aspect-frame-set . . . . . . . . . . . . . . . . . . . . . . . 391

gtk-assistant-add-action-widget . . . . . . . . . . . 47

                                                gtk-assistant-append-page . . . . . . . . . . . . . . . . . . 45
                                                gtk-assistant-get-current-page. . . . . . . . . . . . . 44
                                                gtk-assistant-get-n-pages . . . . . . . . . . . . . . . . . . 44
                                                gtk-assistant-get-nth-page . . . . . . . . . . . . . . . . . 44
                                                gtk-assistant-get-page-complete . . . . . . . . . . . 47
                                                gtk-assistant-get-page-header-image . . . . . . . 46
                                                gtk-assistant-get-page-side-image . . . . . . . . . 47
                                                gtk-assistant-get-page-title . . . . . . . . . . . . . . . 46
                                                gtk-assistant-get-page-type . . . . . . . . . . . . . . . . 45
                                                gtk-assistant-insert-page . . . . . . . . . . . . . . . . . . 45

gtk-assistant-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

                                                gtk-assistant-prepend-page . . . . . . . . . . . . . . . . . 44
                                                gtk-assistant-remove-action-widget . . . . . . . . 48
                                                gtk-assistant-set-current-page. . . . . . . . . . . . . 44
                                                gtk-assistant-set-page-complete . . . . . . . . . . . 47
                                                gtk-assistant-set-page-header-image . . . . . . . 46
                                                gtk-assistant-set-page-side-image . . . . . . . . . 46
                                                gtk-assistant-set-page-title . . . . . . . . . . . . . . . 46
                                                gtk-assistant-set-page-type . . . . . . . . . . . . . . . . 45
                                                gtk-assistant-update-buttons-state . . . . . . . . 48

gtk-bin-get-child . . . . . . . . . . . . . . . . . . . . . . . . . . 495

                                                gtk-box-get-homogeneous . . . . . . . . . . . . . . . . . . . 498

gtk-box-get-spacing . . . . . . . . . . . . . . . . . . . . . . . . 498 gtk-box-pack-end. . . . . . . . . . . . . . . . . . . . . . . . . . . . 497

                                                gtk-box-pack-end-defaults . . . . . . . . . . . . . . . . . 498

gtk-box-pack-start . . . . . . . . . . . . . . . . . . . . . . . . . 497

                                                gtk-box-pack-start-defaults . . . . . . . . . . . . . . . 497

gtk-box-reorder-child . . . . . . . . . . . . . . . . . . . . . . 499

                                                gtk-box-set-child-packing . . . . . . . . . . . . . . . . . 499
                                                gtk-box-set-homogeneous . . . . . . . . . . . . . . . . . . . 498

gtk-box-set-spacing . . . . . . . . . . . . . . . . . . . . . . . . 498

                                                gtk-button-box-get-child-secondary . . . . . . . 500
                                                gtk-button-box-get-layout . . . . . . . . . . . . . . . . . 500
                                                gtk-button-box-set-child-secondary . . . . . . . 501
                                                gtk-button-box-set-layout . . . . . . . . . . . . . . . . . 501

gtk-button-clicked . . . . . . . . . . . . . . . . . . . . . . . . . . 86 gtk-button-enter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

                                                gtk-button-get-alignment . . . . . . . . . . . . . . . . . . . 88
                                                gtk-button-get-focus-on-click . . . . . . . . . . . . . . 88

gtk-button-get-image . . . . . . . . . . . . . . . . . . . . . . . . 89

                                                gtk-button-get-image-position . . . . . . . . . . . . . . 89

gtk-button-get-label . . . . . . . . . . . . . . . . . . . . . . . . 86 gtk-button-get-relief . . . . . . . . . . . . . . . . . . . . . . . 86

                                                gtk-button-get-use-stock . . . . . . . . . . . . . . . . . . . 87
                                                gtk-button-get-use-underline . . . . . . . . . . . . . . . 87

gtk-button-leave. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 gtk-button-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

                                                gtk-button-new-from-stock . . . . . . . . . . . . . . . . . . 85
                                                gtk-button-new-with-label . . . . . . . . . . . . . . . . . . 85
                                                gtk-button-new-with-mnemonic . . . . . . . . . . . . . . . 85

gtk-button-pressed . . . . . . . . . . . . . . . . . . . . . . . . . . 86 gtk-button-released . . . . . . . . . . . . . . . . . . . . . . . . . 86

                                                gtk-button-set-alignment . . . . . . . . . . . . . . . . . . . 88
                                                gtk-button-set-focus-on-click . . . . . . . . . . . . . . 88

gtk-button-set-image . . . . . . . . . . . . . . . . . . . . . . . . 88

                                                gtk-button-set-image-position . . . . . . . . . . . . . . 89

gtk-button-set-label . . . . . . . . . . . . . . . . . . . . . . . . 87 gtk-button-set-relief . . . . . . . . . . . . . . . . . . . . . . . 86

gtk-button-set-use-stock . . . . . . . . . . . . . . . . . . . 87
gtk-button-set-use-underline . . . . . . . . . . . . . . . 87
gtk-calendar-clear-marks . . . . . . . . . . . . . . . . . . 476

gtk-calendar-freeze . . . . . . . . . . . . . . . . . . . . . . . . 476 gtk-calendar-get-date . . . . . . . . . . . . . . . . . . . . . . 476 gtk-calendar-mark-day . . . . . . . . . . . . . . . . . . . . . . 475 gtk-calendar-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

gtk-calendar-select-day . . . . . . . . . . . . . . . . . . . 475
gtk-calendar-select-month . . . . . . . . . . . . . . . . . 475
gtk-calendar-set-display-options . . . . . . . . . 476

gtk-calendar-thaw . . . . . . . . . . . . . . . . . . . . . . . . . . 476

gtk-calendar-unmark-day . . . . . . . . . . . . . . . . . . . 475
gtk-cell-editable-editing-done . . . . . . . . . . . 244
gtk-cell-editable-remove-widget . . . . . . . . . . 244
gtk-cell-editable-start-editing . . . . . . . . . . 244
gtk-cell-layout-add-attribute. . . . . . . . . . . . . 238

gtk-cell-layout-clear . . . . . . . . . . . . . . . . . . . . . . 238

gtk-cell-layout-clear-attributes . . . . . . . . . 238
gtk-cell-layout-pack-end . . . . . . . . . . . . . . . . . . 237
gtk-cell-layout-pack-start . . . . . . . . . . . . . . . . 237
gtk-cell-layout-reorder . . . . . . . . . . . . . . . . . . . 238
gtk-cell-renderer-accel-new . . . . . . . . . . . . . . . 245
gtk-cell-renderer-activate . . . . . . . . . . . . . . . . 241
gtk-cell-renderer-combo-new . . . . . . . . . . . . . . . 246
gtk-cell-renderer-editing-canceled . . . . . . . 242
gtk-cell-renderer-get-fixed-size . . . . . . . . . 242
gtk-cell-renderer-pixbuf-new . . . . . . . . . . . . . . 247
gtk-cell-renderer-progress-new . . . . . . . . . . . 248
gtk-cell-renderer-render . . . . . . . . . . . . . . . . . . 241
gtk-cell-renderer-set-fixed-size . . . . . . . . . 243
gtk-cell-renderer-spin-new . . . . . . . . . . . . . . . . 249
gtk-cell-renderer-start-editing . . . . . . . . . . 242
gtk-cell-renderer-stop-editing . . . . . . . . . . . 242
gtk-cell-renderer-text-new . . . . . . . . . . . . . . . . 252
gtk-cell-renderer-toggle-get-active . . . . . . 254
gtk-cell-renderer-toggle-get-radio . . . . . . . 253
gtk-cell-renderer-toggle-new . . . . . . . . . . . . . . 253
gtk-cell-renderer-toggle-set-active . . . . . . 254
gtk-cell-renderer-toggle-set-radio . . . . . . . 254
gtk-cell-view-get-cell-renderers . . . . . . . . . 219
gtk-cell-view-get-displayed-row . . . . . . . . . . 218
gtk-cell-view-get-size-of-row. . . . . . . . . . . . . 218

gtk-cell-view-new . . . . . . . . . . . . . . . . . . . . . . . . . . 217

gtk-cell-view-new-with-markup. . . . . . . . . . . . . 217
gtk-cell-view-new-with-pixbuf. . . . . . . . . . . . . 218
gtk-cell-view-new-with-text . . . . . . . . . . . . . . . 217
gtk-cell-view-set-background-color . . . . . . . 219
gtk-cell-view-set-displayed-row . . . . . . . . . . 218
gtk-cell-view-set-model . . . . . . . . . . . . . . . . . . . 218

gtk-check-button-new . . . . . . . . . . . . . . . . . . . . . . . . 90

gtk-check-button-new-with-label . . . . . . . . . . . 90
gtk-check-button-new-with-mnemonic . . . . . . . . 90
gtk-check-menu-item-get-active . . . . . . . . . . . 295
gtk-check-menu-item-new . . . . . . . . . . . . . . . . . . . 295
gtk-check-menu-item-new-with-label . . . . . . . 295
gtk-check-menu-item-set-active . . . . . . . . . . . 296
gtk-check-menu-item-toggled . . . . . . . . . . . . . . . 296
gtk-color-button-get-alpha . . . . . . . . . . . . . . . . 348

                                                gtk-color-button-get-color . . . . . . . . . . . . . . . . 348
                                                gtk-color-button-get-title . . . . . . . . . . . . . . . . 349
                                                gtk-color-button-get-use-alpha . . . . . . . . . . . 349

gtk-color-button-new . . . . . . . . . . . . . . . . . . . . . . . 347

                                                gtk-color-button-new-with-color . . . . . . . . . . 347
                                                gtk-color-button-set-alpha . . . . . . . . . . . . . . . . 348
                                                gtk-color-button-set-color . . . . . . . . . . . . . . . . 348
                                                gtk-color-button-set-title . . . . . . . . . . . . . . . . 349
                                                gtk-color-button-set-use-alpha . . . . . . . . . . . 348
                                                gtk-color-selection-dialog-new . . . . . . . . . . . 352
                                                gtk-color-selection-get-has-palette . . . . . . 350
                                                gtk-color-selection-is-adjusting . . . . . . . . . 351
                                                gtk-color-selection-new . . . . . . . . . . . . . . . . . . . 350
                                                gtk-color-selection-set-has-palette . . . . . . 350
                                                gtk-combo-box-append-text . . . . . . . . . . . . . . . . . 270
                                                gtk-combo-box-entry-get-text-column . . . . . . 275
                                                gtk-combo-box-entry-new . . . . . . . . . . . . . . . . . . . 274
                                                gtk-combo-box-entry-new-text . . . . . . . . . . . . . . 275
                                                gtk-combo-box-entry-new-with-model . . . . . . . 274
                                                gtk-combo-box-entry-set-text-column . . . . . . 275
                                                gtk-combo-box-get-active . . . . . . . . . . . . . . . . . . 268
                                                gtk-combo-box-get-active-iter. . . . . . . . . . . . . 269
                                                gtk-combo-box-get-active-text. . . . . . . . . . . . . 271
                                                gtk-combo-box-get-add-tearoffs . . . . . . . . . . . 272
                                                gtk-combo-box-get-focus-on-click . . . . . . . . . 273
                                                gtk-combo-box-get-model . . . . . . . . . . . . . . . . . . . 269
                                                gtk-combo-box-get-popup-accessible . . . . . . . 271
                                                gtk-combo-box-get-row-span-column . . . . . . . . 268
                                                gtk-combo-box-get-title . . . . . . . . . . . . . . . . . . . 272
                                                gtk-combo-box-get-wrap-width . . . . . . . . . . . . . . 267
                                                gtk-combo-box-insert-text . . . . . . . . . . . . . . . . . 270

gtk-combo-box-new . . . . . . . . . . . . . . . . . . . . . . . . . . 267 gtk-combo-box-new-text. . . . . . . . . . . . . . . . . . . . . 270

                                                gtk-combo-box-new-with-model . . . . . . . . . . . . . . 267

gtk-combo-box-popdown . . . . . . . . . . . . . . . . . . . . . . 271 gtk-combo-box-popup . . . . . . . . . . . . . . . . . . . . . . . . 271

                                                gtk-combo-box-prepend-text . . . . . . . . . . . . . . . . 270
                                                gtk-combo-box-remove-text . . . . . . . . . . . . . . . . . 271
                                                gtk-combo-box-set-active . . . . . . . . . . . . . . . . . . 268
                                                gtk-combo-box-set-active-iter. . . . . . . . . . . . . 269
                                                gtk-combo-box-set-add-tearoffs . . . . . . . . . . . 272
                                                gtk-combo-box-set-focus-on-click . . . . . . . . . 273
                                                gtk-combo-box-set-model . . . . . . . . . . . . . . . . . . . 269
                                                gtk-combo-box-set-row-span-column . . . . . . . . 268
                                                gtk-combo-box-set-title . . . . . . . . . . . . . . . . . . . 272
                                                gtk-combo-box-set-wrap-width . . . . . . . . . . . . . . 268

gtk-container-add . . . . . . . . . . . . . . . . . . . . . . . . . . 503

                                                gtk-container-check-resize . . . . . . . . . . . . . . . . 504
                                                gtk-container-child-get-property . . . . . . . . . 506
                                                gtk-container-child-set-property . . . . . . . . . 506
                                                gtk-container-child-type . . . . . . . . . . . . . . . . . . 506
                                                gtk-container-get-border-width . . . . . . . . . . . 507
                                                gtk-container-get-children . . . . . . . . . . . . . . . . 504
                                                gtk-container-get-focus-hadjustment . . . . . . 505
                                                gtk-container-get-focus-vadjustment . . . . . . 505
                                                gtk-container-get-resize-mode. . . . . . . . . . . . . 504
                                                gtk-container-propagate-expose . . . . . . . . . . . 507

gtk-container-remove . . . . . . . . . . . . . . . . . . . . . . . 504

gtk-container-resize-children. . . . . . . . . . . . . 506
gtk-container-set-border-width . . . . . . . . . . . 507
gtk-container-set-focus-chain. . . . . . . . . . . . . 507
gtk-container-set-focus-child. . . . . . . . . . . . . 505
gtk-container-set-focus-hadjustment . . . . . . 505
gtk-container-set-focus-vadjustment . . . . . . 505
gtk-container-set-resize-mode. . . . . . . . . . . . . 504
gtk-container-unset-focus-chain . . . . . . . . . . 508

gtk-curve-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 gtk-curve-reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 gtk-curve-set-gamma . . . . . . . . . . . . . . . . . . . . . . . . 571 gtk-curve-set-range . . . . . . . . . . . . . . . . . . . . . . . . 571

gtk-dialog-add-action-widget . . . . . . . . . . . . . . . . 6

gtk-dialog-add-button . . . . . . . . . . . . . . . . . . . . . . . . 6

gtk-dialog-get-has-separator . . . . . . . . . . . . . . . . 6
gtk-dialog-get-response-for-widget . . . . . . . . . 7

gtk-dialog-response . . . . . . . . . . . . . . . . . . . . . . . . . . 5 gtk-dialog-run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

gtk-dialog-set-default-response. . . . . . . . . . . . . 6
gtk-dialog-set-has-separator . . . . . . . . . . . . . . . . 7
gtk-dialog-set-response-sensitive . . . . . . . . . . 7

gtk-drag-dest-set . . . . . . . . . . . . . . . . . . . . . . . . . . 602 gtk-drag-finish. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 gtk-drag-get-data . . . . . . . . . . . . . . . . . . . . . . . . . . 602

gtk-drag-source-set-icon . . . . . . . . . . . . . . . . . . 602

gtk-drawing-area-new . . . . . . . . . . . . . . . . . . . . . . . 478

gtk-editable-copy-clipboard . . . . . . . . . . . . . . . 121
gtk-editable-cut-clipboard . . . . . . . . . . . . . . . . 121
gtk-editable-delete-selection. . . . . . . . . . . . . 121
gtk-editable-delete-text . . . . . . . . . . . . . . . . . . 121

gtk-editable-get-chars. . . . . . . . . . . . . . . . . . . . . 121

gtk-editable-get-editable . . . . . . . . . . . . . . . . . 122
gtk-editable-get-position . . . . . . . . . . . . . . . . . 122
gtk-editable-get-selection-bounds . . . . . . . . 120
gtk-editable-insert-text . . . . . . . . . . . . . . . . . . 120
gtk-editable-paste-clipboard . . . . . . . . . . . . . . 121
gtk-editable-select-region . . . . . . . . . . . . . . . . 120
gtk-editable-set-editable . . . . . . . . . . . . . . . . . 122
gtk-editable-set-position . . . . . . . . . . . . . . . . . 122
gtk-entry-completion-complete. . . . . . . . . . . . . 109
gtk-entry-completion-delete-action . . . . . . . 109
gtk-entry-completion-get-entry . . . . . . . . . . . 108
gtk-entry-completion-get-model . . . . . . . . . . . 109
gtk-entry-completion-insert-prefix . . . . . . . 109
gtk-entry-completion-new . . . . . . . . . . . . . . . . . . 108
gtk-entry-completion-set-model . . . . . . . . . . . 108
gtk-entry-get-activates-default . . . . . . . . . . 102
gtk-entry-get-alignment . . . . . . . . . . . . . . . . . . . 104
gtk-entry-get-completion . . . . . . . . . . . . . . . . . . 105
gtk-entry-get-has-frame . . . . . . . . . . . . . . . . . . . 102
gtk-entry-get-inner-border . . . . . . . . . . . . . . . . 102
gtk-entry-get-invisible-char . . . . . . . . . . . . . . 104

gtk-entry-get-layout . . . . . . . . . . . . . . . . . . . . . . . 104

gtk-entry-get-layout-offsets . . . . . . . . . . . . . . 104
gtk-entry-get-max-length . . . . . . . . . . . . . . . . . . 105

gtk-entry-get-text . . . . . . . . . . . . . . . . . . . . . . . . . 101

gtk-entry-get-visibility . . . . . . . . . . . . . . . . . . 105
gtk-entry-get-width-chars . . . . . . . . . . . . . . . . . 103

                                                gtk-entry-set-activates-default . . . . . . . . . . 103
                                                gtk-entry-set-alignment . . . . . . . . . . . . . . . . . . . 104
                                                gtk-entry-set-completion . . . . . . . . . . . . . . . . . . 105
                                                gtk-entry-set-has-frame . . . . . . . . . . . . . . . . . . . 103
                                                gtk-entry-set-inner-border . . . . . . . . . . . . . . . . 103
                                                gtk-entry-set-invisible-char . . . . . . . . . . . . . . 102
                                                gtk-entry-set-max-length . . . . . . . . . . . . . . . . . . 102

gtk-entry-set-text . . . . . . . . . . . . . . . . . . . . . . . . . 101

                                                gtk-entry-set-visibility . . . . . . . . . . . . . . . . . . 101
                                                gtk-entry-set-width-chars . . . . . . . . . . . . . . . . . 103
                                                gtk-event-box-get-above-child. . . . . . . . . . . . . 479
                                                gtk-event-box-get-visible-window . . . . . . . . . 480

gtk-event-box-new . . . . . . . . . . . . . . . . . . . . . . . . . . 479

                                                gtk-event-box-set-above-child. . . . . . . . . . . . . 479
                                                gtk-event-box-set-visible-window . . . . . . . . . 480
                                                gtk-expander-get-expanded . . . . . . . . . . . . . . . . . 423

gtk-expander-get-label. . . . . . . . . . . . . . . . . . . . . 423

                                                gtk-expander-get-label-widget. . . . . . . . . . . . . 425
                                                gtk-expander-get-spacing . . . . . . . . . . . . . . . . . . 423
                                                gtk-expander-get-use-markup . . . . . . . . . . . . . . . 424
                                                gtk-expander-get-use-underline . . . . . . . . . . . 424

gtk-expander-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

                                                gtk-expander-new-with-mnemonic . . . . . . . . . . . 422
                                                gtk-expander-set-expanded . . . . . . . . . . . . . . . . . 422

gtk-expander-set-label. . . . . . . . . . . . . . . . . . . . . 423

                                                gtk-expander-set-label-widget. . . . . . . . . . . . . 424
                                                gtk-expander-set-spacing . . . . . . . . . . . . . . . . . . 423
                                                gtk-expander-set-use-markup . . . . . . . . . . . . . . . 424
                                                gtk-expander-set-use-underline . . . . . . . . . . . 424
                                                gtk-file-chooser-add-filter . . . . . . . . . . . . . . . 370
                                                gtk-file-chooser-add-shortcut-folder. . . . . 603
                                                gtk-file-chooser-add-shortcut-folder-uri

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

                                                gtk-file-chooser-button-get-title . . . . . . . . 373
                                                gtk-file-chooser-button-new . . . . . . . . . . . . . . . 372
                                                gtk-file-chooser-button-set-title . . . . . . . . 373
                                                gtk-file-chooser-get-action . . . . . . . . . . . . . . . 363
                                                gtk-file-chooser-get-current-folder . . . . . . 367
                                                gtk-file-chooser-get-extra-widget . . . . . . . . 370
                                                gtk-file-chooser-get-filename. . . . . . . . . . . . . 364
                                                gtk-file-chooser-get-filenames . . . . . . . . . . . 366
                                                gtk-file-chooser-get-filter . . . . . . . . . . . . . . . 371
                                                gtk-file-chooser-get-local-only . . . . . . . . . . 363
                                                gtk-file-chooser-get-preview-uri . . . . . . . . . 369
                                                gtk-file-chooser-get-preview-widget . . . . . . 369
                                                gtk-file-chooser-get-show-hidden . . . . . . . . . 364
                                                gtk-file-chooser-get-uri . . . . . . . . . . . . . . . . . . 367
                                                gtk-file-chooser-get-uris . . . . . . . . . . . . . . . . . 369
                                                gtk-file-chooser-list-filters. . . . . . . . . . . . . 371
                                                gtk-file-chooser-list-shortcut-folder-uris

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604

                                                gtk-file-chooser-list-shortcut-folders . . 604
                                                gtk-file-chooser-remove-filter . . . . . . . . . . . 370
                                                gtk-file-chooser-remove-shortcut-folder

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604

                                                gtk-file-chooser-remove-shortcut-folder-uri

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604

                                                gtk-file-chooser-select-all . . . . . . . . . . . . . . . 366

gtk-file-chooser-select-filename . . . . . . . . . 365
gtk-file-chooser-select-uri . . . . . . . . . . . . . . . 368
gtk-file-chooser-set-action . . . . . . . . . . . . . . . 363
gtk-file-chooser-set-current-folder . . . . . . 366
gtk-file-chooser-set-current-name . . . . . . . . 364
gtk-file-chooser-set-extra-widget . . . . . . . . 370
gtk-file-chooser-set-filename. . . . . . . . . . . . . 365
gtk-file-chooser-set-filter . . . . . . . . . . . . . . . 371
gtk-file-chooser-set-local-only . . . . . . . . . . 363
gtk-file-chooser-set-preview-widget . . . . . . 369
gtk-file-chooser-set-show-hidden . . . . . . . . . 364
gtk-file-chooser-set-uri . . . . . . . . . . . . . . . . . . 367
gtk-file-chooser-unselect-all. . . . . . . . . . . . . 366
gtk-file-chooser-unselect-filename . . . . . . . 366
gtk-file-chooser-unselect-uri. . . . . . . . . . . . . 368
gtk-file-chooser-widget-new . . . . . . . . . . . . . . . 377
gtk-file-filter-add-mime-type. . . . . . . . . . . . . 379
gtk-file-filter-add-pattern . . . . . . . . . . . . . . . 379
gtk-file-filter-add-pixbuf-formats . . . . . . . 379
gtk-file-filter-get-name . . . . . . . . . . . . . . . . . . 379
gtk-file-filter-get-needed . . . . . . . . . . . . . . . . 379

gtk-file-filter-new . . . . . . . . . . . . . . . . . . . . . . . . 378

gtk-file-filter-set-name . . . . . . . . . . . . . . . . . . 378
gtk-file-selection-complete . . . . . . . . . . . . . . . 355
gtk-file-selection-get-filename . . . . . . . . . . 355

gtk-file-selection-new. . . . . . . . . . . . . . . . . . . . . 354

gtk-file-selection-set-filename . . . . . . . . . . 354
gtk-fixed-get-has-window . . . . . . . . . . . . . . . . . . 398

gtk-fixed-move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 gtk-fixed-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 gtk-fixed-put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

gtk-fixed-set-has-window . . . . . . . . . . . . . . . . . . 398
gtk-font-button-get-font-name. . . . . . . . . . . . . 381
gtk-font-button-get-show-size. . . . . . . . . . . . . 382
gtk-font-button-get-show-style . . . . . . . . . . . 381
gtk-font-button-get-title . . . . . . . . . . . . . . . . . 383
gtk-font-button-get-use-font . . . . . . . . . . . . . . 382
gtk-font-button-get-use-size . . . . . . . . . . . . . . 383

gtk-font-button-new . . . . . . . . . . . . . . . . . . . . . . . . 380

gtk-font-button-new-with-font. . . . . . . . . . . . . 380
gtk-font-button-set-font-name. . . . . . . . . . . . . 381
gtk-font-button-set-show-size. . . . . . . . . . . . . 381
gtk-font-button-set-show-style . . . . . . . . . . . 381
gtk-font-button-set-title . . . . . . . . . . . . . . . . . 383
gtk-font-button-set-use-font . . . . . . . . . . . . . . 382
gtk-font-button-set-use-size . . . . . . . . . . . . . . 382
gtk-font-selection-dialog-new. . . . . . . . . . . . . 386
gtk-font-selection-get-font-name . . . . . . . . . 384
gtk-font-selection-get-preview-text . . . . . . 385

gtk-font-selection-new. . . . . . . . . . . . . . . . . . . . . 384

gtk-font-selection-set-font-name . . . . . . . . . 384
gtk-font-selection-set-preview-text . . . . . . 385

gtk-frame-get-label . . . . . . . . . . . . . . . . . . . . . . . . 427

gtk-frame-get-label-align . . . . . . . . . . . . . . . . . 427
gtk-frame-get-label-widget . . . . . . . . . . . . . . . . 427
gtk-frame-get-shadow-type . . . . . . . . . . . . . . . . . 428

gtk-frame-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 gtk-frame-set-label . . . . . . . . . . . . . . . . . . . . . . . . 426

                                                gtk-frame-set-label-align . . . . . . . . . . . . . . . . . 427
                                                gtk-frame-set-label-widget . . . . . . . . . . . . . . . . 426
                                                gtk-frame-set-shadow-type . . . . . . . . . . . . . . . . . 427

gtk-gamma-curve-new . . . . . . . . . . . . . . . . . . . . . . . . 572

                                                gtk-handle-box-get-handle-position . . . . . . . 482
                                                gtk-handle-box-get-shadow-type . . . . . . . . . . . 483
                                                gtk-handle-box-get-snap-edge . . . . . . . . . . . . . . 483

gtk-handle-box-new . . . . . . . . . . . . . . . . . . . . . . . . . 482

                                                gtk-handle-box-set-handle-position . . . . . . . 482
                                                gtk-handle-box-set-shadow-type . . . . . . . . . . . 482
                                                gtk-handle-box-set-snap-edge . . . . . . . . . . . . . . 482

gtk-hbox-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 gtk-hbutton-box-new . . . . . . . . . . . . . . . . . . . . . . . . 395 gtk-hpaned-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 gtk-hruler-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 gtk-hscale-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

                                                gtk-hscale-new-with-range . . . . . . . . . . . . . . . . . 110

gtk-hscrollbar-new . . . . . . . . . . . . . . . . . . . . . . . . . 431 gtk-hseparator-new . . . . . . . . . . . . . . . . . . . . . . . . . 429 gtk-icon-size-lookup . . . . . . . . . . . . . . . . . . . . . . . 605

                                                gtk-icon-size-lookup-for-settings . . . . . . . . 605
                                                gtk-icon-theme-list-icons . . . . . . . . . . . . . . . . . 606
                                                gtk-icon-theme-load-icon . . . . . . . . . . . . . . . . . . 606
                                                gtk-icon-view-create-drag-icon . . . . . . . . . . . 230
                                                gtk-icon-view-get-column-spacing . . . . . . . . . 226
                                                gtk-icon-view-get-columns . . . . . . . . . . . . . . . . . 224
                                                gtk-icon-view-get-item-width . . . . . . . . . . . . . . 225
                                                gtk-icon-view-get-margin . . . . . . . . . . . . . . . . . . 226
                                                gtk-icon-view-get-markup-column . . . . . . . . . . 222
                                                gtk-icon-view-get-model . . . . . . . . . . . . . . . . . . . 221
                                                gtk-icon-view-get-orientation. . . . . . . . . . . . . 224
                                                gtk-icon-view-get-path-at-pos. . . . . . . . . . . . . 223
                                                gtk-icon-view-get-pixbuf-column . . . . . . . . . . 223
                                                gtk-icon-view-get-reorderable. . . . . . . . . . . . . 229
                                                gtk-icon-view-get-row-spacing. . . . . . . . . . . . . 226
                                                gtk-icon-view-get-selected-items . . . . . . . . . 227
                                                gtk-icon-view-get-selection-mode . . . . . . . . . 224
                                                gtk-icon-view-get-spacing . . . . . . . . . . . . . . . . . 225
                                                gtk-icon-view-get-text-column. . . . . . . . . . . . . 222
                                                gtk-icon-view-item-activated . . . . . . . . . . . . . . 228

gtk-icon-view-new . . . . . . . . . . . . . . . . . . . . . . . . . . 221

                                                gtk-icon-view-new-with-model . . . . . . . . . . . . . . 221
                                                gtk-icon-view-path-is-selected . . . . . . . . . . . 227
                                                gtk-icon-view-scroll-to-path . . . . . . . . . . . . . . 228
                                                gtk-icon-view-select-all . . . . . . . . . . . . . . . . . . 228
                                                gtk-icon-view-select-path . . . . . . . . . . . . . . . . . 227
                                                gtk-icon-view-set-column-spacing . . . . . . . . . 226
                                                gtk-icon-view-set-columns . . . . . . . . . . . . . . . . . 224
                                                gtk-icon-view-set-cursor . . . . . . . . . . . . . . . . . . 223
                                                gtk-icon-view-set-drag-dest-item . . . . . . . . . 229
                                                gtk-icon-view-set-item-width . . . . . . . . . . . . . . 225
                                                gtk-icon-view-set-margin . . . . . . . . . . . . . . . . . . 226
                                                gtk-icon-view-set-markup-column . . . . . . . . . . 222
                                                gtk-icon-view-set-model . . . . . . . . . . . . . . . . . . . 221
                                                gtk-icon-view-set-orientation. . . . . . . . . . . . . 224
                                                gtk-icon-view-set-pixbuf-column . . . . . . . . . . 222
                                                gtk-icon-view-set-reorderable. . . . . . . . . . . . . 229
                                                gtk-icon-view-set-row-spacing. . . . . . . . . . . . . 225

gtk-icon-view-set-selection-mode . . . . . . . . . 223
gtk-icon-view-set-spacing . . . . . . . . . . . . . . . . . 225
gtk-icon-view-set-text-column. . . . . . . . . . . . . 222
gtk-icon-view-unselect-all . . . . . . . . . . . . . . . . 228
gtk-icon-view-unselect-path . . . . . . . . . . . . . . . 227
gtk-icon-view-unset-model-drag-dest . . . . . . 229
gtk-im-context-delete-surrounding . . . . . . . . 565
gtk-im-context-filter-keypress . . . . . . . . . . . 563
gtk-im-context-focus-in . . . . . . . . . . . . . . . . . . . 563
gtk-im-context-focus-out . . . . . . . . . . . . . . . . . . 564
gtk-im-context-get-surrounding . . . . . . . . . . . 565

gtk-im-context-reset . . . . . . . . . . . . . . . . . . . . . . . 564

gtk-im-context-set-client-window . . . . . . . . . 563
gtk-im-context-set-cursor-location . . . . . . . 564
gtk-im-context-set-surrounding . . . . . . . . . . . 564
gtk-im-context-set-use-preedit . . . . . . . . . . . 564
gtk-im-context-simple-add-table . . . . . . . . . . 484
gtk-im-context-simple-new . . . . . . . . . . . . . . . . . 484
gtk-im-multicontext-new . . . . . . . . . . . . . . . . . . . 485

gtk-image-clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

gtk-image-get-animation. . . . . . . . . . . . . . . . . . . . . 54

gtk-image-get-pixbuf . . . . . . . . . . . . . . . . . . . . . . . . 54

gtk-image-get-pixel-size . . . . . . . . . . . . . . . . . . . 58
gtk-image-get-storage-type . . . . . . . . . . . . . . . . . 54
gtk-image-menu-item-get-image. . . . . . . . . . . . . 291
gtk-image-menu-item-new . . . . . . . . . . . . . . . . . . . 291
gtk-image-menu-item-new-from-stock . . . . . . . 291
gtk-image-menu-item-new-with-label . . . . . . . 292
gtk-image-menu-item-set-image. . . . . . . . . . . . . 291

gtk-image-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

gtk-image-new-from-animation . . . . . . . . . . . . . . . 56
gtk-image-new-from-file. . . . . . . . . . . . . . . . . . . . . 54
gtk-image-new-from-icon-name . . . . . . . . . . . . . . . 56
gtk-image-new-from-icon-set . . . . . . . . . . . . . . . . 55
gtk-image-new-from-image . . . . . . . . . . . . . . . . . . . 55
gtk-image-new-from-pixbuf . . . . . . . . . . . . . . . . . . 55
gtk-image-new-from-pixmap . . . . . . . . . . . . . . . . . . 55
gtk-image-new-from-stock . . . . . . . . . . . . . . . . . . . 56
gtk-image-set-from-animation . . . . . . . . . . . . . . . 57
gtk-image-set-from-file. . . . . . . . . . . . . . . . . . . . . 56
gtk-image-set-from-icon-name . . . . . . . . . . . . . . . 58
gtk-image-set-from-icon-set . . . . . . . . . . . . . . . . 57
gtk-image-set-from-image . . . . . . . . . . . . . . . . . . . 57
gtk-image-set-from-pixbuf . . . . . . . . . . . . . . . . . . 57
gtk-image-set-from-pixmap . . . . . . . . . . . . . . . . . . 57
gtk-image-set-from-stock . . . . . . . . . . . . . . . . . . . 57
gtk-image-set-pixel-size . . . . . . . . . . . . . . . . . . . 58

gtk-input-dialog-new . . . . . . . . . . . . . . . . . . . . . . . 387

gtk-invisible-get-screen. . . . . . . . . . . . . . . . . . . . . 8

gtk-invisible-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

gtk-invisible-new-for-screen . . . . . . . . . . . . . . . . 8
gtk-invisible-set-screen. . . . . . . . . . . . . . . . . . . . . 8

gtk-item-deselect . . . . . . . . . . . . . . . . . . . . . . . . . . 509 gtk-item-select. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 gtk-item-toggle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 gtk-label-get-angle . . . . . . . . . . . . . . . . . . . . . . . . . 69

gtk-label-get-attributes . . . . . . . . . . . . . . . . . . . 66
gtk-label-get-ellipsize. . . . . . . . . . . . . . . . . . . . . 66

gtk-label-get-justify . . . . . . . . . . . . . . . . . . . . . . . 66 gtk-label-get-label . . . . . . . . . . . . . . . . . . . . . . . . . 67 gtk-label-get-layout . . . . . . . . . . . . . . . . . . . . . . . . 67

                                                gtk-label-get-layout-offsets . . . . . . . . . . . . . . . 64
                                                gtk-label-get-line-wrap. . . . . . . . . . . . . . . . . . . . . 67
                                                gtk-label-get-line-wrap-mode . . . . . . . . . . . . . . . 68
                                                gtk-label-get-max-width-chars . . . . . . . . . . . . . . 67
                                                gtk-label-get-mnemonic-keyval . . . . . . . . . . . . . . 64
                                                gtk-label-get-mnemonic-widget . . . . . . . . . . . . . . 68
                                                gtk-label-get-selectable . . . . . . . . . . . . . . . . . . . 64
                                                gtk-label-get-selection-bounds. . . . . . . . . . . . . 68
                                                gtk-label-get-single-line-mode. . . . . . . . . . . . . 69

gtk-label-get-text . . . . . . . . . . . . . . . . . . . . . . . . . . 65

                                                gtk-label-get-use-markup . . . . . . . . . . . . . . . . . . . 68
                                                gtk-label-get-use-underline . . . . . . . . . . . . . . . . 68
                                                gtk-label-get-width-chars . . . . . . . . . . . . . . . . . . 67

gtk-label-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

                                                gtk-label-new-with-mnemonic . . . . . . . . . . . . . . . . 65
                                                gtk-label-select-region. . . . . . . . . . . . . . . . . . . . . 65

gtk-label-set-angle . . . . . . . . . . . . . . . . . . . . . . . . . 70

                                                gtk-label-set-attributes . . . . . . . . . . . . . . . . . . . 62
                                                gtk-label-set-ellipsize. . . . . . . . . . . . . . . . . . . . . 63

gtk-label-set-justify . . . . . . . . . . . . . . . . . . . . . . . 63 gtk-label-set-label . . . . . . . . . . . . . . . . . . . . . . . . . 69

                                                gtk-label-set-line-wrap. . . . . . . . . . . . . . . . . . . . . 63
                                                gtk-label-set-line-wrap-mode . . . . . . . . . . . . . . . 64

gtk-label-set-markup . . . . . . . . . . . . . . . . . . . . . . . . 62

                                                gtk-label-set-markup-with-mnemonic . . . . . . . . 62
                                                gtk-label-set-max-width-chars . . . . . . . . . . . . . . 63
                                                gtk-label-set-mnemonic-widget . . . . . . . . . . . . . . 65

gtk-label-set-pattern . . . . . . . . . . . . . . . . . . . . . . . 62

                                                gtk-label-set-selectable . . . . . . . . . . . . . . . . . . . 66
                                                gtk-label-set-single-line-mode. . . . . . . . . . . . . 69

gtk-label-set-text . . . . . . . . . . . . . . . . . . . . . . . . . . 61

                                                gtk-label-set-text-with-mnemonic . . . . . . . . . . 66
                                                gtk-label-set-use-markup . . . . . . . . . . . . . . . . . . . 69
                                                gtk-label-set-use-underline . . . . . . . . . . . . . . . . 69
                                                gtk-label-set-width-chars . . . . . . . . . . . . . . . . . . 63
                                                gtk-layout-get-hadjustment . . . . . . . . . . . . . . . . 402

gtk-layout-get-size . . . . . . . . . . . . . . . . . . . . . . . . 402

                                                gtk-layout-get-vadjustment . . . . . . . . . . . . . . . . 403

gtk-layout-move. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 gtk-layout-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 gtk-layout-put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

                                                gtk-layout-set-hadjustment . . . . . . . . . . . . . . . . 403

gtk-layout-set-size . . . . . . . . . . . . . . . . . . . . . . . . 402

                                                gtk-layout-set-vadjustment . . . . . . . . . . . . . . . . 403
                                                gtk-link-button-get-uri. . . . . . . . . . . . . . . . . . . . . 98

gtk-link-button-new . . . . . . . . . . . . . . . . . . . . . . . . . 98

                                                gtk-link-button-new-with-label. . . . . . . . . . . . . 98
                                                gtk-link-button-set-uri. . . . . . . . . . . . . . . . . . . . . 99

gtk-list-store-append . . . . . . . . . . . . . . . . . . . . . . 258 gtk-list-store-clear . . . . . . . . . . . . . . . . . . . . . . . 258 gtk-list-store-insert . . . . . . . . . . . . . . . . . . . . . . 257

                                                gtk-list-store-insert-after . . . . . . . . . . . . . . . 258
                                                gtk-list-store-insert-before . . . . . . . . . . . . . . 258
                                                gtk-list-store-iter-is-valid . . . . . . . . . . . . . . 259
                                                gtk-list-store-move-after . . . . . . . . . . . . . . . . . 260

gtk-list-store-move-before . . . . . . . . . . . . . . . . 259

gtk-list-store-new . . . . . . . . . . . . . . . . . . . . . . . . . 257 gtk-list-store-prepend. . . . . . . . . . . . . . . . . . . . . 258 gtk-list-store-remove . . . . . . . . . . . . . . . . . . . . . . 257 gtk-list-store-reorder. . . . . . . . . . . . . . . . . . . . . 259

gtk-list-store-set-value . . . . . . . . . . . . . . . . . . 257

gtk-list-store-swap . . . . . . . . . . . . . . . . . . . . . . . . 259 gtk-main-iteration-do . . . . . . . . . . . . . . . . . . . . . . 606 gtk-menu-attach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

gtk-menu-bar-get-pack-direction . . . . . . . . . . 282

gtk-menu-bar-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

gtk-menu-bar-set-pack-direction . . . . . . . . . . 282

gtk-menu-detach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

gtk-menu-get-accel-group . . . . . . . . . . . . . . . . . . 279

gtk-menu-get-active . . . . . . . . . . . . . . . . . . . . . . . . 280

gtk-menu-get-attach-widget . . . . . . . . . . . . . . . . 281
gtk-menu-get-for-attach-widget . . . . . . . . . . . 281
gtk-menu-get-tearoff-state . . . . . . . . . . . . . . . . 279

gtk-menu-get-title . . . . . . . . . . . . . . . . . . . . . . . . . 280 gtk-menu-item-activate. . . . . . . . . . . . . . . . . . . . . 285 gtk-menu-item-deselect. . . . . . . . . . . . . . . . . . . . . 285

gtk-menu-item-get-right-justified . . . . . . . . 285
gtk-menu-item-get-submenu . . . . . . . . . . . . . . . . . 286

gtk-menu-item-new . . . . . . . . . . . . . . . . . . . . . . . . . . 283

gtk-menu-item-new-with-label . . . . . . . . . . . . . . 283
gtk-menu-item-new-with-mnemonic . . . . . . . . . . 283
gtk-menu-item-remove-submenu . . . . . . . . . . . . . . 284

gtk-menu-item-select . . . . . . . . . . . . . . . . . . . . . . . 285

gtk-menu-item-set-accel-path . . . . . . . . . . . . . . 284
gtk-menu-item-set-right-justified . . . . . . . . 284
gtk-menu-item-set-submenu . . . . . . . . . . . . . . . . . 284
gtk-menu-item-toggle-size-allocate . . . . . . . 285
gtk-menu-item-toggle-size-request . . . . . . . . 285

gtk-menu-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 gtk-menu-popdown. . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 gtk-menu-popup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 gtk-menu-reorder-child. . . . . . . . . . . . . . . . . . . . . 277 gtk-menu-reposition . . . . . . . . . . . . . . . . . . . . . . . . 280

gtk-menu-set-accel-group . . . . . . . . . . . . . . . . . . 278
gtk-menu-set-accel-path . . . . . . . . . . . . . . . . . . . 279

gtk-menu-set-active . . . . . . . . . . . . . . . . . . . . . . . . 280 gtk-menu-set-monitor . . . . . . . . . . . . . . . . . . . . . . . 281 gtk-menu-set-screen . . . . . . . . . . . . . . . . . . . . . . . . 277

gtk-menu-set-tearoff-state . . . . . . . . . . . . . . . . 280

gtk-menu-set-title . . . . . . . . . . . . . . . . . . . . . . . . . 279

gtk-menu-shell-activate-item . . . . . . . . . . . . . . 289

gtk-menu-shell-append . . . . . . . . . . . . . . . . . . . . . . 287 gtk-menu-shell-cancel . . . . . . . . . . . . . . . . . . . . . . 289

gtk-menu-shell-deactivate . . . . . . . . . . . . . . . . . 288
gtk-menu-shell-deselect . . . . . . . . . . . . . . . . . . . 289
gtk-menu-shell-get-take-focus. . . . . . . . . . . . . 290

gtk-menu-shell-insert . . . . . . . . . . . . . . . . . . . . . . 288 gtk-menu-shell-prepend. . . . . . . . . . . . . . . . . . . . . 288

gtk-menu-shell-select-first . . . . . . . . . . . . . . . 288
gtk-menu-shell-select-item . . . . . . . . . . . . . . . . 288
gtk-menu-shell-set-take-focus. . . . . . . . . . . . . 289
gtk-menu-tool-button-get-menu. . . . . . . . . . . . . 317
gtk-menu-tool-button-new . . . . . . . . . . . . . . . . . . 316

                                                gtk-menu-tool-button-new-from-stock . . . . . . 316
                                                gtk-menu-tool-button-set-menu. . . . . . . . . . . . . 316
                                                gtk-message-dialog-set-image . . . . . . . . . . . . . . . 10
                                                gtk-message-dialog-set-markup . . . . . . . . . . . . . . 10

gtk-misc-get-alignment. . . . . . . . . . . . . . . . . . . . . 511 gtk-misc-get-padding . . . . . . . . . . . . . . . . . . . . . . . 511 gtk-misc-set-alignment. . . . . . . . . . . . . . . . . . . . . 510 gtk-misc-set-padding . . . . . . . . . . . . . . . . . . . . . . . 510

                                                gtk-notebook-append-page . . . . . . . . . . . . . . . . . . 405
                                                gtk-notebook-append-page-menu. . . . . . . . . . . . . 406
                                                gtk-notebook-get-current-page. . . . . . . . . . . . . 409
                                                gtk-notebook-get-group-id . . . . . . . . . . . . . . . . . 415
                                                gtk-notebook-get-menu-label . . . . . . . . . . . . . . . 410
                                                gtk-notebook-get-menu-label-text . . . . . . . . . 413
                                                gtk-notebook-get-n-pages . . . . . . . . . . . . . . . . . . 410
                                                gtk-notebook-get-nth-page . . . . . . . . . . . . . . . . . 410
                                                gtk-notebook-get-scrollable . . . . . . . . . . . . . . . 413
                                                gtk-notebook-get-show-border . . . . . . . . . . . . . . 413
                                                gtk-notebook-get-show-tabs . . . . . . . . . . . . . . . . 413
                                                gtk-notebook-get-tab-detachable . . . . . . . . . . 414
                                                gtk-notebook-get-tab-label . . . . . . . . . . . . . . . . 410
                                                gtk-notebook-get-tab-label-text . . . . . . . . . . 413
                                                gtk-notebook-get-tab-pos . . . . . . . . . . . . . . . . . . 414
                                                gtk-notebook-get-tab-reorderable . . . . . . . . . 414
                                                gtk-notebook-insert-page . . . . . . . . . . . . . . . . . . 407
                                                gtk-notebook-insert-page-menu. . . . . . . . . . . . . 407

gtk-notebook-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 gtk-notebook-next-page. . . . . . . . . . . . . . . . . . . . . 408 gtk-notebook-page-num . . . . . . . . . . . . . . . . . . . . . . 408

                                                gtk-notebook-popup-disable . . . . . . . . . . . . . . . . 409
                                                gtk-notebook-popup-enable . . . . . . . . . . . . . . . . . 409
                                                gtk-notebook-prepend-page . . . . . . . . . . . . . . . . . 406
                                                gtk-notebook-prepend-page-menu . . . . . . . . . . . 406

gtk-notebook-prev-page. . . . . . . . . . . . . . . . . . . . . 408

                                                gtk-notebook-remove-page . . . . . . . . . . . . . . . . . . 408
                                                gtk-notebook-reorder-child . . . . . . . . . . . . . . . . 408
                                                gtk-notebook-set-current-page. . . . . . . . . . . . . 414
                                                gtk-notebook-set-group-id . . . . . . . . . . . . . . . . . 414
                                                gtk-notebook-set-menu-label . . . . . . . . . . . . . . . 410
                                                gtk-notebook-set-menu-label-text . . . . . . . . . 411
                                                gtk-notebook-set-scrollable . . . . . . . . . . . . . . . 409
                                                gtk-notebook-set-show-border . . . . . . . . . . . . . . 409
                                                gtk-notebook-set-show-tabs . . . . . . . . . . . . . . . . 409
                                                gtk-notebook-set-tab-detachable . . . . . . . . . . 412
                                                gtk-notebook-set-tab-label . . . . . . . . . . . . . . . . 411
                                                gtk-notebook-set-tab-label-packing . . . . . . . 411
                                                gtk-notebook-set-tab-label-text . . . . . . . . . . 411
                                                gtk-notebook-set-tab-pos . . . . . . . . . . . . . . . . . . 408
                                                gtk-notebook-set-tab-reorderable . . . . . . . . . 411
                                                gtk-page-setup-get-bottom-margin . . . . . . . . . 464
                                                gtk-page-setup-get-left-margin . . . . . . . . . . . 464
                                                gtk-page-setup-get-orientation . . . . . . . . . . . 463
                                                gtk-page-setup-get-page-height . . . . . . . . . . . 466
                                                gtk-page-setup-get-page-width. . . . . . . . . . . . . 466
                                                gtk-page-setup-get-paper-height . . . . . . . . . . 466
                                                gtk-page-setup-get-paper-size. . . . . . . . . . . . . 463
                                                gtk-page-setup-get-paper-width . . . . . . . . . . . 465
                                                gtk-page-setup-get-right-margin . . . . . . . . . . 465

gtk-page-setup-get-top-margin. . . . . . . . . . . . . 463

gtk-page-setup-new . . . . . . . . . . . . . . . . . . . . . . . . . 462

gtk-page-setup-set-bottom-margin . . . . . . . . . 464
gtk-page-setup-set-left-margin . . . . . . . . . . . 465
gtk-page-setup-set-orientation . . . . . . . . . . . 463
gtk-page-setup-set-paper-size. . . . . . . . . . . . . 463
gtk-page-setup-set-right-margin . . . . . . . . . . 465
gtk-page-setup-set-top-margin. . . . . . . . . . . . . 464

gtk-paned-add1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 gtk-paned-add2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 gtk-paned-get-child1 . . . . . . . . . . . . . . . . . . . . . . . 516 gtk-paned-get-child2 . . . . . . . . . . . . . . . . . . . . . . . 516 gtk-paned-get-position. . . . . . . . . . . . . . . . . . . . . 516 gtk-paned-pack1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 gtk-paned-pack2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 gtk-paned-set-position. . . . . . . . . . . . . . . . . . . . . 516

gtk-paper-size-get-default . . . . . . . . . . . . . . . . 469
gtk-paper-size-get-display-name . . . . . . . . . . 468
gtk-paper-size-get-height . . . . . . . . . . . . . . . . . 469
gtk-paper-size-get-name . . . . . . . . . . . . . . . . . . . 468
gtk-paper-size-get-ppd-name . . . . . . . . . . . . . . . 468
gtk-paper-size-get-width . . . . . . . . . . . . . . . . . . 469
gtk-paper-size-is-custom . . . . . . . . . . . . . . . . . . 469
gtk-paper-size-is-equal . . . . . . . . . . . . . . . . . . . 468

gtk-paper-size-new . . . . . . . . . . . . . . . . . . . . . . . . . 467

gtk-paper-size-new-custom . . . . . . . . . . . . . . . . . 468
gtk-paper-size-new-from-ppd . . . . . . . . . . . . . . . 467
gtk-paper-size-set-size . . . . . . . . . . . . . . . . . . . 469

gtk-plug-construct . . . . . . . . . . . . . . . . . . . . . . . . . 566

gtk-plug-construct-for-display . . . . . . . . . . . 566

gtk-plug-get-id. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 gtk-plug-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

gtk-plug-new-for-display . . . . . . . . . . . . . . . . . . 567
gtk-print-context-get-cairo-context . . . . . . 448
gtk-print-context-get-dpi-x . . . . . . . . . . . . . . . 449
gtk-print-context-get-dpi-y . . . . . . . . . . . . . . . 449
gtk-print-context-get-height . . . . . . . . . . . . . . 449
gtk-print-context-get-page-setup . . . . . . . . . 449
gtk-print-context-get-pango-fontmap . . . . . . 450
gtk-print-context-get-width . . . . . . . . . . . . . . . 449
gtk-print-context-set-cairo-context . . . . . . 448
gtk-print-operation-cancel . . . . . . . . . . . . . . . . 445
gtk-print-operation-get-error . . . . . . . . 443, 446
gtk-print-operation-get-status . . . . . . . . . . . 445
gtk-print-operation-is-finished . . . . . . . . . . 446
gtk-print-operation-new . . . . . . . . . . . . . . . . . . . 442
gtk-print-operation-run . . . . . . . . . . . . . . . . . . . 444
gtk-print-operation-set-allow-async . . . . . . 443
gtk-print-operation-set-job-name . . . . . . . . . 443
gtk-print-operation-set-n-pages . . . . . . . . . . 443
gtk-print-operation-set-unit . . . . . . . . . . . . . . 444
gtk-print-run-page-setup-dialog . . . . . . . . . . 446

gtk-print-settings-get. . . . . . . . . . . . . . . . . . . . . 451

gtk-print-settings-get-bool . . . . . . . . . . . . . . . 452
gtk-print-settings-get-collate . . . . . . . . . . . 456
gtk-print-settings-get-dither. . . . . . . . . . . . . 460
gtk-print-settings-get-double. . . . . . . . . . . . . 452
gtk-print-settings-get-duplex. . . . . . . . . . . . . 457

                                                gtk-print-settings-get-finishings . . . . . . . . 461
                                                gtk-print-settings-get-int . . . . . . . . . . . . . . . . 453
                                                gtk-print-settings-get-length. . . . . . . . . . . . . 453
                                                gtk-print-settings-get-media-type . . . . . . . . 460
                                                gtk-print-settings-get-n-copies . . . . . . . . . . 458
                                                gtk-print-settings-get-number-up . . . . . . . . . 458
                                                gtk-print-settings-get-orientation . . . . . . . 454
                                                gtk-print-settings-get-output-bin . . . . . . . . 461
                                                gtk-print-settings-get-page-set . . . . . . . . . . 460
                                                gtk-print-settings-get-paper-height . . . . . . 456
                                                gtk-print-settings-get-paper-size . . . . . . . . 455
                                                gtk-print-settings-get-paper-width . . . . . . . 455
                                                gtk-print-settings-get-printer . . . . . . . . . . . 454
                                                gtk-print-settings-get-quality . . . . . . . . . . . 458
                                                gtk-print-settings-get-resolution . . . . . . . . 459
                                                gtk-print-settings-get-reverse . . . . . . . . . . . 457
                                                gtk-print-settings-get-scale . . . . . . . . . . . . . . 459
                                                gtk-print-settings-get-use-color . . . . . . . . . 456
                                                gtk-print-settings-has-key . . . . . . . . . . . . . . . . 451

gtk-print-settings-new. . . . . . . . . . . . . . . . . . . . . 451 gtk-print-settings-set. . . . . . . . . . . . . . . . . . . . . 452

                                                gtk-print-settings-set-bool . . . . . . . . . . . . . . . 452
                                                gtk-print-settings-set-collate . . . . . . . . . . . 457
                                                gtk-print-settings-set-dither. . . . . . . . . . . . . 461
                                                gtk-print-settings-set-double. . . . . . . . . . . . . 453
                                                gtk-print-settings-set-duplex. . . . . . . . . . . . . 457
                                                gtk-print-settings-set-finishings . . . . . . . . 461
                                                gtk-print-settings-set-int . . . . . . . . . . . . . . . . 454
                                                gtk-print-settings-set-length. . . . . . . . . . . . . 453
                                                gtk-print-settings-set-media-type . . . . . . . . 460
                                                gtk-print-settings-set-n-copies . . . . . . . . . . 458
                                                gtk-print-settings-set-number-up . . . . . . . . . 459
                                                gtk-print-settings-set-orientation . . . . . . . 454
                                                gtk-print-settings-set-output-bin . . . . . . . . 461
                                                gtk-print-settings-set-page-set . . . . . . . . . . 460
                                                gtk-print-settings-set-paper-height . . . . . . 456
                                                gtk-print-settings-set-paper-size . . . . . . . . 455
                                                gtk-print-settings-set-paper-width . . . . . . . 455
                                                gtk-print-settings-set-printer . . . . . . . . . . . 454
                                                gtk-print-settings-set-quality . . . . . . . . . . . 458
                                                gtk-print-settings-set-resolution . . . . . . . . 459
                                                gtk-print-settings-set-reverse . . . . . . . . . . . 457
                                                gtk-print-settings-set-scale . . . . . . . . . . . . . . 459
                                                gtk-print-settings-set-use-color . . . . . . . . . 456
                                                gtk-print-settings-unset . . . . . . . . . . . . . . . . . . 452
                                                gtk-progress-bar-get-ellipsize. . . . . . . . . . . . . 74
                                                gtk-progress-bar-get-fraction . . . . . . . . . . . . . . 73
                                                gtk-progress-bar-get-pulse-step . . . . . . . . . . . 74
                                                gtk-progress-bar-get-text . . . . . . . . . . . . . . . . . . 73

gtk-progress-bar-new . . . . . . . . . . . . . . . . . . . . . . . . 72 gtk-progress-bar-pulse . . . . . . . . . . . . . . . . . . . . . . 72

                                                gtk-progress-bar-set-ellipsize. . . . . . . . . . . . . 73
                                                gtk-progress-bar-set-fraction . . . . . . . . . . . . . . 72
                                                gtk-progress-bar-set-orientation . . . . . . . . . . 73
                                                gtk-progress-bar-set-pulse-step . . . . . . . . . . . 73
                                                gtk-progress-bar-set-text . . . . . . . . . . . . . . . . . . 72
                                                gtk-radio-action-get-current-value . . . . . . . 345
                                                gtk-radio-action-get-group . . . . . . . . . . . . . . . . 345

gtk-radio-action-new . . . . . . . . . . . . . . . . . . . . . . . 344

gtk-radio-action-set-current-value . . . . . . . 345
gtk-radio-action-set-group . . . . . . . . . . . . . . . . 345
gtk-radio-button-get-group . . . . . . . . . . . . . . . . . 93

gtk-radio-button-new . . . . . . . . . . . . . . . . . . . . . . . . 92

gtk-radio-button-new-from-widget . . . . . . . . . . 92
gtk-radio-button-new-with-label . . . . . . . . . . . 92
gtk-radio-button-new-with-mnemonic . . . . . . . . 93
gtk-radio-button-set-group . . . . . . . . . . . . . . . . . 93
gtk-radio-menu-item-get-group. . . . . . . . . . . . . 294
gtk-radio-menu-item-new . . . . . . . . . . . . . . . . . . . 293
gtk-radio-menu-item-new-from-widget . . . . . . 294
gtk-radio-menu-item-new-with-label . . . . . . . 293
gtk-radio-menu-item-set-group. . . . . . . . . . . . . 294
gtk-radio-tool-button-get-group . . . . . . . . . . 319
gtk-radio-tool-button-new . . . . . . . . . . . . . . . . . 319
gtk-radio-tool-button-new-from-stock. . . . . 608
gtk-radio-tool-button-set-group . . . . . . . . . . 319
gtk-range-get-adjustment . . . . . . . . . . . . . . . . . . 518

gtk-range-get-inverted. . . . . . . . . . . . . . . . . . . . . 518

gtk-range-get-update-policy . . . . . . . . . . . . . . . 519

gtk-range-get-value . . . . . . . . . . . . . . . . . . . . . . . . 519

gtk-range-set-adjustment . . . . . . . . . . . . . . . . . . 518
gtk-range-set-increments . . . . . . . . . . . . . . . . . . 519

gtk-range-set-inverted. . . . . . . . . . . . . . . . . . . . . 519 gtk-range-set-range . . . . . . . . . . . . . . . . . . . . . . . . 519

gtk-range-set-update-policy . . . . . . . . . . . . . . . 518

gtk-range-set-value . . . . . . . . . . . . . . . . . . . . . . . . 520

gtk-rc-get-style-by-paths . . . . . . . . . . . . . . . . . 608
gtk-rc-set-default-files . . . . . . . . . . . . . . . . . . 609
gtk-recent-chooser-add-filter. . . . . . . . . . . . . 591
gtk-recent-chooser-get-current-item . . . . . . 590
gtk-recent-chooser-get-current-uri . . . . . . . 590
gtk-recent-chooser-get-filter. . . . . . . . . . . . . 592
gtk-recent-chooser-get-items . . . . . . . . . . . . . . 591
gtk-recent-chooser-get-limit . . . . . . . . . . . . . . 588
gtk-recent-chooser-get-local-only . . . . . . . . 588
gtk-recent-chooser-get-show-icons . . . . . . . . 587
gtk-recent-chooser-get-show-numbers . . . . . . 589
gtk-recent-chooser-get-show-private . . . . . . 587
gtk-recent-chooser-get-show-tips . . . . . . . . . 589
gtk-recent-chooser-get-sort-type . . . . . . . . . 590
gtk-recent-chooser-list-filters . . . . . . . . . . 592
gtk-recent-chooser-menu-new . . . . . . . . . . . . . . . 594
gtk-recent-chooser-remove-filter . . . . . . . . . 592
gtk-recent-chooser-select-all. . . . . . . . . . . . . 591
gtk-recent-chooser-select-uri. . . . . . . . . . . . . 590
gtk-recent-chooser-set-current-uri . . . . . . . 590
gtk-recent-chooser-set-filter. . . . . . . . . . . . . 592
gtk-recent-chooser-set-limit . . . . . . . . . . . . . . 588
gtk-recent-chooser-set-local-only . . . . . . . . 588
gtk-recent-chooser-set-show-icons . . . . . . . . 587
gtk-recent-chooser-set-show-numbers . . . . . . 589
gtk-recent-chooser-set-show-private . . . . . . 587
gtk-recent-chooser-set-show-tips . . . . . . . . . 588
gtk-recent-chooser-set-sort-type . . . . . . . . . 589
gtk-recent-chooser-unselect-all . . . . . . . . . . 591
gtk-recent-chooser-unselect-uri . . . . . . . . . . 591

                                                gtk-recent-chooser-widget-new. . . . . . . . . . . . . 595
                                                gtk-recent-filter-add-age . . . . . . . . . . . . . . . . . 598
                                                gtk-recent-filter-add-application . . . . . . . . 597
                                                gtk-recent-filter-add-group . . . . . . . . . . . . . . . 597
                                                gtk-recent-filter-add-mime-type . . . . . . . . . . 597
                                                gtk-recent-filter-add-pattern. . . . . . . . . . . . . 597
                                                gtk-recent-filter-get-name . . . . . . . . . . . . . . . . 596
                                                gtk-recent-filter-get-needed . . . . . . . . . . . . . . 598

gtk-recent-filter-new . . . . . . . . . . . . . . . . . . . . . . 596

                                                gtk-recent-filter-set-name . . . . . . . . . . . . . . . . 597

gtk-recent-info-exists. . . . . . . . . . . . . . . . . . . . . 584

                                                gtk-recent-info-get-added . . . . . . . . . . . . . . . . . 582
                                                gtk-recent-info-get-age . . . . . . . . . . . . . . . . . . . 584
                                                gtk-recent-info-get-application-info. . . . . 609
                                                gtk-recent-info-get-description . . . . . . . . . . 582
                                                gtk-recent-info-get-display-name . . . . . . . . . 581
                                                gtk-recent-info-get-icon . . . . . . . . . . . . . . . . . . 583
                                                gtk-recent-info-get-mime-type. . . . . . . . . . . . . 582
                                                gtk-recent-info-get-modified . . . . . . . . . . . . . . 582
                                                gtk-recent-info-get-private-hint . . . . . . . . . 583
                                                gtk-recent-info-get-short-name . . . . . . . . . . . 584
                                                gtk-recent-info-get-uri . . . . . . . . . . . . . . . . . . . 581
                                                gtk-recent-info-get-uri-display . . . . . . . . . . 584
                                                gtk-recent-info-get-visited . . . . . . . . . . . . . . . 582
                                                gtk-recent-info-has-application . . . . . . . . . . 583
                                                gtk-recent-info-has-group . . . . . . . . . . . . . . . . . 583
                                                gtk-recent-info-is-local . . . . . . . . . . . . . . . . . . 584
                                                gtk-recent-info-last-application . . . . . . . . . 583

gtk-recent-info-match . . . . . . . . . . . . . . . . . . . . . . 585

                                                gtk-recent-manager-add-item . . . . . . . . . . . . . . . 579
                                                gtk-recent-manager-get-default . . . . . . . . . . . 578
                                                gtk-recent-manager-get-for-screen . . . . . . . . 578
                                                gtk-recent-manager-get-items . . . . . . . . . . . . . . 581
                                                gtk-recent-manager-get-limit . . . . . . . . . . . . . . 580
                                                gtk-recent-manager-has-item . . . . . . . . . . . . . . . 580
                                                gtk-recent-manager-lookup-item . . . . . . . . . . . 579
                                                gtk-recent-manager-move-item . . . . . . . . . . . . . . 580

gtk-recent-manager-new. . . . . . . . . . . . . . . . . . . . . 578

                                                gtk-recent-manager-purge-items . . . . . . . . . . . 581
                                                gtk-recent-manager-remove-item . . . . . . . . . . . 579
                                                gtk-recent-manager-set-limit . . . . . . . . . . . . . . 581
                                                gtk-recent-manager-set-screen. . . . . . . . . . . . . 579

gtk-requisition-copy . . . . . . . . . . . . . . . . . . . . . . . 562 gtk-ruler-get-metric . . . . . . . . . . . . . . . . . . . . . . . 574 gtk-ruler-get-range . . . . . . . . . . . . . . . . . . . . . . . . 574 gtk-ruler-set-metric . . . . . . . . . . . . . . . . . . . . . . . 573 gtk-ruler-set-range . . . . . . . . . . . . . . . . . . . . . . . . 573 gtk-scale-get-digits . . . . . . . . . . . . . . . . . . . . . . . 522

                                                gtk-scale-get-draw-value . . . . . . . . . . . . . . . . . . 522

gtk-scale-get-layout . . . . . . . . . . . . . . . . . . . . . . . 522

                                                gtk-scale-get-layout-offsets . . . . . . . . . . . . . . 523
                                                gtk-scale-get-value-pos . . . . . . . . . . . . . . . . . . . 522

gtk-scale-set-digits . . . . . . . . . . . . . . . . . . . . . . . 521

                                                gtk-scale-set-draw-value . . . . . . . . . . . . . . . . . . 522
                                                gtk-scale-set-value-pos . . . . . . . . . . . . . . . . . . . 522
                                                gtk-scrolled-window-get-hadjustment . . . . . . 434
                                                gtk-scrolled-window-get-hscrollbar . . . . . . . 435
                                                gtk-scrolled-window-get-placement . . . . . . . . 437

gtk-scrolled-window-get-shadow-type . . . . . . 437
gtk-scrolled-window-get-vadjustment . . . . . . 434
gtk-scrolled-window-get-vscrollbar . . . . . . . 435
gtk-scrolled-window-new . . . . . . . . . . . . . . . . . . . 434
gtk-scrolled-window-set-hadjustment . . . . . . 436
gtk-scrolled-window-set-placement . . . . . . . . 436
gtk-scrolled-window-set-policy . . . . . . . . . . . 435
gtk-scrolled-window-set-shadow-type . . . . . . 436
gtk-scrolled-window-set-vadjustment . . . . . . 437
gtk-scrolled-window-unset-placement . . . . . . 436

gtk-selection-convert . . . . . . . . . . . . . . . . . . . . . . 609

gtk-selection-owner-set . . . . . . . . . . . . . . . . . . . 609
gtk-selection-owner-set-for-display . . . . . . 609
gtk-separator-menu-item-new . . . . . . . . . . . . . . . 297
gtk-separator-tool-item-get-draw . . . . . . . . . 310
gtk-separator-tool-item-new . . . . . . . . . . . . . . . 310
gtk-separator-tool-item-set-draw . . . . . . . . . 310
gtk-size-group-add-widget . . . . . . . . . . . . . . . . . 487
gtk-size-group-get-ignore-hidden . . . . . . . . . 487
gtk-size-group-get-mode . . . . . . . . . . . . . . . . . . . 487

gtk-size-group-new . . . . . . . . . . . . . . . . . . . . . . . . . 486

gtk-size-group-remove-widget . . . . . . . . . . . . . . 488
gtk-size-group-set-ignore-hidden . . . . . . . . . 487
gtk-size-group-set-mode . . . . . . . . . . . . . . . . . . . 487

gtk-socket-add-id . . . . . . . . . . . . . . . . . . . . . . . . . . 569 gtk-socket-get-id . . . . . . . . . . . . . . . . . . . . . . . . . . 569 gtk-socket-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

gtk-spin-button-configure . . . . . . . . . . . . . . . . . 114
gtk-spin-button-get-adjustment . . . . . . . . . . . 115
gtk-spin-button-get-digits . . . . . . . . . . . . . . . . 117
gtk-spin-button-get-increments . . . . . . . . . . . 117
gtk-spin-button-get-numeric . . . . . . . . . . . . . . . 118
gtk-spin-button-get-range . . . . . . . . . . . . . . . . . 118
gtk-spin-button-get-snap-to-ticks . . . . . . . . 118
gtk-spin-button-get-value . . . . . . . . . . . . . . . . . 118
gtk-spin-button-get-value-as-int . . . . . . . . . 116
gtk-spin-button-get-wrap . . . . . . . . . . . . . . . . . . 118

gtk-spin-button-new . . . . . . . . . . . . . . . . . . . . . . . . 114

gtk-spin-button-new-with-range . . . . . . . . . . . 114
gtk-spin-button-set-adjustment . . . . . . . . . . . 115
gtk-spin-button-set-digits . . . . . . . . . . . . . . . . 115
gtk-spin-button-set-increments . . . . . . . . . . . 115
gtk-spin-button-set-numeric . . . . . . . . . . . . . . . 116
gtk-spin-button-set-range . . . . . . . . . . . . . . . . . 115
gtk-spin-button-set-snap-to-ticks . . . . . . . . 117
gtk-spin-button-set-update-policy . . . . . . . . 116
gtk-spin-button-set-value . . . . . . . . . . . . . . . . . 116
gtk-spin-button-set-wrap . . . . . . . . . . . . . . . . . . 117

gtk-spin-button-spin . . . . . . . . . . . . . . . . . . . . . . . 116 gtk-spin-button-update. . . . . . . . . . . . . . . . . . . . . 117

gtk-status-icon-get-blinking . . . . . . . . . . . . . . . 83
gtk-status-icon-get-icon-name . . . . . . . . . . . . . . 82
gtk-status-icon-get-pixbuf . . . . . . . . . . . . . . . . . 81
gtk-status-icon-get-size . . . . . . . . . . . . . . . . . . . 82
gtk-status-icon-get-stock . . . . . . . . . . . . . . . . . . 81
gtk-status-icon-get-storage-type . . . . . . . . . . 81
gtk-status-icon-get-visible . . . . . . . . . . . . . . . . 83
gtk-status-icon-is-embedded . . . . . . . . . . . . . . . . 83

gtk-status-icon-new . . . . . . . . . . . . . . . . . . . . . . . . . 79

                                                gtk-status-icon-new-from-file . . . . . . . . . . . . . . 79
                                                gtk-status-icon-new-from-icon-name . . . . . . . . 80
                                                gtk-status-icon-new-from-pixbuf . . . . . . . . . . . 79
                                                gtk-status-icon-new-from-stock. . . . . . . . . . . . . 80
                                                gtk-status-icon-set-blinking . . . . . . . . . . . . . . . 83
                                                gtk-status-icon-set-from-file . . . . . . . . . . . . . . 80
                                                gtk-status-icon-set-from-icon-name . . . . . . . . 81
                                                gtk-status-icon-set-from-pixbuf . . . . . . . . . . . 80
                                                gtk-status-icon-set-from-stock. . . . . . . . . . . . . 80
                                                gtk-status-icon-set-tooltip . . . . . . . . . . . . . . . . 82
                                                gtk-status-icon-set-visible . . . . . . . . . . . . . . . . 82
                                                gtk-statusbar-get-context-id . . . . . . . . . . . . . . . 75
                                                gtk-statusbar-get-has-resize-grip . . . . . . . . . 76

gtk-statusbar-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 gtk-statusbar-pop. . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 gtk-statusbar-push . . . . . . . . . . . . . . . . . . . . . . . . . . 76 gtk-statusbar-remove . . . . . . . . . . . . . . . . . . . . . . . . 76

                                                gtk-statusbar-set-has-resize-grip . . . . . . . . . 76

gtk-stock-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 gtk-stock-list-ids . . . . . . . . . . . . . . . . . . . . . . . . . 610 gtk-table-attach. . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

                                                gtk-table-attach-defaults . . . . . . . . . . . . . . . . . 417
                                                gtk-table-get-col-spacing . . . . . . . . . . . . . . . . . 419
                                                gtk-table-get-default-col-spacing . . . . . . . . 420
                                                gtk-table-get-default-row-spacing . . . . . . . . 419
                                                gtk-table-get-homogeneous . . . . . . . . . . . . . . . . . 419
                                                gtk-table-get-row-spacing . . . . . . . . . . . . . . . . . 419

gtk-table-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 gtk-table-resize. . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

                                                gtk-table-set-col-spacing . . . . . . . . . . . . . . . . . 418
                                                gtk-table-set-col-spacings . . . . . . . . . . . . . . . . 418
                                                gtk-table-set-homogeneous . . . . . . . . . . . . . . . . . 419
                                                gtk-table-set-row-spacing . . . . . . . . . . . . . . . . . 418
                                                gtk-table-set-row-spacings . . . . . . . . . . . . . . . . 418
                                                gtk-tearoff-menu-item-new . . . . . . . . . . . . . . . . . 298
                                                gtk-text-attributes-copy . . . . . . . . . . . . . . . . . . 159
                                                gtk-text-attributes-copy-values . . . . . . . . . . 159
                                                gtk-text-attributes-new . . . . . . . . . . . . . . . . . . . 159
                                                gtk-text-buffer-apply-tag . . . . . . . . . . . . . . . . . 150
                                                gtk-text-buffer-apply-tag-by-name . . . . . . . . 151
                                                gtk-text-buffer-backspace . . . . . . . . . . . . . . . . . 145
                                                gtk-text-buffer-begin-user-action . . . . . . . . 154
                                                gtk-text-buffer-copy-clipboard . . . . . . . . . . . 154
                                                gtk-text-buffer-create-child-anchor . . . . . . 147
                                                gtk-text-buffer-create-mark . . . . . . . . . . . . . . . 147
                                                gtk-text-buffer-create-tag . . . . . . . . . . . . . . . . 599
                                                gtk-text-buffer-cut-clipboard. . . . . . . . . . . . . 154

gtk-text-buffer-delete. . . . . . . . . . . . . . . . . . . . . 144

                                                gtk-text-buffer-delete-interactive . . . . . . . 145
                                                gtk-text-buffer-delete-mark . . . . . . . . . . . . . . . 148
                                                gtk-text-buffer-delete-mark-by-name . . . . . . 148
                                                gtk-text-buffer-delete-selection . . . . . . . . . 153
                                                gtk-text-buffer-end-user-action . . . . . . . . . . 154
                                                gtk-text-buffer-get-bounds . . . . . . . . . . . . . . . . 152
                                                gtk-text-buffer-get-char-count . . . . . . . . . . . 142
                                                gtk-text-buffer-get-end-iter . . . . . . . . . . . . . . 152
                                                gtk-text-buffer-get-has-selection . . . . . . . . 149

gtk-text-buffer-get-insert . . . . . . . . . . . . . . . . 149
gtk-text-buffer-get-iter-at-line . . . . . . . . . 152
gtk-text-buffer-get-iter-at-mark . . . . . . . . . 152
gtk-text-buffer-get-iter-at-offset . . . . . . . 151
gtk-text-buffer-get-line-count . . . . . . . . . . . 142
gtk-text-buffer-get-mark . . . . . . . . . . . . . . . . . . 149
gtk-text-buffer-get-modified . . . . . . . . . . . . . . 153
gtk-text-buffer-get-selection-bound . . . . . . 149
gtk-text-buffer-get-slice . . . . . . . . . . . . . . . . . 146
gtk-text-buffer-get-start-iter . . . . . . . . . . . 152
gtk-text-buffer-get-tag-table. . . . . . . . . . . . . 143
gtk-text-buffer-get-text . . . . . . . . . . . . . . . . . . 146

gtk-text-buffer-insert. . . . . . . . . . . . . . . . . . . . . 143

gtk-text-buffer-insert-at-cursor . . . . . . . . . 143
gtk-text-buffer-insert-child-anchor . . . . . . 147
gtk-text-buffer-insert-interactive . . . . . . . 143
gtk-text-buffer-insert-pixbuf. . . . . . . . . . . . . 146
gtk-text-buffer-insert-range . . . . . . . . . . . . . . 144
gtk-text-buffer-insert-with-tags . . . . . . . . . 144
gtk-text-buffer-insert-with-tags-by-name

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611

gtk-text-buffer-move-mark . . . . . . . . . . . . . . . . . 148
gtk-text-buffer-move-mark-by-name . . . . . . . . 148

gtk-text-buffer-new . . . . . . . . . . . . . . . . . . . . . . . . 142

gtk-text-buffer-paste-clipboard . . . . . . . . . . 153
gtk-text-buffer-place-cursor . . . . . . . . . . . . . . 150
gtk-text-buffer-remove-all-tags . . . . . . . . . . 151
gtk-text-buffer-remove-tag . . . . . . . . . . . . . . . . 150
gtk-text-buffer-remove-tag-by-name . . . . . . . 151
gtk-text-buffer-select-range . . . . . . . . . . . . . . 150
gtk-text-buffer-set-modified . . . . . . . . . . . . . . 153
gtk-text-buffer-set-text . . . . . . . . . . . . . . . . . . 145
gtk-text-child-anchor-get-deleted . . . . . . . . 169
gtk-text-child-anchor-get-widgets . . . . . . . . 169
gtk-text-child-anchor-new . . . . . . . . . . . . . . . . . 169
gtk-text-iter-backward-char . . . . . . . . . . . . . . . 130
gtk-text-iter-backward-chars . . . . . . . . . . . . . . 131
gtk-text-iter-backward-line . . . . . . . . . . . . . . . 131
gtk-text-iter-backward-lines . . . . . . . . . . . . . . 132
gtk-text-iter-backward-search. . . . . . . . . . . . . 136
gtk-text-iter-backward-visible-line . . . . . . 133
gtk-text-iter-backward-word-start . . . . . . . . 132
gtk-text-iter-backward-word-starts . . . . . . . 132
gtk-text-iter-begins-tag . . . . . . . . . . . . . . . . . . 126
gtk-text-iter-can-insert . . . . . . . . . . . . . . . . . . 127

gtk-text-iter-compare . . . . . . . . . . . . . . . . . . . . . . 136 gtk-text-iter-copy . . . . . . . . . . . . . . . . . . . . . . . . . 123 gtk-text-iter-editable. . . . . . . . . . . . . . . . . . . . . 127

gtk-text-iter-ends-line . . . . . . . . . . . . . . . . . . . 128
gtk-text-iter-ends-sentence . . . . . . . . . . . . . . . 128

gtk-text-iter-ends-tag. . . . . . . . . . . . . . . . . . . . . 126

gtk-text-iter-ends-word . . . . . . . . . . . . . . . . . . . 128

gtk-text-iter-equal . . . . . . . . . . . . . . . . . . . . . . . . 136

gtk-text-iter-forward-char . . . . . . . . . . . . . . . . 130
gtk-text-iter-forward-chars . . . . . . . . . . . . . . . 130
gtk-text-iter-forward-line . . . . . . . . . . . . . . . . 131
gtk-text-iter-forward-lines . . . . . . . . . . . . . . . 131
gtk-text-iter-forward-search . . . . . . . . . . . . . . 135

gtk-text-iter-forward-sentence-end . . . . . . . 133
gtk-text-iter-forward-sentence-ends . . . . . . 133
gtk-text-iter-forward-to-end . . . . . . . . . . . . . . 135
gtk-text-iter-forward-to-line-end . . . . . . . . 135
gtk-text-iter-forward-to-tag-toggle . . . . . . 135
gtk-text-iter-forward-visible-line . . . . . . . 133
gtk-text-iter-forward-visible-lines . . . . . . 133
gtk-text-iter-forward-word-end . . . . . . . . . . . 132
gtk-text-iter-forward-word-ends . . . . . . . . . . 132
gtk-text-iter-get-attributes . . . . . . . . . . . . . . 129
gtk-text-iter-get-buffer . . . . . . . . . . . . . . . . . . 123
gtk-text-iter-get-bytes-in-line . . . . . . . . . . 129

gtk-text-iter-get-char. . . . . . . . . . . . . . . . . . . . . 124

gtk-text-iter-get-chars-in-line . . . . . . . . . . 129
gtk-text-iter-get-child-anchor . . . . . . . . . . . 126
gtk-text-iter-get-language . . . . . . . . . . . . . . . . 130

gtk-text-iter-get-line. . . . . . . . . . . . . . . . . . . . . 123

gtk-text-iter-get-line-index . . . . . . . . . . . . . . 124
gtk-text-iter-get-line-offset. . . . . . . . . . . . . 124
gtk-text-iter-get-marks . . . . . . . . . . . . . . . . . . . 125
gtk-text-iter-get-offset . . . . . . . . . . . . . . . . . . 123
gtk-text-iter-get-pixbuf . . . . . . . . . . . . . . . . . . 125
gtk-text-iter-get-slice . . . . . . . . . . . . . . . . . . . 124

gtk-text-iter-get-tags. . . . . . . . . . . . . . . . . . . . . 127 gtk-text-iter-get-text. . . . . . . . . . . . . . . . . . . . . 124

gtk-text-iter-get-toggled-tags . . . . . . . . . . . 125
gtk-text-iter-get-visible-slice . . . . . . . . . . 125
gtk-text-iter-get-visible-text . . . . . . . . . . . 125

gtk-text-iter-has-tag . . . . . . . . . . . . . . . . . . . . . . 126 gtk-text-iter-in-range. . . . . . . . . . . . . . . . . . . . . 137

gtk-text-iter-inside-sentence. . . . . . . . . . . . . 129
gtk-text-iter-inside-word . . . . . . . . . . . . . . . . . 128
gtk-text-iter-is-cursor-position . . . . . . . . . 129

gtk-text-iter-is-end . . . . . . . . . . . . . . . . . . . . . . . 130 gtk-text-iter-is-start. . . . . . . . . . . . . . . . . . . . . 130 gtk-text-iter-order . . . . . . . . . . . . . . . . . . . . . . . . 137 gtk-text-iter-set-line. . . . . . . . . . . . . . . . . . . . . 134

gtk-text-iter-set-line-index . . . . . . . . . . . . . . 134
gtk-text-iter-set-line-offset. . . . . . . . . . . . . 134
gtk-text-iter-set-offset . . . . . . . . . . . . . . . . . . 134
gtk-text-iter-starts-line . . . . . . . . . . . . . . . . . 128
gtk-text-iter-starts-sentence. . . . . . . . . . . . . 128
gtk-text-iter-starts-word . . . . . . . . . . . . . . . . . 127
gtk-text-iter-toggles-tag . . . . . . . . . . . . . . . . . 126
gtk-text-mark-get-buffer . . . . . . . . . . . . . . . . . . 139
gtk-text-mark-get-deleted . . . . . . . . . . . . . . . . . 139
gtk-text-mark-get-left-gravity . . . . . . . . . . . 139

gtk-text-mark-get-name. . . . . . . . . . . . . . . . . . . . . 139

gtk-text-mark-get-visible . . . . . . . . . . . . . . . . . 139
gtk-text-mark-set-visible . . . . . . . . . . . . . . . . . 138

gtk-text-tag-event . . . . . . . . . . . . . . . . . . . . . . . . . 159

gtk-text-tag-get-priority . . . . . . . . . . . . . . . . . 158

gtk-text-tag-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

gtk-text-tag-set-priority . . . . . . . . . . . . . . . . . 159

gtk-text-tag-table-add. . . . . . . . . . . . . . . . . . . . . 160

gtk-text-tag-table-get-size . . . . . . . . . . . . . . . 161
gtk-text-tag-table-lookup . . . . . . . . . . . . . . . . . 160

gtk-text-tag-table-new. . . . . . . . . . . . . . . . . . . . . 160

gtk-text-tag-table-remove . . . . . . . . . . . . . . . . . 160
gtk-text-view-add-child-at-anchor . . . . . . . . 168
gtk-text-view-add-child-in-window . . . . . . . . 169
gtk-text-view-backward-display-line . . . . . . 167
gtk-text-view-buffer-to-window-coords . . . 611
gtk-text-view-forward-display-line . . . . . . . 167
gtk-text-view-get-accepts-tab. . . . . . . . . . . . . 173
gtk-text-view-get-buffer . . . . . . . . . . . . . . . . . . 164
gtk-text-view-get-cursor-visible . . . . . . . . . 171
gtk-text-view-get-editable . . . . . . . . . . . . . . . . 170
gtk-text-view-get-indent . . . . . . . . . . . . . . . . . . 173
gtk-text-view-get-iter-at-location . . . . . . . 166
gtk-text-view-get-iter-location . . . . . . . . . . 166
gtk-text-view-get-justification . . . . . . . . . . 171
gtk-text-view-get-left-margin. . . . . . . . . . . . . 172
gtk-text-view-get-line-at-y . . . . . . . . . . . . . . . 166
gtk-text-view-get-line-yrange. . . . . . . . . . . . . 166
gtk-text-view-get-overwrite . . . . . . . . . . . . . . . 171
gtk-text-view-get-right-margin . . . . . . . . . . . 172

gtk-text-view-get-tabs. . . . . . . . . . . . . . . . . . . . . 173

gtk-text-view-get-visible-rect . . . . . . . . . . . 165
gtk-text-view-get-window . . . . . . . . . . . . . . . . . . 167
gtk-text-view-get-window-type. . . . . . . . . . . . . 167
gtk-text-view-get-wrap-mode . . . . . . . . . . . . . . . 170
gtk-text-view-move-child . . . . . . . . . . . . . . . . . . 170
gtk-text-view-move-mark-onscreen . . . . . . . . . 165
gtk-text-view-move-visually . . . . . . . . . . . . . . . 168
gtk-text-view-new-with-buffer. . . . . . . . . . . . . 163
gtk-text-view-place-cursor-onscreen . . . . . . 165
gtk-text-view-scroll-mark-onscreen . . . . . . . 165
gtk-text-view-scroll-to-iter . . . . . . . . . . . . . . 164
gtk-text-view-scroll-to-mark . . . . . . . . . . . . . . 164
gtk-text-view-set-accepts-tab. . . . . . . . . . . . . 173
gtk-text-view-set-buffer . . . . . . . . . . . . . . . . . . 164
gtk-text-view-set-cursor-visible . . . . . . . . . 171
gtk-text-view-set-editable . . . . . . . . . . . . . . . . 170
gtk-text-view-set-indent . . . . . . . . . . . . . . . . . . 172
gtk-text-view-set-justification . . . . . . . . . . 171
gtk-text-view-set-left-margin. . . . . . . . . . . . . 172
gtk-text-view-set-overwrite . . . . . . . . . . . . . . . 171
gtk-text-view-set-right-margin . . . . . . . . . . . 172

gtk-text-view-set-tabs. . . . . . . . . . . . . . . . . . . . . 173

gtk-text-view-set-wrap-mode . . . . . . . . . . . . . . . 170
gtk-text-view-starts-display-line . . . . . . . . 168
gtk-text-view-window-to-buffer-coords . . . 612
gtk-toggle-action-get-active . . . . . . . . . . . . . . 343
gtk-toggle-action-get-draw-as-radio . . . . . . 343

gtk-toggle-action-new . . . . . . . . . . . . . . . . . . . . . . 342

gtk-toggle-action-set-active . . . . . . . . . . . . . . 342
gtk-toggle-action-set-draw-as-radio . . . . . . 343
gtk-toggle-action-toggled . . . . . . . . . . . . . . . . . 342
gtk-toggle-button-get-active . . . . . . . . . . . . . . . 96
gtk-toggle-button-get-inconsistent . . . . . . . . 96
gtk-toggle-button-get-mode . . . . . . . . . . . . . . . . . 96

gtk-toggle-button-new . . . . . . . . . . . . . . . . . . . . . . . 95

gtk-toggle-button-new-with-label . . . . . . . . . . 95
gtk-toggle-button-new-with-mnemonic . . . . . . . 95
gtk-toggle-button-set-active . . . . . . . . . . . . . . . 96

                                                gtk-toggle-button-set-inconsistent . . . . . . . . 97
                                                gtk-toggle-button-set-mode . . . . . . . . . . . . . . . . . 95
                                                gtk-toggle-button-toggled . . . . . . . . . . . . . . . . . . 96
                                                gtk-toggle-tool-button-get-active . . . . . . . . 318
                                                gtk-toggle-tool-button-new . . . . . . . . . . . . . . . . 318
                                                gtk-toggle-tool-button-set-active . . . . . . . . 318
                                                gtk-tool-button-get-icon-name. . . . . . . . . . . . . 314
                                                gtk-tool-button-get-icon-widget . . . . . . . . . . 314
                                                gtk-tool-button-get-label . . . . . . . . . . . . . . . . . 312
                                                gtk-tool-button-get-label-widget . . . . . . . . . 315
                                                gtk-tool-button-get-stock-id . . . . . . . . . . . . . . 313
                                                gtk-tool-button-get-use-underline . . . . . . . . 313

gtk-tool-button-new . . . . . . . . . . . . . . . . . . . . . . . . 311

                                                gtk-tool-button-new-from-stock . . . . . . . . . . . 312
                                                gtk-tool-button-set-icon-name. . . . . . . . . . . . . 313
                                                gtk-tool-button-set-icon-widget . . . . . . . . . . 314
                                                gtk-tool-button-set-label . . . . . . . . . . . . . . . . . 312
                                                gtk-tool-button-set-label-widget . . . . . . . . . 314
                                                gtk-tool-button-set-stock-id . . . . . . . . . . . . . . 313
                                                gtk-tool-button-set-use-underline . . . . . . . . 312
                                                gtk-tool-item-get-expand . . . . . . . . . . . . . . . . . . 306
                                                gtk-tool-item-get-homogeneous. . . . . . . . . . . . . 305
                                                gtk-tool-item-get-icon-size . . . . . . . . . . . . . . . 308
                                                gtk-tool-item-get-is-important . . . . . . . . . . . 307
                                                gtk-tool-item-get-orientation. . . . . . . . . . . . . 308
                                                gtk-tool-item-get-proxy-menu-item . . . . . . . . 309
                                                gtk-tool-item-get-relief-style . . . . . . . . . . . 308
                                                gtk-tool-item-get-toolbar-style . . . . . . . . . . 308
                                                gtk-tool-item-get-use-drag-window . . . . . . . . 306
                                                gtk-tool-item-get-visible-vertical . . . . . . . 307

gtk-tool-item-new . . . . . . . . . . . . . . . . . . . . . . . . . . 305

                                                gtk-tool-item-rebuild-menu . . . . . . . . . . . . . . . . 309
                                                gtk-tool-item-set-expand . . . . . . . . . . . . . . . . . . 305
                                                gtk-tool-item-set-homogeneous. . . . . . . . . . . . . 305
                                                gtk-tool-item-set-is-important . . . . . . . . . . . 307
                                                gtk-tool-item-set-proxy-menu-item . . . . . . . . 309
                                                gtk-tool-item-set-tooltip . . . . . . . . . . . . . . . . . 306
                                                gtk-tool-item-set-use-drag-window . . . . . . . . 306
                                                gtk-tool-item-set-visible-vertical . . . . . . . 307
                                                gtk-toolbar-get-drop-index . . . . . . . . . . . . . . . . 301
                                                gtk-toolbar-get-icon-size . . . . . . . . . . . . . . . . . 303
                                                gtk-toolbar-get-item-index . . . . . . . . . . . . . . . . 300
                                                gtk-toolbar-get-n-items . . . . . . . . . . . . . . . . . . . 300
                                                gtk-toolbar-get-nth-item . . . . . . . . . . . . . . . . . . 301
                                                gtk-toolbar-get-orientation . . . . . . . . . . . . . . . 302
                                                gtk-toolbar-get-relief-style . . . . . . . . . . . . . . 303
                                                gtk-toolbar-get-show-arrow . . . . . . . . . . . . . . . . 302

gtk-toolbar-get-style . . . . . . . . . . . . . . . . . . . . . . 302

                                                gtk-toolbar-get-tooltips . . . . . . . . . . . . . . . . . . 303

gtk-toolbar-insert . . . . . . . . . . . . . . . . . . . . . . . . . 300 gtk-toolbar-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

                                                gtk-toolbar-set-drop-highlight-item . . . . . . 301
                                                gtk-toolbar-set-orientation . . . . . . . . . . . . . . . 302
                                                gtk-toolbar-set-show-arrow . . . . . . . . . . . . . . . . 301

gtk-toolbar-set-style . . . . . . . . . . . . . . . . . . . . . . 303

                                                gtk-toolbar-set-tooltips . . . . . . . . . . . . . . . . . . 302
                                                gtk-toolbar-unset-style . . . . . . . . . . . . . . . . . . . 303

gtk-tooltips-disable . . . . . . . . . . . . . . . . . . . . . . . 490 gtk-tooltips-enable . . . . . . . . . . . . . . . . . . . . . . . . 490

gtk-tooltips-force-window . . . . . . . . . . . . . . . . . 491

gtk-tooltips-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 gtk-tooltips-set-tip . . . . . . . . . . . . . . . . . . . . . . . 490

gtk-tree-drag-source-drag-data-get . . . . . . . 215
gtk-tree-drag-source-row-draggable . . . . . . . 215

gtk-tree-iter-copy . . . . . . . . . . . . . . . . . . . . . . . . . 181

gtk-tree-model-filter-clear-cache . . . . . . . . 236
gtk-tree-model-filter-get-model . . . . . . . . . . 235
gtk-tree-model-filter-new . . . . . . . . . . . . . . . . . 235
gtk-tree-model-filter-refilter . . . . . . . . . . . 236
gtk-tree-model-get-column-type . . . . . . . . . . . 181
gtk-tree-model-get-flags . . . . . . . . . . . . . . . . . . 181
gtk-tree-model-get-iter . . . . . . . . . . . . . . . . . . . 182
gtk-tree-model-get-iter-first. . . . . . . . . . . . . 182
gtk-tree-model-get-n-columns . . . . . . . . . . . . . . 181
gtk-tree-model-get-path . . . . . . . . . . . . . . . . . . . 182
gtk-tree-model-get-string-from-iter . . . . . . 184
gtk-tree-model-get-value . . . . . . . . . . . . . . . . . . 182
gtk-tree-model-iter-children . . . . . . . . . . . . . . 183
gtk-tree-model-iter-has-child. . . . . . . . . . . . . 183
gtk-tree-model-iter-n-children . . . . . . . . . . . 183
gtk-tree-model-iter-next . . . . . . . . . . . . . . . . . . 183
gtk-tree-model-iter-nth-child. . . . . . . . . . . . . 184
gtk-tree-model-iter-parent . . . . . . . . . . . . . . . . 184
gtk-tree-model-ref-node . . . . . . . . . . . . . . . . . . . 184
gtk-tree-model-row-changed . . . . . . . . . . . . . . . . 185
gtk-tree-model-row-deleted . . . . . . . . . . . . . . . . 185
gtk-tree-model-row-inserted . . . . . . . . . . . . . . . 185
gtk-tree-model-rows-reordered. . . . . . . . . . . . . 186
gtk-tree-model-sort-clear-cache . . . . . . . . . . 234
gtk-tree-model-sort-get-model. . . . . . . . . . . . . 234
gtk-tree-model-sort-iter-is-valid . . . . . . . . 234
gtk-tree-model-sort-new-with-model . . . . . . . 234
gtk-tree-model-unref-node . . . . . . . . . . . . . . . . . 185
gtk-tree-or-list-store-set . . . . . . . . . . . . . . . . 599
gtk-tree-path-append-index . . . . . . . . . . . . . . . . 179

gtk-tree-path-copy . . . . . . . . . . . . . . . . . . . . . . . . . 179

gtk-tree-path-new-from-string. . . . . . . . . . . . . 178
gtk-tree-path-prepend-index . . . . . . . . . . . . . . . 179
gtk-tree-row-reference-deleted . . . . . . . . . . . 180
gtk-tree-row-reference-get-model . . . . . . . . . 180
gtk-tree-row-reference-get-path . . . . . . . . . . 180
gtk-tree-row-reference-inserted . . . . . . . . . . 180
gtk-tree-row-reference-new . . . . . . . . . . . . . . . . 179
gtk-tree-row-reference-new-proxy . . . . . . . . . 179
gtk-tree-row-reference-reordered . . . . . . . . . 181
gtk-tree-row-reference-valid . . . . . . . . . . . . . . 180
gtk-tree-selection-get-mode . . . . . . . . . . . . . . . 187
gtk-tree-selection-get-selected . . . . . . . . . . 188
gtk-tree-selection-get-tree-view . . . . . . . . . 188
gtk-tree-selection-iter-is-selected . . . . . . 189
gtk-tree-selection-path-is-selected . . . . . . 188
gtk-tree-selection-select-all. . . . . . . . . . . . . 189
gtk-tree-selection-select-iter . . . . . . . . . . . 189
gtk-tree-selection-select-path . . . . . . . . . . . 188
gtk-tree-selection-select-range . . . . . . . . . . 189
gtk-tree-selection-set-mode . . . . . . . . . . . . . . . 187

                                                gtk-tree-selection-unselect-all . . . . . . . . . . 189
                                                gtk-tree-selection-unselect-iter . . . . . . . . . 189
                                                gtk-tree-selection-unselect-path . . . . . . . . . 188
                                                gtk-tree-selection-unselect-range . . . . . . . . 190
                                                gtk-tree-set-row-drag-data . . . . . . . . . . . . . . . . 216

gtk-tree-store-append . . . . . . . . . . . . . . . . . . . . . . 263 gtk-tree-store-clear . . . . . . . . . . . . . . . . . . . . . . . 264 gtk-tree-store-insert . . . . . . . . . . . . . . . . . . . . . . 262

                                                gtk-tree-store-insert-after . . . . . . . . . . . . . . . 262
                                                gtk-tree-store-insert-before . . . . . . . . . . . . . . 262
                                                gtk-tree-store-is-ancestor . . . . . . . . . . . . . . . . 263
                                                gtk-tree-store-iter-depth . . . . . . . . . . . . . . . . . 264
                                                gtk-tree-store-iter-is-valid . . . . . . . . . . . . . . 264
                                                gtk-tree-store-move-after . . . . . . . . . . . . . . . . . 265
                                                gtk-tree-store-move-before . . . . . . . . . . . . . . . . 265

gtk-tree-store-new . . . . . . . . . . . . . . . . . . . . . . . . . 261 gtk-tree-store-prepend. . . . . . . . . . . . . . . . . . . . . 263 gtk-tree-store-remove . . . . . . . . . . . . . . . . . . . . . . 261 gtk-tree-store-reorder. . . . . . . . . . . . . . . . . . . . . 264

                                                gtk-tree-store-set-value . . . . . . . . . . . . . . . . . . 261

gtk-tree-store-swap . . . . . . . . . . . . . . . . . . . . . . . . 264

                                                gtk-tree-view-append-column . . . . . . . . . . . . . . . 204
                                                gtk-tree-view-collapse-all . . . . . . . . . . . . . . . . 207
                                                gtk-tree-view-collapse-row . . . . . . . . . . . . . . . . 208
                                                gtk-tree-view-column-add-attribute . . . . . . . 192
                                                gtk-tree-view-column-cell-get-position . . 612
                                                gtk-tree-view-column-clear . . . . . . . . . . . . . . . . 192
                                                gtk-tree-view-column-clicked . . . . . . . . . . . . . . 195
                                                gtk-tree-view-column-focus-cell . . . . . . . . . . 198
                                                gtk-tree-view-column-get-alignment . . . . . . . 197
                                                gtk-tree-view-column-get-cell-renderers

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612

                                                gtk-tree-view-column-get-clickable . . . . . . . 196
                                                gtk-tree-view-column-get-expand . . . . . . . . . . 196
                                                gtk-tree-view-column-get-max-width . . . . . . . 195
                                                gtk-tree-view-column-get-min-width . . . . . . . 195
                                                gtk-tree-view-column-get-resizable . . . . . . . 194
                                                gtk-tree-view-column-get-sizing . . . . . . . . . . 194
                                                gtk-tree-view-column-get-sort-order . . . . . . 198
                                                gtk-tree-view-column-get-spacing . . . . . . . . . 193
                                                gtk-tree-view-column-get-title . . . . . . . . . . . 196
                                                gtk-tree-view-column-get-visible . . . . . . . . . 193
                                                gtk-tree-view-column-get-widget . . . . . . . . . . 197
                                                gtk-tree-view-column-get-width . . . . . . . . . . . 194
                                                gtk-tree-view-column-new . . . . . . . . . . . . . . . . . . 192
                                                gtk-tree-view-column-pack-end. . . . . . . . . . . . . 192
                                                gtk-tree-view-column-pack-start . . . . . . . . . . 192
                                                gtk-tree-view-column-queue-resize . . . . . . . . 198
                                                gtk-tree-view-column-set-alignment . . . . . . . 197
                                                gtk-tree-view-column-set-clickable . . . . . . . 196
                                                gtk-tree-view-column-set-expand . . . . . . . . . . 196
                                                gtk-tree-view-column-set-max-width . . . . . . . 195
                                                gtk-tree-view-column-set-min-width . . . . . . . 194
                                                gtk-tree-view-column-set-resizable . . . . . . . 193
                                                gtk-tree-view-column-set-sizing . . . . . . . . . . 194
                                                gtk-tree-view-column-set-sort-order . . . . . . 197
                                                gtk-tree-view-column-set-spacing . . . . . . . . . 193
                                                gtk-tree-view-column-set-title . . . . . . . . . . . 195

gtk-tree-view-column-set-visible . . . . . . . . . 193
gtk-tree-view-column-set-widget . . . . . . . . . . 197
gtk-tree-view-columns-autosize . . . . . . . . . . . 203
gtk-tree-view-create-row-drag-icon . . . . . . . 210
gtk-tree-view-expand-all . . . . . . . . . . . . . . . . . . 207
gtk-tree-view-expand-row . . . . . . . . . . . . . . . . . . 208
gtk-tree-view-expand-to-path . . . . . . . . . . . . . . 207
gtk-tree-view-get-bin-window . . . . . . . . . . . . . . 209
gtk-tree-view-get-column . . . . . . . . . . . . . . . . . . 204
gtk-tree-view-get-columns . . . . . . . . . . . . . . . . . 204
gtk-tree-view-get-enable-search . . . . . . . . . . 210
gtk-tree-view-get-enable-tree-lines . . . . . . 213
gtk-tree-view-get-expander-column . . . . . . . . 205
gtk-tree-view-get-fixed-height-mode . . . . . . 211
gtk-tree-view-get-grid-lines . . . . . . . . . . . . . . 213
gtk-tree-view-get-hadjustment. . . . . . . . . . . . . 202
gtk-tree-view-get-headers-clickable . . . . . . 203
gtk-tree-view-get-headers-visible . . . . . . . . 202
gtk-tree-view-get-hover-expand . . . . . . . . . . . 212
gtk-tree-view-get-hover-selection . . . . . . . . 212
gtk-tree-view-get-model . . . . . . . . . . . . . . . . . . . 201
gtk-tree-view-get-reorderable. . . . . . . . . . . . . 209
gtk-tree-view-get-rubber-banding . . . . . . . . . 213
gtk-tree-view-get-rules-hint . . . . . . . . . . . . . . 203
gtk-tree-view-get-search-column . . . . . . . . . . 210
gtk-tree-view-get-search-entry . . . . . . . . . . . 211
gtk-tree-view-get-selection . . . . . . . . . . . . . . . 201
gtk-tree-view-get-vadjustment. . . . . . . . . . . . . 202
gtk-tree-view-insert-column . . . . . . . . . . . . . . . 204
gtk-tree-view-move-column-after . . . . . . . . . . 205

gtk-tree-view-new . . . . . . . . . . . . . . . . . . . . . . . . . . 201

gtk-tree-view-new-with-model . . . . . . . . . . . . . . 201
gtk-tree-view-remove-column . . . . . . . . . . . . . . . 204
gtk-tree-view-row-activated . . . . . . . . . . . . . . . 207
gtk-tree-view-row-expanded . . . . . . . . . . . . . . . . 208
gtk-tree-view-scroll-to-cell . . . . . . . . . . . . . . 206
gtk-tree-view-scroll-to-point. . . . . . . . . . . . . 205
gtk-tree-view-set-cursor . . . . . . . . . . . . . . . . . . 206
gtk-tree-view-set-cursor-on-cell . . . . . . . . . 207
gtk-tree-view-set-drag-dest-row . . . . . . . . . . 210
gtk-tree-view-set-enable-search . . . . . . . . . . 210
gtk-tree-view-set-enable-tree-lines . . . . . . 213
gtk-tree-view-set-expander-column . . . . . . . . 205
gtk-tree-view-set-fixed-height-mode . . . . . . 211
gtk-tree-view-set-grid-lines . . . . . . . . . . . . . . 214
gtk-tree-view-set-hadjustment. . . . . . . . . . . . . 202
gtk-tree-view-set-headers-clickable . . . . . . 203
gtk-tree-view-set-headers-visible . . . . . . . . 202
gtk-tree-view-set-hover-expand . . . . . . . . . . . 212
gtk-tree-view-set-hover-selection . . . . . . . . 212
gtk-tree-view-set-model . . . . . . . . . . . . . . . . . . . 201
gtk-tree-view-set-reorderable. . . . . . . . . . . . . 208
gtk-tree-view-set-rubber-banding . . . . . . . . . 213
gtk-tree-view-set-rules-hint . . . . . . . . . . . . . . 203
gtk-tree-view-set-search-column . . . . . . . . . . 211
gtk-tree-view-set-search-entry . . . . . . . . . . . 211
gtk-tree-view-set-vadjustment. . . . . . . . . . . . . 202
gtk-tree-view-tree-to-widget-coords . . . . . . 209

                                                gtk-tree-view-unset-rows-drag-dest . . . . . . . 209
                                                gtk-tree-view-widget-to-tree-coords . . . . . . 209

gtk-ui-manager-add-ui . . . . . . . . . . . . . . . . . . . . . . 327

                                                gtk-ui-manager-add-ui-from-file . . . . . . . . . . 326
                                                gtk-ui-manager-add-ui-from-string . . . . . . . . 326
                                                gtk-ui-manager-ensure-update . . . . . . . . . . . . . . 328
                                                gtk-ui-manager-get-accel-group . . . . . . . . . . . 325
                                                gtk-ui-manager-get-action . . . . . . . . . . . . . . . . . 326
                                                gtk-ui-manager-get-action-groups . . . . . . . . . 325
                                                gtk-ui-manager-get-add-tearoffs . . . . . . . . . . 324
                                                gtk-ui-manager-get-toplevels . . . . . . . . . . . . . . 326

gtk-ui-manager-get-ui . . . . . . . . . . . . . . . . . . . . . . 328

                                                gtk-ui-manager-get-widget . . . . . . . . . . . . . . . . . 325
                                                gtk-ui-manager-insert-action-group . . . . . . . 324

gtk-ui-manager-new . . . . . . . . . . . . . . . . . . . . . . . . . 324

                                                gtk-ui-manager-new-merge-id . . . . . . . . . . . . . . . 327
                                                gtk-ui-manager-remove-action-group . . . . . . . 325
                                                gtk-ui-manager-remove-ui . . . . . . . . . . . . . . . . . . 327
                                                gtk-ui-manager-set-add-tearoffs . . . . . . . . . . 324

gtk-vbox-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 gtk-vbutton-box-new . . . . . . . . . . . . . . . . . . . . . . . . 396

                                                gtk-viewport-get-hadjustment . . . . . . . . . . . . . . 492
                                                gtk-viewport-get-shadow-type . . . . . . . . . . . . . . 493
                                                gtk-viewport-get-vadjustment . . . . . . . . . . . . . . 492

gtk-viewport-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

                                                gtk-viewport-set-hadjustment . . . . . . . . . . . . . . 493
                                                gtk-viewport-set-shadow-type . . . . . . . . . . . . . . 493
                                                gtk-viewport-set-vadjustment . . . . . . . . . . . . . . 493

gtk-vpaned-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 gtk-vruler-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 gtk-vscale-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

                                                gtk-vscale-new-with-range . . . . . . . . . . . . . . . . . 111
                                                gtk-vscrollbar-get-type . . . . . . . . . . . . . . . . . . . 613

gtk-vscrollbar-new . . . . . . . . . . . . . . . . . . . . . . . . . 432 gtk-vseparator-new . . . . . . . . . . . . . . . . . . . . . . . . . 430 gtk-widget-activate . . . . . . . . . . . . . . . . . . . . . . . . 540

                                                gtk-widget-add-accelerator . . . . . . . . . . . . . . . . 537

gtk-widget-add-events . . . . . . . . . . . . . . . . . . . . . . 542

                                                gtk-widget-add-mnemonic-label. . . . . . . . . . . . . 561
                                                gtk-widget-can-activate-accel. . . . . . . . . . . . . 539

gtk-widget-child-focus. . . . . . . . . . . . . . . . . . . . . 556

                                                gtk-widget-child-notify . . . . . . . . . . . . . . . . . . . 557

gtk-widget-class-path . . . . . . . . . . . . . . . . . . . . . . 548

                                                gtk-widget-create-pango-context . . . . . . . . . . 551
                                                gtk-widget-create-pango-layout . . . . . . . . . . . 551

gtk-widget-destroy . . . . . . . . . . . . . . . . . . . . . . . . . 534

                                                gtk-widget-ensure-style . . . . . . . . . . . . . . . . . . . 545

gtk-widget-event. . . . . . . . . . . . . . . . . . . . . . . . . . . . 539

                                                gtk-widget-freeze-child-notify . . . . . . . . . . . 557
                                                gtk-widget-get-accessible . . . . . . . . . . . . . . . . . 556

gtk-widget-get-action . . . . . . . . . . . . . . . . . . . . . . 562

                                                gtk-widget-get-ancestor . . . . . . . . . . . . . . . . . . . 543
                                                gtk-widget-get-child-requisition . . . . . . . . . 537
                                                gtk-widget-get-child-visible . . . . . . . . . . . . . . 557
                                                gtk-widget-get-clipboard . . . . . . . . . . . . . . . . . . 558
                                                gtk-widget-get-colormap . . . . . . . . . . . . . . . . . . . 543
                                                gtk-widget-get-composite-name. . . . . . . . . . . . . 548
                                                gtk-widget-get-default-colormap . . . . . . . . . . 546

gtk-widget-get-default-direction . . . . . . . . . 547
gtk-widget-get-default-style . . . . . . . . . . . . . . 546
gtk-widget-get-default-visual. . . . . . . . . . . . . 546
gtk-widget-get-direction . . . . . . . . . . . . . . . . . . 547

gtk-widget-get-display. . . . . . . . . . . . . . . . . . . . . 558 gtk-widget-get-events . . . . . . . . . . . . . . . . . . . . . . 544

gtk-widget-get-extension-events . . . . . . . . . . 542
gtk-widget-get-modifier-style. . . . . . . . . . . . . 549

gtk-widget-get-name . . . . . . . . . . . . . . . . . . . . . . . . 541

gtk-widget-get-no-show-all . . . . . . . . . . . . . . . . 561
gtk-widget-get-pango-context . . . . . . . . . . . . . . 551

gtk-widget-get-parent . . . . . . . . . . . . . . . . . . . . . . 558

gtk-widget-get-parent-window . . . . . . . . . . . . . . 542

gtk-widget-get-pointer. . . . . . . . . . . . . . . . . . . . . 544

gtk-widget-get-root-window . . . . . . . . . . . . . . . . 559

gtk-widget-get-screen . . . . . . . . . . . . . . . . . . . . . . 559

gtk-widget-get-settings . . . . . . . . . . . . . . . . . . . 558
gtk-widget-get-size-request . . . . . . . . . . . . . . . 559

gtk-widget-get-style . . . . . . . . . . . . . . . . . . . . . . . 546

gtk-widget-get-toplevel . . . . . . . . . . . . . . . . . . . 543

gtk-widget-get-visual . . . . . . . . . . . . . . . . . . . . . . 544

gtk-widget-grab-default . . . . . . . . . . . . . . . . . . . 540

gtk-widget-grab-focus . . . . . . . . . . . . . . . . . . . . . . 540 gtk-widget-has-screen . . . . . . . . . . . . . . . . . . . . . . 559 gtk-widget-hide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 gtk-widget-hide-all . . . . . . . . . . . . . . . . . . . . . . . . 535

gtk-widget-hide-on-delete . . . . . . . . . . . . . . . . . 545
gtk-widget-input-shape-combine-mask . . . . . . 547

gtk-widget-is-ancestor. . . . . . . . . . . . . . . . . . . . . 544

gtk-widget-is-composited . . . . . . . . . . . . . . . . . . 562

gtk-widget-is-focus . . . . . . . . . . . . . . . . . . . . . . . . 540

gtk-widget-list-accel-closures . . . . . . . . . . . 539
gtk-widget-list-mnemonic-labels . . . . . . . . . . 561

gtk-widget-map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

gtk-widget-mnemonic-activate . . . . . . . . . . . . . . 555

gtk-widget-modify-base. . . . . . . . . . . . . . . . . . . . . 550 gtk-widget-modify-bg . . . . . . . . . . . . . . . . . . . . . . . 550 gtk-widget-modify-fg . . . . . . . . . . . . . . . . . . . . . . . 549 gtk-widget-modify-font. . . . . . . . . . . . . . . . . . . . . 551

gtk-widget-modify-style . . . . . . . . . . . . . . . . . . . 549

gtk-widget-modify-text. . . . . . . . . . . . . . . . . . . . . 550 gtk-widget-path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

gtk-widget-pop-colormap . . . . . . . . . . . . . . . . . . . 546
gtk-widget-pop-composite-child . . . . . . . . . . . 552
gtk-widget-push-colormap . . . . . . . . . . . . . . . . . . 546
gtk-widget-push-composite-child . . . . . . . . . . 552

gtk-widget-queue-draw . . . . . . . . . . . . . . . . . . . . . . 536

gtk-widget-queue-draw-area . . . . . . . . . . . . . . . . 553
gtk-widget-queue-resize . . . . . . . . . . . . . . . . . . . 536
gtk-widget-queue-resize-no-redraw . . . . . . . . 536

gtk-widget-realize . . . . . . . . . . . . . . . . . . . . . . . . . 535

gtk-widget-region-intersect . . . . . . . . . . . . . . . 555
gtk-widget-remove-accelerator. . . . . . . . . . . . . 538
gtk-widget-remove-mnemonic-label . . . . . . . . . 562

gtk-widget-render-icon. . . . . . . . . . . . . . . . . . . . . 552 gtk-widget-reparent . . . . . . . . . . . . . . . . . . . . . . . . 540

gtk-widget-reset-rc-styles . . . . . . . . . . . . . . . . 546
gtk-widget-reset-shapes . . . . . . . . . . . . . . . . . . . 553

gtk-widget-send-expose. . . . . . . . . . . . . . . . . . . . . 556

                                                gtk-widget-set-accel-path . . . . . . . . . . . . . . . . . 538
                                                gtk-widget-set-app-paintable . . . . . . . . . . . . . . 553
                                                gtk-widget-set-child-visible . . . . . . . . . . . . . . 560
                                                gtk-widget-set-colormap . . . . . . . . . . . . . . . . . . . 544
                                                gtk-widget-set-composite-name. . . . . . . . . . . . . 555
                                                gtk-widget-set-default-colormap . . . . . . . . . . 546
                                                gtk-widget-set-default-direction . . . . . . . . . 547
                                                gtk-widget-set-direction . . . . . . . . . . . . . . . . . . 546
                                                gtk-widget-set-double-buffered . . . . . . . . . . . 554

gtk-widget-set-events . . . . . . . . . . . . . . . . . . . . . . 542

                                                gtk-widget-set-extension-events . . . . . . . . . . 542

gtk-widget-set-name . . . . . . . . . . . . . . . . . . . . . . . . 540

                                                gtk-widget-set-no-show-all . . . . . . . . . . . . . . . . 561

gtk-widget-set-parent . . . . . . . . . . . . . . . . . . . . . . 541

                                                gtk-widget-set-parent-window . . . . . . . . . . . . . . 541
                                                gtk-widget-set-redraw-on-allocate . . . . . . . . 554
                                                gtk-widget-set-scroll-adjustments . . . . . . . . 555
                                                gtk-widget-set-sensitive . . . . . . . . . . . . . . . . . . 541
                                                gtk-widget-set-size-request . . . . . . . . . . . . . . . 560

gtk-widget-set-state . . . . . . . . . . . . . . . . . . . . . . . 541 gtk-widget-set-style . . . . . . . . . . . . . . . . . . . . . . . 545

                                                gtk-widget-shape-combine-mask. . . . . . . . . . . . . 547

gtk-widget-show. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 gtk-widget-show-all . . . . . . . . . . . . . . . . . . . . . . . . 535 gtk-widget-show-now . . . . . . . . . . . . . . . . . . . . . . . . 535

                                                gtk-widget-size-allocate . . . . . . . . . . . . . . . . . . 537
                                                gtk-widget-size-request . . . . . . . . . . . . . . . . . . . 536
                                                gtk-widget-style-get-property. . . . . . . . . . . . . 556
                                                gtk-widget-thaw-child-notify . . . . . . . . . . . . . . 561
                                                gtk-widget-translate-coordinates . . . . . . . . . 545

gtk-widget-unmap. . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 gtk-widget-unparent . . . . . . . . . . . . . . . . . . . . . . . . 534 gtk-widget-unrealize . . . . . . . . . . . . . . . . . . . . . . . 536

                                                gtk-window-activate-default . . . . . . . . . . . . . . . . 14
                                                gtk-window-activate-focus . . . . . . . . . . . . . . . . . . 14
                                                gtk-window-activate-key. . . . . . . . . . . . . . . . . . . . . 18
                                                gtk-window-add-accel-group . . . . . . . . . . . . . . . . . 13
                                                gtk-window-add-mnemonic. . . . . . . . . . . . . . . . . . . . . 17
                                                gtk-window-begin-move-drag . . . . . . . . . . . . . . . . . 23
                                                gtk-window-begin-resize-drag . . . . . . . . . . . . . . . 22

gtk-window-deiconify . . . . . . . . . . . . . . . . . . . . . . . . 20 gtk-window-fullscreen . . . . . . . . . . . . . . . . . . . . . . . 21

                                                gtk-window-get-accept-focus . . . . . . . . . . . . . . . . 31
                                                gtk-window-get-decorated . . . . . . . . . . . . . . . . . . . 26
                                                gtk-window-get-default-icon-list . . . . . . . . . . 26
                                                gtk-window-get-default-size . . . . . . . . . . . . . . . . 27
                                                gtk-window-get-deletable . . . . . . . . . . . . . . . . . . . 26
                                                gtk-window-get-destroy-with-parent . . . . . . . . 27

gtk-window-get-focus . . . . . . . . . . . . . . . . . . . . . . . . 18

                                                gtk-window-get-focus-on-map . . . . . . . . . . . . . . . . 31
                                                gtk-window-get-frame-dimensions . . . . . . . . . . . 27

gtk-window-get-gravity . . . . . . . . . . . . . . . . . . . . . . 15 gtk-window-get-group . . . . . . . . . . . . . . . . . . . . . . . . 31

                                                gtk-window-get-has-frame . . . . . . . . . . . . . . . . . . . 27

gtk-window-get-icon . . . . . . . . . . . . . . . . . . . . . . . . . 28

                                                gtk-window-get-icon-list . . . . . . . . . . . . . . . . . . . 28
                                                gtk-window-get-icon-name . . . . . . . . . . . . . . . . . . . 28

gtk-window-get-mnemonic-modifier . . . . . . . . . . 28

gtk-window-get-modal . . . . . . . . . . . . . . . . . . . . . . . . 28

gtk-window-get-position. . . . . . . . . . . . . . . . . . . . . 28
gtk-window-get-resizable . . . . . . . . . . . . . . . . . . . 13

gtk-window-get-role . . . . . . . . . . . . . . . . . . . . . . . . . 29 gtk-window-get-screen . . . . . . . . . . . . . . . . . . . . . . . 16 gtk-window-get-size . . . . . . . . . . . . . . . . . . . . . . . . . 29

gtk-window-get-skip-pager-hint. . . . . . . . . . . . . 31
gtk-window-get-skip-taskbar-hint . . . . . . . . . . 31

gtk-window-get-title . . . . . . . . . . . . . . . . . . . . . . . . 30

gtk-window-get-transient-for . . . . . . . . . . . . . . . 30
gtk-window-get-type-hint . . . . . . . . . . . . . . . . . . . 30
gtk-window-get-urgency-hint . . . . . . . . . . . . . . . . 31
gtk-window-group-add-window . . . . . . . . . . . . . . . . 37

gtk-window-group-new . . . . . . . . . . . . . . . . . . . . . . . . 37

gtk-window-group-remove-window. . . . . . . . . . . . . 37
gtk-window-has-toplevel-focus . . . . . . . . . . . . . . 17

gtk-window-iconify . . . . . . . . . . . . . . . . . . . . . . . . . . 19 gtk-window-is-active . . . . . . . . . . . . . . . . . . . . . . . . 16

gtk-window-list-toplevels . . . . . . . . . . . . . . . . . . 17

gtk-window-maximize . . . . . . . . . . . . . . . . . . . . . . . . . 20

gtk-window-mnemonic-activate . . . . . . . . . . . . . . . 17

gtk-window-move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 gtk-window-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

gtk-window-parse-geometry . . . . . . . . . . . . . . . . . . 32

gtk-window-present . . . . . . . . . . . . . . . . . . . . . . . . . . 19

gtk-window-present-with-time . . . . . . . . . . . . . . . 19
gtk-window-propagate-key-event. . . . . . . . . . . . . 18
gtk-window-remove-accel-group . . . . . . . . . . . . . . 14
gtk-window-remove-mnemonic . . . . . . . . . . . . . . . . . 17
gtk-window-reshow-with-initial-size . . . . . . . 34

gtk-window-resize. . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

gtk-window-set-accept-focus . . . . . . . . . . . . . . . . 26
gtk-window-set-decorated . . . . . . . . . . . . . . . . . . . 23

gtk-window-set-default . . . . . . . . . . . . . . . . . . . . . . 19

gtk-window-set-default-icon . . . . . . . . . . . . . . . . 34
gtk-window-set-default-icon-from-file . . . 613
gtk-window-set-default-icon-list . . . . . . . . . . 34
gtk-window-set-default-icon-name . . . . . . . . . . 35
gtk-window-set-default-size . . . . . . . . . . . . . . . . 14
gtk-window-set-deletable . . . . . . . . . . . . . . . . . . . 23
gtk-window-set-destroy-with-parent . . . . . . . . 16

gtk-window-set-focus . . . . . . . . . . . . . . . . . . . . . . . . 18

gtk-window-set-focus-on-map . . . . . . . . . . . . . . . . 26
gtk-window-set-frame-dimensions . . . . . . . . . . . 24

gtk-window-set-gravity . . . . . . . . . . . . . . . . . . . . . . 15

gtk-window-set-has-frame . . . . . . . . . . . . . . . . . . . 24

gtk-window-set-icon . . . . . . . . . . . . . . . . . . . . . . . . . 35

gtk-window-set-icon-from-file . . . . . . . . . . . . . . 36
gtk-window-set-icon-list . . . . . . . . . . . . . . . . . . . 35
gtk-window-set-icon-name . . . . . . . . . . . . . . . . . . . 36
gtk-window-set-keep-above . . . . . . . . . . . . . . . . . . 21
gtk-window-set-keep-below . . . . . . . . . . . . . . . . . . 22
gtk-window-set-mnemonic-modifier . . . . . . . . . . 24

gtk-window-set-modal . . . . . . . . . . . . . . . . . . . . . . . . 14

gtk-window-set-position. . . . . . . . . . . . . . . . . . . . . 15
gtk-window-set-resizable . . . . . . . . . . . . . . . . . . . 13

gtk-window-set-role . . . . . . . . . . . . . . . . . . . . . . . . . 24 gtk-window-set-screen . . . . . . . . . . . . . . . . . . . . . . . 16

                                                gtk-window-set-skip-pager-hint. . . . . . . . . . . . . 25
                                                gtk-window-set-skip-taskbar-hint . . . . . . . . . . 25

gtk-window-set-title . . . . . . . . . . . . . . . . . . . . . . . . 13

                                                gtk-window-set-transient-for . . . . . . . . . . . . . . . 16
                                                gtk-window-set-type-hint . . . . . . . . . . . . . . . . . . . 25
                                                gtk-window-set-urgency-hint . . . . . . . . . . . . . . . . 26

gtk-window-set-wmclass . . . . . . . . . . . . . . . . . . . . . . 13 gtk-window-stick. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

                                                gtk-window-unfullscreen. . . . . . . . . . . . . . . . . . . . . 21

gtk-window-unmaximize . . . . . . . . . . . . . . . . . . . . . . . 21 gtk-window-unstick . . . . . . . . . . . . . . . . . . . . . . . . . . 20

H

has-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 has-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 has-screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 has-toplevel-focus . . . . . . . . . . . . . . . . . . . . . . . . . . 17 hide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 hide on <gtk-widget>. . . . . . . . . . . . . . . . . . . . . . . . 527 hide-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 hide-on-delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545

                                                hierarchy-changed on <gtk-widget> . . . . . . . . . 527

I

iconify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

                                                input on <gtk-spin-button> . . . . . . . . . . . . . . . . . 114
                                                input-shape-combine-mask . . . . . . . . . . . . . . . . . . 547

insert . . . . . . . . . . . . . . . . . . . . 143, 257, 262, 288, 300 insert-action-group . . . . . . . . . . . . . . . . . . . . . . . . 324 insert-after . . . . . . . . . . . . . . . . . . . . . . . . . . . 258, 262 insert-at-cursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

                                                insert-at-cursor on <gtk-entry> . . . . . . . . . . . 101
                                                insert-at-cursor on <gtk-text-view> . . . . . . 163

insert-before . . . . . . . . . . . . . . . . . . . . . . . . . . 258, 262 insert-child-anchor . . . . . . . . . . . . . . . . . . . . . . . . 147

                                                insert-child-anchor on <gtk-text-buffer>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 insert-column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 insert-interactive . . . . . . . . . . . . . . . . . . . . . . . . . 143 insert-page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 407 insert-page-menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 insert-pixbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

                                                insert-pixbuf on <gtk-text-buffer>. . . . . . . . 140

insert-prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

                                                insert-prefix on <gtk-entry-completion> . . 108

insert-range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 insert-text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120, 270

                                                insert-text on <gtk-editable> . . . . . . . . . . . . . 120
                                                insert-text on <gtk-text-buffer> . . . . . . . . . . 140

insert-with-tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 is-active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 is-adjusting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 is-ancestor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263, 544 is-composited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 is-embedded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 is-finished . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 is-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 is-sensitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 is-visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 item-activated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

item-activated on <gtk-icon-view> . . . . . . . . . 221
item-activated on <gtk-recent-chooser> . . . 587

iter-children . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 iter-depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 iter-has-child . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 iter-is-selected. . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 iter-is-valid . . . . . . . . . . . . . . . . . . . . . 234, 259, 264 iter-n-children. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 iter-next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 iter-nth-child . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 iter-parent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

K

key-press-event on <gtk-widget> . . . . . . . . . . . 529
key-release-event on <gtk-widget> . . . . . . . . . 529
keynav-failed on <gtk-widget> . . . . . . . . . . . . . 528
keys-changed on <gtk-window>. . . . . . . . . . . . . . . . 12

L

leave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 leave on <gtk-button>. . . . . . . . . . . . . . . . . . . . . . . . 85

leave-notify-event on <gtk-widget>. . . . . . . . 529

list-accel-closures . . . . . . . . . . . . . . . . . . . . . . . . 539 list-actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 list-filters . . . . . . . . . . . . . . . . . . . . . . . . . . . 371, 592 list-mnemonic-labels . . . . . . . . . . . . . . . . . . . . . . . 561 lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 lookup-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

M

map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 map on <gtk-widget> . . . . . . . . . . . . . . . . . . . . . . . . . 527 map-event on <gtk-widget> . . . . . . . . . . . . . . . . . . 529 mark-day . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

mark-deleted on <gtk-text-buffer> . . . . . . . . . 141
mark-set on <gtk-text-buffer> . . . . . . . . . . . . . 141
match-selected on <gtk-entry-completion>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 maximize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 mnemonic-activate . . . . . . . . . . . . . . . . . . . . . . . 17, 555

mnemonic-activate on <gtk-widget> . . . . . . . . . 528
modified-changed on <gtk-text-buffer> . . . . 141

modify-base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 modify-bg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 modify-fg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 modify-font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 modify-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 modify-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

month-changed on <gtk-calendar> . . . . . . . . . . . 474
motion-notify-event on <gtk-widget> . . . . . . 528

move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 398, 402

move-active on <gtk-combo-box> . . . . . . . . . . . . 267

move-after. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260, 265 move-before. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259, 265 move-child . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 move-column-after . . . . . . . . . . . . . . . . . . . . . . . . . . 205

move-current on <gtk-menu-shell> . . . . . . . . . . 287
move-cursor on <gtk-entry> . . . . . . . . . . . . . . . . . 101
move-cursor on <gtk-icon-view> . . . . . . . . . . . . 221
move-cursor on <gtk-label> . . . . . . . . . . . . . . . . . . 61
move-cursor on <gtk-text-view> . . . . . . . . . . . . 163
move-cursor on <gtk-tree-view> . . . . . . . . . . . . 200
move-focus on <gtk-widget> . . . . . . . . . . . . . . . . . 528
move-focus-out on <gtk-notebook> . . . . . . . . . . 405
move-focus-out on <gtk-scrolled-window> . . 434
move-handle on <gtk-paned> . . . . . . . . . . . . . . . . . 515

move-item. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 move-mark. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 move-mark-by-name . . . . . . . . . . . . . . . . . . . . . . . . . . 148 move-mark-onscreen . . . . . . . . . . . . . . . . . . . . . . . . . 165 move-scroll on <gtk-menu> . . . . . . . . . . . . . . . . . . 277

move-selected on <gtk-menu-shell> . . . . . . . . . 287
move-slider on <gtk-range> . . . . . . . . . . . . . . . . . 517
move-viewport on <gtk-text-view> . . . . . . . . . . 163

move-visually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

N

new-merge-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

next-month on <gtk-calendar> . . . . . . . . . . . . . . 475

next-page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

next-year on <gtk-calendar>. . . . . . . . . . . . . . . . 475
no-expose-event on <gtk-widget> . . . . . . . . . . . 533

O

on-get-column-type . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-get-flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-get-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-get-n-columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-get-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-get-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-iter-children. . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-iter-has-child . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-iter-n-children . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-iter-next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-iter-nth-child . . . . . . . . . . . . . . . . . . . . . . . . . . 599 on-iter-parent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599

orientation-changed on <gtk-toolbar> . . . . . 299
output on <gtk-spin-button>. . . . . . . . . . . . . . . . 114

P

pack-end . . . . . . . . . . . . . . . . . . . . . . . . . . . 192, 237, 497 pack-end-defaults . . . . . . . . . . . . . . . . . . . . . . . . . . 498 pack-start . . . . . . . . . . . . . . . . . . . . . . . . . 192, 237, 497 pack-start-defaults . . . . . . . . . . . . . . . . . . . . . . . . 497 pack1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 pack2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

page-added on <gtk-notebook> . . . . . . . . . . . . . . 405
page-horizontally on <gtk-text-view> . . . . . 163

page-num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

page-removed on <gtk-notebook> . . . . . . . . . . . . 405
page-reordered on <gtk-notebook> . . . . . . . . . . 405
paginate on <gtk-print-operation> . . . . . . . . . 440
parent-set on <gtk-widget> . . . . . . . . . . . . . . . . . 527

parse-geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 paste-clipboard . . . . . . . . . . . . . . . . . . . . . . . . 121, 153

paste-clipboard on <gtk-entry> . . . . . . . . . . . . 101
paste-clipboard on <gtk-text-view>. . . . . . . . 163

path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 path-is-selected . . . . . . . . . . . . . . . . . . . . . . . 188, 227 place-cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 place-cursor-onscreen . . . . . . . . . . . . . . . . . . . . . . 165

plug-added on <gtk-socket> . . . . . . . . . . . . . . . . . 569
plug-removed on <gtk-socket> . . . . . . . . . . . . . . 569

pop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 popdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271, 280

popdown on <gtk-combo-box> . . . . . . . . . . . . . . . . . 267
populate-popup on <gtk-entry> . . . . . . . . . . . . . 101
populate-popup on <gtk-label> . . . . . . . . . . . . . . 61
populate-popup on <gtk-text-view> . . . . . . . . . 163

popup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271, 278 popup on <gtk-combo-box> . . . . . . . . . . . . . . . . . . . 267

popup-context-menu on <gtk-toolbar> . . . . . . 299

popup-disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 popup-enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409

popup-menu on <gtk-status-icon> . . . . . . . . . . . . 79
popup-menu on <gtk-widget> . . . . . . . . . . . . . . . . . 533
post-activate on <gtk-action-group> . . . . . . 330
post-activate on <gtk-ui-manager> . . . . . . . . . 323
pre-activate on <gtk-action-group>. . . . . . . . 330
pre-activate on <gtk-ui-manager> . . . . . . . . . . 323
preedit-changed on <gtk-im-context> . . . . . . 563
preedit-end on <gtk-im-context> . . . . . . . . . . . 563
preedit-start on <gtk-im-context> . . . . . . . . . 563
prepare on <gtk-assistant> . . . . . . . . . . . . . . . . . . 43

prepend . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258, 263, 288 prepend-page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44, 406 prepend-page-menu . . . . . . . . . . . . . . . . . . . . . . . . . . 406 prepend-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 present . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 present-with-time. . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 pressed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 pressed on <gtk-button> . . . . . . . . . . . . . . . . . . . . . 84

prev-month on <gtk-calendar> . . . . . . . . . . . . . . 475

prev-page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

prev-year on <gtk-calendar>. . . . . . . . . . . . . . . . 475
preview on <gtk-print-operation> . . . . . . . . . . 442

propagate-expose. . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 propagate-key-event . . . . . . . . . . . . . . . . . . . . . . . . . 18

property-notify-event on <gtk-widget> . . . . 529
proximity-in-event on <gtk-widget>. . . . . . . . 529
proximity-out-event on <gtk-widget> . . . . . . 529

pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 purge-items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 push . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397, 401

Q

                                                query-tooltip on <gtk-widget> . . . . . . . . . . . . . 533

queue-draw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 queue-draw-area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 queue-resize . . . . . . . . . . . . . . . . . . . . . . . . . . . 198, 536 queue-resize-no-redraw. . . . . . . . . . . . . . . . . . . . . 536

R

                                                ready on <gtk-print-operation-preview> . . . 442

realize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 realize on <gtk-widget> . . . . . . . . . . . . . . . . . . . . 527 rebuild-menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 ref-node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 refetch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 refilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 region-intersect. . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 released . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 released on <gtk-button> . . . . . . . . . . . . . . . . . . . . 85 remove . . . . . . . . . . . . . . . . . . . . . 76, 160, 257, 261, 504 remove on <gtk-container> . . . . . . . . . . . . . . . . . . 503 remove-accel-group . . . . . . . . . . . . . . . . . . . . . . . . . . 14 remove-accelerator . . . . . . . . . . . . . . . . . . . . . . . . . 538 remove-action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 remove-action-group . . . . . . . . . . . . . . . . . . . . . . . . 325 remove-action-widget . . . . . . . . . . . . . . . . . . . . . . . . 48 remove-all-tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 remove-column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 remove-filter . . . . . . . . . . . . . . . . . . . . . . . . . . 370, 592 remove-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 remove-mnemonic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 remove-mnemonic-label . . . . . . . . . . . . . . . . . . . . . . 562 remove-page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 remove-submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 remove-tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

                                                remove-tag on <gtk-text-buffer> . . . . . . . . . . . 142

remove-tag-by-name . . . . . . . . . . . . . . . . . . . . . . . . . 151 remove-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 remove-ui. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 remove-widget . . . . . . . . . . . . . . . . . . . . . . . . . . 244, 488

                                                remove-widget on <gtk-cell-editable> . . . . . 244

remove-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 render . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 render-icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 reorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238, 259, 264 reorder-child . . . . . . . . . . . . . . . . . . . . . 277, 408, 499

                                                reorder-tab on <gtk-notebook> . . . . . . . . . . . . . 405

reparent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 reposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

                                                request-page-setup on <gtk-print-operation>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564, 570 reset-rc-styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 reset-shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

reshow-with-initial-size . . . . . . . . . . . . . . . . . . . 34

resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34, 417 resize-children. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 response on <gtk-dialog> . . . . . . . . . . . . . . . . . . . . . 4

retrieve-surrounding on <gtk-im-context>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 row-activated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

row-activated on <gtk-tree-view> . . . . . . . . . . 200

row-changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

row-changed on <gtk-tree-model> . . . . . . . . . . . 178
row-collapsed on <gtk-tree-view> . . . . . . . . . . 200

row-deleted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

row-deleted on <gtk-tree-model> . . . . . . . . . . . 178

row-draggable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 row-expanded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

row-expanded on <gtk-tree-view> . . . . . . . . . . . 200
row-has-child-toggled on <gtk-tree-model>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 row-inserted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

row-inserted on <gtk-tree-model> . . . . . . . . . . 178

rows-reordered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

rows-reordered on <gtk-tree-model>. . . . . . . . 178

run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 444

S

screen-changed on <gtk-widget> . . . . . . . . . . . . 534
scroll-child on <gtk-scrolled-window> . . . . 434
scroll-event on <gtk-widget> . . . . . . . . . . . . . . 528

scroll-mark-onscreen . . . . . . . . . . . . . . . . . . . . . . . 165 scroll-to-cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 scroll-to-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 scroll-to-mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 scroll-to-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 scroll-to-point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285, 509 select on <gtk-item>. . . . . . . . . . . . . . . . . . . . . . . . 509 select-all . . . . . . . . . . . . . . . . . . . . 189, 228, 366, 591

select-all on <gtk-icon-view> . . . . . . . . . . . . . 221
select-all on <gtk-text-view> . . . . . . . . . . . . . 163
select-all on <gtk-tree-view> . . . . . . . . . . . . . 200
select-cursor-item on <gtk-icon-view> . . . . 221
select-cursor-parent on <gtk-tree-view> . . 201
select-cursor-row on <gtk-tree-view> . . . . . 201

select-day . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 select-filename. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 select-first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 select-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 select-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 select-month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

select-page on <gtk-notebook> . . . . . . . . . . . . . 405

select-path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188, 227 select-range . . . . . . . . . . . . . . . . . . . . . . . . . . . 150, 189 select-region . . . . . . . . . . . . . . . . . . . . . . . . . . . 65, 120 select-uri. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368, 590

selection-changed on <gtk-file-chooser> . . 361
selection-changed on <gtk-icon-view> . . . . . 221

selection-changed on <gtk-recent-chooser>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586

selection-clear-event on <gtk-widget> . . . . 529
selection-done on <gtk-menu-shell>. . . . . . . . 287
selection-get on <gtk-widget> . . . . . . . . . . . . . 529
selection-notify-event on <gtk-widget> . . . 529
selection-received on <gtk-widget>. . . . . . . . 529
selection-request-event on <gtk-widget> . . 529

send-expose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 set . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389, 391, 452, 473 set-above-child. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 set-accel-closure. . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 set-accel-group . . . . . . . . . . . . . . . . . . . . . . . . 278, 341 set-accel-path. . . . . . . . . . . . . . . . 279, 284, 340, 538 set-accel-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 set-accept-focus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 set-accepts-tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 set-action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 set-activates-default . . . . . . . . . . . . . . . . . . . . . . 103 set-active . . . . . . . 96, 254, 268, 280, 296, 318, 342 set-active-iter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 set-add-tearoffs . . . . . . . . . . . . . . . . . . . . . . . 272, 324 set-adjustment . . . . . . . . . . . . . . . . . . . . . . . . . 115, 518 set-alignment . . . . . . . . . . . . . . . . . . 88, 104, 197, 510 set-allow-async. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 set-alpha. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

set-anchor on <gtk-text-view> . . . . . . . . . . . . . 163

set-angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 set-app-paintable . . . . . . . . . . . . . . . . . . . . . . . . . . 553 set-attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 set-background-color . . . . . . . . . . . . . . . . . . . . . . . 219 set-blinking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 set-bool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 set-border-width. . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 set-bottom-margin . . . . . . . . . . . . . . . . . . . . . . . . . . 464 set-buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 set-cairo-context . . . . . . . . . . . . . . . . . . . . . . . . . . 448 set-child-packing . . . . . . . . . . . . . . . . . . . . . . . . . . 499 set-child-secondary . . . . . . . . . . . . . . . . . . . . . . . . 501 set-child-visible . . . . . . . . . . . . . . . . . . . . . . . . . . 560 set-clickable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 set-client-window . . . . . . . . . . . . . . . . . . . . . . . . . . 563 set-col-spacing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 set-col-spacings. . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 set-collate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 set-color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 set-colormap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 set-column-spacing . . . . . . . . . . . . . . . . . . . . . . . . . 226 set-columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 set-completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 set-composite-name . . . . . . . . . . . . . . . . . . . . . . . . . 555 set-copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 set-current-folder . . . . . . . . . . . . . . . . . . . . . . . . . 366 set-current-name. . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 set-current-page . . . . . . . . . . . . . . . . . . . . . . . . 44, 414 set-current-uri. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 set-current-value . . . . . . . . . . . . . . . . . . . . . . . . . . 345 set-cursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206, 223 set-cursor-location . . . . . . . . . . . . . . . . . . . . . . . . 564 set-cursor-on-cell . . . . . . . . . . . . . . . . . . . . . . . . . 207 set-cursor-visible . . . . . . . . . . . . . . . . . . . . . . . . . 171 set-decorated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 set-default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 set-default-response . . . . . . . . . . . . . . . . . . . . . . . . . 6 set-default-size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 set-deletable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

set-destroy-with-parent. . . . . . . . . . . . . . . . . . . . . 16

set-digits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115, 521 set-direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 set-display-options . . . . . . . . . . . . . . . . . . . . . . . . 476 set-displayed-row . . . . . . . . . . . . . . . . . . . . . . . . . . 218 set-dither . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 set-double . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 set-double-buffered . . . . . . . . . . . . . . . . . . . . . . . . 554 set-drag-dest-item . . . . . . . . . . . . . . . . . . . . . . . . . 229 set-drag-dest-row . . . . . . . . . . . . . . . . . . . . . . . . . . 210 set-draw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 set-draw-as-radio . . . . . . . . . . . . . . . . . . . . . . . . . . 343 set-draw-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522

set-drop-highlight-item . . . . . . . . . . . . . . . . . . . 301

set-duplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 set-editable . . . . . . . . . . . . . . . . . . . . . . . . . . . 122, 170 set-ellipsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63, 73 set-enable-search . . . . . . . . . . . . . . . . . . . . . . . . . . 210 set-enable-tree-lines . . . . . . . . . . . . . . . . . . . . . . 213 set-events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 set-expand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196, 305 set-expanded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 set-expander-column . . . . . . . . . . . . . . . . . . . . . . . . 205 set-extension-events . . . . . . . . . . . . . . . . . . . . . . . 542 set-extra-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 set-filename . . . . . . . . . . . . . . . . . . . . . . . . . . . 354, 365 set-filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371, 592 set-finishings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 set-fixed-height-mode . . . . . . . . . . . . . . . . . . . . . . 211 set-fixed-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 set-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 set-focus on <gtk-window> . . . . . . . . . . . . . . . . . . . 12 set-focus-chain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 set-focus-child. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505

set-focus-child on <gtk-container>. . . . . . . . 503

set-focus-hadjustment . . . . . . . . . . . . . . . . . . . . . . 505 set-focus-on-click. . . . . . . . . . . . . . . . . . . . . . 88, 273 set-focus-on-map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 set-focus-vadjustment . . . . . . . . . . . . . . . . . . . . . . 505 set-font-name . . . . . . . . . . . . . . . . . . . . . . . . . . 381, 384 set-fraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 set-frame-dimensions . . . . . . . . . . . . . . . . . . . . . . . . 24 set-from-animation . . . . . . . . . . . . . . . . . . . . . . . . . . 57 set-from-file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56, 80 set-from-icon-name . . . . . . . . . . . . . . . . . . . . . . . 58, 81 set-from-icon-set. . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 set-from-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 set-from-pixbuf . . . . . . . . . . . . . . . . . . . . . . . . . . 57, 80 set-from-pixmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 set-from-stock . . . . . . . . . . . . . . . . . . . . . . . . . . . 57, 80

set-gamma. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
set-gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
set-grid-lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
set-group . . . . . . . . . . . . . . . . . . . . . . 93, 294, 319, 345
set-group-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
set-hadjustment . . . . . . . . . . . . . . 202, 403, 436, 493
set-handle-position . . . . . . . . . . . . . . . . . . . . . . . . 482
set-has-frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 103
set-has-palette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
set-has-resize-grip . . . . . . . . . . . . . . . . . . . . . . . . . 76
set-has-separator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
set-has-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
set-headers-clickable . . . . . . . . . . . . . . . . . . . . . . 203
set-headers-visible . . . . . . . . . . . . . . . . . . . . . . . . 202
set-homogeneous . . . . . . . . . . . . . . . . . . . 305, 419, 498
set-hover-expand. . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
set-hover-selection . . . . . . . . . . . . . . . . . . . . . . . . 212
set-icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
set-icon-from-file . . . . . . . . . . . . . . . . . . . . . . . . . . 36
set-icon-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
set-icon-name . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 313
set-icon-widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
set-ignore-hidden . . . . . . . . . . . . . . . . . . . . . . . . . . 487
set-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 88, 291
set-image-position . . . . . . . . . . . . . . . . . . . . . . . . . . 89
set-inconsistent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
set-increments . . . . . . . . . . . . . . . . . . . . . . . . . 115, 519
set-indent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
set-inner-border. . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
set-int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
set-inverted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
set-invisible-char . . . . . . . . . . . . . . . . . . . . . . . . . 102
set-is-important. . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
set-item-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
set-job-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
set-justification . . . . . . . . . . . . . . . . . . . . . . . . . . 171
set-justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
set-keep-above . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
set-keep-below . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
set-label . . . . . . . . . . . . . . . . . . . 69, 87, 312, 423, 426
set-label-align. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
set-label-widget . . . . . . . . . . . . . . . . . . 314, 424, 426
set-layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
set-left-margin . . . . . . . . . . . . . . . . . . . . . . . . 172, 465
set-length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
set-license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
set-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581, 588
set-line-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
set-line-wrap-mode . . . . . . . . . . . . . . . . . . . . . . . . . . 64
set-local-only . . . . . . . . . . . . . . . . . . . . . . . . . 363, 588
set-logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
set-logo-icon-name . . . . . . . . . . . . . . . . . . . . . . . . . . 42
set-margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
set-markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 62
set-markup-column . . . . . . . . . . . . . . . . . . . . . . . . . . 222

                                                set-markup-with-mnemonic . . . . . . . . . . . . . . . . . . . 62

set-max-length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
set-max-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

set-max-width-chars . . . . . . . . . . . . . . . . . . . . . . . . . 63 set-media-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 set-menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 set-menu-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 set-menu-label-text . . . . . . . . . . . . . . . . . . . . . . . . 411 set-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 set-min-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 set-mnemonic-modifier . . . . . . . . . . . . . . . . . . . . . . . 24 set-mnemonic-widget . . . . . . . . . . . . . . . . . . . . . . . . . 65 set-modal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 set-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95, 187, 487 set-model. . . . . . . . . . . . . . . . . 108, 201, 218, 221, 269 set-modified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 set-monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 set-n-copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 set-n-pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 set-name. . . . . . . . . . . . . . . . . . . . . . . . 39, 378, 540, 597 set-no-show-all. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 set-number-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 set-numeric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 set-orientation . . . . . . . . . . . 73, 224, 302, 454, 463 set-output-bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 set-overwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 set-pack-direction . . . . . . . . . . . . . . . . . . . . . . . . . 282 set-padding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390, 510 set-page-complete. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 set-page-header-image . . . . . . . . . . . . . . . . . . . . . . . 46 set-page-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 set-page-side-image . . . . . . . . . . . . . . . . . . . . . . . . . 46 set-page-title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 set-page-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 set-paper-height. . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 set-paper-size . . . . . . . . . . . . . . . . . . . . . . . . . 455, 463 set-paper-width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 set-parent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 set-parent-window . . . . . . . . . . . . . . . . . . . . . . . . . . 541 set-pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 set-pixbuf-column . . . . . . . . . . . . . . . . . . . . . . . . . . 222 set-pixel-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 set-placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 set-policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 set-position . . . . . . . . . . . . . . . . . . . . . . . . 15, 122, 516 set-preview-text. . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 set-preview-widget . . . . . . . . . . . . . . . . . . . . . . . . . 369 set-printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 set-priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 set-proxy-menu-item . . . . . . . . . . . . . . . . . . . . . . . . 309 set-pulse-step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 set-quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 set-radio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 set-range . . . . . . . . . . . . . . . . . . . . . 115, 519, 571, 573 set-redraw-on-allocate. . . . . . . . . . . . . . . . . . . . . 554 set-relief. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 set-reorderable . . . . . . . . . . . . . . . . . . . . . . . . 208, 229 set-resizable . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 193 set-resize-mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 set-resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 set-response-sensitive . . . . . . . . . . . . . . . . . . . . . . . 7 set-reverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 set-right-justified . . . . . . . . . . . . . . . . . . . . . . . . 284 set-right-margin . . . . . . . . . . . . . . . . . . . . . . . 172, 465 set-role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 set-row-spacing . . . . . . . . . . . . . . . . . . . . . . . . 225, 418 set-row-spacings. . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 set-row-span-column . . . . . . . . . . . . . . . . . . . . . . . . 268 set-rubber-banding . . . . . . . . . . . . . . . . . . . . . . . . . 213 set-rules-hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 set-scale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 set-screen. . . . . . . . . . . . . . . . . . . . . . . . 8, 16, 277, 579 set-scroll-adjustments. . . . . . . . . . . . . . . . . . . . . 555

                                                set-scroll-adjustments on <gtk-icon-view>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

                                                set-scroll-adjustments on <gtk-layout> . . . 401
                                                set-scroll-adjustments on <gtk-text-view>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

                                                set-scroll-adjustments on <gtk-tree-view>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

                                                set-scroll-adjustments on <gtk-viewport>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 set-scrollable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 set-search-column . . . . . . . . . . . . . . . . . . . . . . . . . . 211 set-search-entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 set-selectable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 set-selection-mode . . . . . . . . . . . . . . . . . . . . . . . . . 223 set-sensitive . . . . . . . . . . . . . . . . . . . . . 331, 337, 541 set-shadow-type . . . . . . . . . . . . . . 427, 436, 482, 493 set-show-arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 set-show-border. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 set-show-hidden. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 set-show-icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 set-show-numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 set-show-private. . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 set-show-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 set-show-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 set-show-tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 set-show-tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 set-single-line-mode . . . . . . . . . . . . . . . . . . . . . . . . 69 set-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 set-size-request. . . . . . . . . . . . . . . . . . . . . . . . . . . . 560 set-sizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 set-skip-pager-hint . . . . . . . . . . . . . . . . . . . . . . . . . 25 set-skip-taskbar-hint . . . . . . . . . . . . . . . . . . . . . . . 25 set-snap-edge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 set-snap-to-ticks . . . . . . . . . . . . . . . . . . . . . . . . . . 117 set-sort-order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 set-sort-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 set-spacing . . . . . . . . . . . . . . . . . . . 193, 225, 423, 498 set-state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 set-stock-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 set-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303, 545 set-submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 set-surrounding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 set-tab-detachable . . . . . . . . . . . . . . . . . . . . . . . . . 412 set-tab-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 set-tab-label-packing . . . . . . . . . . . . . . . . . . . . . . 411 set-tab-label-text . . . . . . . . . . . . . . . . . . . . . . . . . 411 set-tab-pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 set-tab-reorderable . . . . . . . . . . . . . . . . . . . . . . . . 411 set-tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 set-take-focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 set-tearoff-state . . . . . . . . . . . . . . . . . . . . . . . . . . 280 set-text . . . . . . . . . . . . . . . . . . . . . . . . . 61, 72, 101, 145 set-text-column . . . . . . . . . . . . . . . . . . . . . . . . 222, 275 set-text-with-mnemonic . . . . . . . . . . . . . . . . . . . . . . 66 set-tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 set-title . . . . . . . . 13, 195, 272, 279, 349, 373, 383 set-tooltip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82, 306

set-tooltip on <gtk-tool-item> . . . . . . . . . . . . 305

set-tooltips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 set-top-margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 set-transient-for. . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 set-type-hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 set-unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 set-update-policy. . . . . . . . . . . . . . . . . . . . . . 116, 518 set-urgency-hint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 set-uri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99, 367 set-use-alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 set-use-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 set-use-drag-window . . . . . . . . . . . . . . . . . . . . . . . . 306 set-use-font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 set-use-markup . . . . . . . . . . . . . . . . . . . . . . . . . . 69, 424 set-use-preedit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 set-use-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 set-use-stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 set-use-underline . . . . . . . . . . . . . . 69, 87, 312, 424 set-vadjustment . . . . . . . . . . . . . . 202, 403, 437, 493 set-value. . . . . . . . . . . . . . . . . 116, 257, 261, 471, 520 set-value-pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 set-version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 set-visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 set-visible . . . . . . . . . . . . . . . 82, 138, 193, 331, 338 set-visible-vertical . . . . . . . . . . . . . . . . . . . . . . . 307 set-visible-window . . . . . . . . . . . . . . . . . . . . . . . . . 480 set-website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 set-website-label. . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 set-widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 set-width-chars . . . . . . . . . . . . . . . . . . . . . . . . . 63, 103 set-wmclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 set-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 set-wrap-license. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 set-wrap-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 set-wrap-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 shape-combine-mask . . . . . . . . . . . . . . . . . . . . . . . . . 547 show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 show on <gtk-widget>. . . . . . . . . . . . . . . . . . . . . . . . 527 show-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 show-help on <gtk-widget> . . . . . . . . . . . . . . . . . . 534

show-menu on <gtk-menu-tool-button> . . . . . . 316

show-now . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 size-allocate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537

size-allocate on <gtk-widget> . . . . . . . . . . . . . 527
size-changed on <gtk-status-icon> . . . . . . . . . . 79

size-request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

size-request on <gtk-widget> . . . . . . . . . . . . . . 527

                                                sort-column-changed on <gtk-tree-sortable>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 spin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 start-editing . . . . . . . . . . . . . . . . . . . . . . . . . . 242, 244

                                                start-interactive-search on <gtk-tree-view>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 starts-display-line . . . . . . . . . . . . . . . . . . . . . . . . 168

                                                state-changed on <gtk-widget> . . . . . . . . . . . . . 527
                                                status-changed on <gtk-print-operation> . . 441

stick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 stop-editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

                                                style-changed on <gtk-toolbar> . . . . . . . . . . . . 299

style-get-property . . . . . . . . . . . . . . . . . . . . . . . . . 556 style-set on <gtk-widget> . . . . . . . . . . . . . . . . . . 528 swap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259, 264

                                                switch-page on <gtk-notebook> . . . . . . . . . . . . . 405

T

                                                tag-added on <gtk-text-tag-table> . . . . . . . . . 160
                                                tag-changed on <gtk-text-tag-table> . . . . . . 160
                                                tag-removed on <gtk-text-tag-table> . . . . . . 160
                                                test-collapse-row on <gtk-tree-view> . . . . . 200
                                                test-expand-row on <gtk-tree-view>. . . . . . . . 200
                                                text-popped on <gtk-statusbar> . . . . . . . . . . . . . 75
                                                text-pushed on <gtk-statusbar> . . . . . . . . . . . . . 75

thaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 thaw-child-notify . . . . . . . . . . . . . . . . . . . . . . . . . . 561 toggle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 toggle on <gtk-item>. . . . . . . . . . . . . . . . . . . . . . . . 509

                                                toggle-cursor-item on <gtk-icon-view> . . . . 221
                                                toggle-cursor-row on <gtk-tree-view> . . . . . 201
                                                toggle-cursor-visible on <gtk-text-view>

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

                                                toggle-handle-focus on <gtk-paned>. . . . . . . . 515
                                                toggle-overwrite on <gtk-entry> . . . . . . . . . . . 101
                                                toggle-overwrite on <gtk-text-view> . . . . . . 163

toggle-size-allocate . . . . . . . . . . . . . . . . . . . . . . . 285

                                                toggle-size-allocate on <gtk-menu-item> . . 283

toggle-size-request . . . . . . . . . . . . . . . . . . . . . . . . 285

                                                toggle-size-request on <gtk-menu-item> . . . 283

toggled. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96, 296, 342

                                                toggled on <gtk-cell-renderer-toggle> . . . . 253
                                                toggled on <gtk-check-menu-item> . . . . . . . . . . 295
                                                toggled on <gtk-toggle-action> . . . . . . . . . . . . 342
                                                toggled on <gtk-toggle-button> . . . . . . . . . . . . . 95
                                                toggled on <gtk-toggle-tool-button> . . . . . . 318
                                                toolbar-reconfigured on <gtk-tool-item> . . 304

translate-coordinates . . . . . . . . . . . . . . . . . . . . . . 545 translate-string. . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 tree-to-widget-coords . . . . . . . . . . . . . . . . . . . . . . 209

U

unblock-activate-from . . . . . . . . . . . . . . . . . . . . . . 340 unfullscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 unmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 unmap on <gtk-widget>. . . . . . . . . . . . . . . . . . . . . . . 527

unmap-event on <gtk-widget>. . . . . . . . . . . . . . . . 529

unmark-day . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 unmaximize. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 unparent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 unrealize. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 unrealize on <gtk-widget> . . . . . . . . . . . . . . . . . . 527 unref-node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 unselect-all . . . . . . . . . . . . . . . . . . 189, 228, 366, 591

unselect-all on <gtk-icon-view> . . . . . . . . . . . 221
unselect-all on <gtk-tree-view> . . . . . . . . . . . 200

unselect-filename . . . . . . . . . . . . . . . . . . . . . . . . . . 366 unselect-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 unselect-path . . . . . . . . . . . . . . . . . . . . . . . . . . 188, 227 unselect-range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 unselect-uri . . . . . . . . . . . . . . . . . . . . . . . . . . . 368, 591 unset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 unset-focus-chain . . . . . . . . . . . . . . . . . . . . . . . . . . 508 unset-model-drag-dest . . . . . . . . . . . . . . . . . . . . . . 229 unset-placement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 unset-rows-drag-dest . . . . . . . . . . . . . . . . . . . . . . . 209 unset-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 unstick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 update-buttons-state . . . . . . . . . . . . . . . . . . . . . . . . 48

                                                update-preview on <gtk-file-chooser> . . . . . 362

V

value-changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472

                                                value-changed on <gtk-adjustment> . . . . . . . . . 470
                                                value-changed on <gtk-range> . . . . . . . . . . . . . . 517
                                                value-changed on <gtk-spin-button>. . . . . . . . 114
                                                visibility-notify-event on <gtk-widget> . . 533

W

widget-to-tree-coords . . . . . . . . . . . . . . . . . . . . . . 209

                                                window-state-event on <gtk-widget>. . . . . . . . 533
                                                wrapped on <gtk-spin-button> . . . . . . . . . . . . . . 114