Update. Clutter now working.
[girtod.git] / gtk2 / gtk2.d
blobe418576246e68a83106dc453fcf95d7077af152f
1 // *** DO NOT EDIT ***
2 // Automatically generated from "/usr/share/gir-1.0/Gtk-2.0.gir"
4 module Gtk2;
5 public import gtk2.atk;
6 alias gtk2.atk Atk;
7 public import gtk2.glib2;
8 alias gtk2.glib2 GLib2;
9 public import gtk2.gmodule2;
10 alias gtk2.gmodule2 GModule2;
11 public import gtk2.gobject2;
12 alias gtk2.gobject2 GObject2;
13 public import gtk2.gdk2;
14 alias gtk2.gdk2 Gdk2;
15 public import gtk2.gdkpixbuf2;
16 alias gtk2.gdkpixbuf2 GdkPixbuf2;
17 public import gtk2.gio2;
18 alias gtk2.gio2 Gio2;
19 public import gtk2.pango;
20 alias gtk2.pango Pango;
21 public import gtk2.cairo;
22 alias gtk2.cairo cairo;
24 // c:symbol-prefixes: ["gtk"]
25 // c:identifier-prefixes: ["Gtk"]
27 // module Gtk2;
30 // A <structname>GtkAllocation</structname> of a widget represents region which has been allocated to the
31 // widget by its parent. It is a subregion of its parents allocation. See
32 // <xref linkend="size-allocation"/> for more information.
33 alias Gdk2.Rectangle Allocation;
34 alias GObject2.BaseInitFunc ClassInitFunc;
35 alias GObject2.EnumValue EnumValue;
36 alias GObject2.FlagsValue FlagValue;
37 alias Type FundamentalType;
38 alias GObject2.InstanceInitFunc ObjectInitFunc;
39 alias GObject2.SignalCMarshaller SignalMarshaller;
40 /* alias Type Type; */
41 alias GObject2.TypeClass TypeClass;
42 alias GObject2.TypeInstance TypeObject;
43 enum int ARG_READWRITE = 0;
45 // The #GtkAboutDialog offers a simple way to display information about
46 // a program like its logo, name, copyright, website and license. It is
47 // also possible to give credits to the authors, documenters, translators
48 // and artists who have worked on the program. An about dialog is typically
49 // opened when the user selects the <literal>About</literal> option from
50 // the <literal>Help</literal> menu. All parts of the dialog are optional.
51 // About dialog often contain links and email addresses. #GtkAboutDialog
52 // supports this by offering global hooks, which are called when the user
53 // clicks on a link or email address, see gtk_about_dialog_set_email_hook()
54 // and gtk_about_dialog_set_url_hook(). Email addresses in the
55 // authors, documenters and artists properties are recognized by looking for
56 // <literal>&lt;user@<!-- -->host&gt;</literal>, URLs are
57 // recognized by looking for <literal>http://url</literal>, with
58 // <literal>url</literal> extending to the next space, tab or line break.
59 // <para id="gtk-about-dialog-hook-setup">
60 // Since 2.18 #GtkAboutDialog provides default website and email hooks that
61 // use gtk_show_uri().
62 // </para>
63 // If you want provide your own hooks overriding the default ones, it is
64 // important to do so before setting the website and email URL properties,
65 // like this:
66 // <informalexample><programlisting>
67 // gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL);
68 // gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url);
69 // </programlisting></informalexample>
70 // To disable the default hooks, you can pass %NULL as the hook func. Then,
71 // the #GtkAboutDialog widget will not display the website or the
72 // email addresses as clickable.
73 // To make constructing a #GtkAboutDialog as convenient as possible, you can
74 // use the function gtk_show_about_dialog() which constructs and shows a dialog
75 // and keeps it around so that it can be shown again.
76 // Note that GTK+ sets a default title of <literal>_("About &percnt;s")</literal>
77 // on the dialog window (where &percnt;s is replaced by the name of the
78 // application, but in order to ensure proper translation of the title,
79 // applications should set the title property explicitly when constructing
80 // a #GtkAboutDialog, as shown in the following example:
81 // <informalexample><programlisting>
82 // gtk_show_about_dialog (NULL,
83 // "program-name", "ExampleCode",
84 // "logo", example_logo,
85 // "title" _("About ExampleCode"),
86 // NULL);
87 // </programlisting></informalexample>
88 // Note that prior to GTK+ 2.12, the #GtkAboutDialog:program-name property
89 // was called "name". This was changed to avoid the conflict with the
90 // #GtkWidget:name property.
91 struct AboutDialog /* : Dialog */ {
92 alias parent_instance this;
93 alias parent_instance super_;
94 alias parent_instance dialog;
95 Dialog parent_instance;
96 private void* private_data;
99 // Creates a new #GtkAboutDialog.
100 // RETURNS: a newly created #GtkAboutDialog
101 static AboutDialog* new_() {
102 return gtk_about_dialog_new();
105 // Unintrospectable function: set_email_hook() / gtk_about_dialog_set_email_hook()
106 // Installs a global function to be called whenever the user activates an
107 // email link in an about dialog.
108 // Since 2.18 there exists a default function which uses gtk_show_uri(). To
109 // deactivate it, you can pass %NULL for @func.
110 // RETURNS: the previous email hook.
111 // <func>: a function to call when an email link is activated.
112 // <data>: data to pass to @func
113 // <destroy>: #GDestroyNotify for @data
114 static AboutDialogActivateLinkFunc set_email_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy) {
115 return gtk_about_dialog_set_email_hook(func, data, destroy);
118 // Unintrospectable function: set_url_hook() / gtk_about_dialog_set_url_hook()
119 // Installs a global function to be called whenever the user activates a
120 // URL link in an about dialog.
121 // Since 2.18 there exists a default function which uses gtk_show_uri(). To
122 // deactivate it, you can pass %NULL for @func.
123 // RETURNS: the previous URL hook.
124 // <func>: a function to call when a URL link is activated.
125 // <data>: data to pass to @func
126 // <destroy>: #GDestroyNotify for @data
127 static AboutDialogActivateLinkFunc set_url_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy) {
128 return gtk_about_dialog_set_url_hook(func, data, destroy);
131 // Returns the string which are displayed in the artists tab
132 // of the secondary credits dialog.
133 // %NULL-terminated string array containing the artists. The array is
134 // owned by the about dialog and must not be modified.
135 // RETURNS: A
136 char** get_artists() {
137 return gtk_about_dialog_get_artists(&this);
140 // Returns the string which are displayed in the authors tab
141 // of the secondary credits dialog.
142 // %NULL-terminated string array containing the authors. The array is
143 // owned by the about dialog and must not be modified.
144 // RETURNS: A
145 char** get_authors() {
146 return gtk_about_dialog_get_authors(&this);
149 // Returns the comments string.
150 // dialog and must not be modified.
151 // RETURNS: The comments. The string is owned by the about
152 char* get_comments() {
153 return gtk_about_dialog_get_comments(&this);
156 // Returns the copyright string.
157 // dialog and must not be modified.
158 // RETURNS: The copyright string. The string is owned by the about
159 char* get_copyright() {
160 return gtk_about_dialog_get_copyright(&this);
163 // Returns the string which are displayed in the documenters
164 // tab of the secondary credits dialog.
165 // %NULL-terminated string array containing the documenters. The
166 // array is owned by the about dialog and must not be modified.
167 // RETURNS: A
168 char** get_documenters() {
169 return gtk_about_dialog_get_documenters(&this);
172 // Returns the license information.
173 // dialog and must not be modified.
174 // RETURNS: The license information. The string is owned by the about
175 char* get_license() {
176 return gtk_about_dialog_get_license(&this);
179 // Returns the pixbuf displayed as logo in the about dialog.
180 // pixbuf is owned by the about dialog. If you want to keep a
181 // reference to it, you have to call g_object_ref() on it.
182 // RETURNS: the pixbuf displayed as logo. The
183 GdkPixbuf2.Pixbuf* get_logo() {
184 return gtk_about_dialog_get_logo(&this);
187 // Returns the icon name displayed as logo in the about dialog.
188 // owned by the dialog. If you want to keep a reference
189 // to it, you have to call g_strdup() on it.
190 // RETURNS: the icon name displayed as logo. The string is
191 char* get_logo_icon_name() {
192 return gtk_about_dialog_get_logo_icon_name(&this);
195 // Returns the program name displayed in the about dialog.
196 // dialog and must not be modified.
197 // RETURNS: The program name. The string is owned by the about
198 char* get_name() {
199 return gtk_about_dialog_get_name(&this);
202 // Returns the program name displayed in the about dialog.
203 // dialog and must not be modified.
204 // RETURNS: The program name. The string is owned by the about
205 char* get_program_name() {
206 return gtk_about_dialog_get_program_name(&this);
209 // Returns the translator credits string which is displayed
210 // in the translators tab of the secondary credits dialog.
211 // owned by the about dialog and must not be modified.
212 // RETURNS: The translator credits string. The string is
213 char* get_translator_credits() {
214 return gtk_about_dialog_get_translator_credits(&this);
217 // Returns the version string.
218 // dialog and must not be modified.
219 // RETURNS: The version string. The string is owned by the about
220 char* get_version() {
221 return gtk_about_dialog_get_version(&this);
224 // Returns the website URL.
225 // dialog and must not be modified.
226 // RETURNS: The website URL. The string is owned by the about
227 char* get_website() {
228 return gtk_about_dialog_get_website(&this);
231 // Returns the label used for the website link.
232 // owned by the about dialog and must not be modified.
233 // RETURNS: The label used for the website link. The string is
234 char* get_website_label() {
235 return gtk_about_dialog_get_website_label(&this);
238 // Returns whether the license text in @about is
239 // automatically wrapped.
240 // RETURNS: %TRUE if the license text is wrapped
241 int get_wrap_license() {
242 return gtk_about_dialog_get_wrap_license(&this);
245 // Sets the strings which are displayed in the artists tab
246 // of the secondary credits dialog.
247 // <artists>: a %NULL-terminated array of strings
248 void set_artists(char** artists) {
249 gtk_about_dialog_set_artists(&this, artists);
252 // Sets the strings which are displayed in the authors tab
253 // of the secondary credits dialog.
254 // <authors>: a %NULL-terminated array of strings
255 void set_authors(char** authors) {
256 gtk_about_dialog_set_authors(&this, authors);
259 // Sets the comments string to display in the about dialog.
260 // This should be a short string of one or two lines.
261 // <comments>: a comments string
262 void set_comments(char* comments=null) {
263 gtk_about_dialog_set_comments(&this, comments);
266 // Sets the copyright string to display in the about dialog.
267 // This should be a short string of one or two lines.
268 // <copyright>: (allow-none) the copyright string
269 void set_copyright(char* copyright) {
270 gtk_about_dialog_set_copyright(&this, copyright);
273 // Sets the strings which are displayed in the documenters tab
274 // of the secondary credits dialog.
275 // <documenters>: a %NULL-terminated array of strings
276 void set_documenters(char** documenters) {
277 gtk_about_dialog_set_documenters(&this, documenters);
280 // Sets the license information to be displayed in the secondary
281 // license dialog. If @license is %NULL, the license button is
282 // hidden.
283 // <license>: the license information or %NULL
284 void set_license(char* license=null) {
285 gtk_about_dialog_set_license(&this, license);
288 // Sets the pixbuf to be displayed as logo in the about dialog.
289 // If it is %NULL, the default window icon set with
290 // gtk_window_set_default_icon() will be used.
291 // <logo>: a #GdkPixbuf, or %NULL
292 void set_logo(GdkPixbuf2.Pixbuf* logo=null) {
293 gtk_about_dialog_set_logo(&this, logo);
296 // Sets the pixbuf to be displayed as logo in the about dialog.
297 // If it is %NULL, the default window icon set with
298 // gtk_window_set_default_icon() will be used.
299 // <icon_name>: an icon name, or %NULL
300 void set_logo_icon_name(char* icon_name=null) {
301 gtk_about_dialog_set_logo_icon_name(&this, icon_name);
304 // Sets the name to display in the about dialog.
305 // If this is not set, it defaults to g_get_application_name().
306 // <name>: the program name
307 void set_name(char* name=null) {
308 gtk_about_dialog_set_name(&this, name);
311 // Sets the name to display in the about dialog.
312 // If this is not set, it defaults to g_get_application_name().
313 // <name>: the program name
314 void set_program_name(char* name) {
315 gtk_about_dialog_set_program_name(&this, name);
318 // Sets the translator credits string which is displayed in
319 // the translators tab of the secondary credits dialog.
320 // The intended use for this string is to display the translator
321 // of the language which is currently used in the user interface.
322 // Using gettext(), a simple way to achieve that is to mark the
323 // string for translation:
324 // |[
325 // gtk_about_dialog_set_translator_credits (about, _("translator-credits"));
326 // ]|
327 // It is a good idea to use the customary msgid "translator-credits" for this
328 // purpose, since translators will already know the purpose of that msgid, and
329 // since #GtkAboutDialog will detect if "translator-credits" is untranslated
330 // and hide the tab.
331 // <translator_credits>: the translator credits
332 void set_translator_credits(char* translator_credits=null) {
333 gtk_about_dialog_set_translator_credits(&this, translator_credits);
336 // Sets the version string to display in the about dialog.
337 // <version>: the version string
338 void set_version(char* version_=null) {
339 gtk_about_dialog_set_version(&this, version_);
342 // Sets the URL to use for the website link.
343 // Note that that the hook functions need to be set up
344 // before calling this function.
345 // <website>: a URL string starting with "http://"
346 void set_website(char* website=null) {
347 gtk_about_dialog_set_website(&this, website);
350 // Sets the label to be used for the website link.
351 // It defaults to the website URL.
352 // <website_label>: the label used for the website link
353 void set_website_label(char* website_label) {
354 gtk_about_dialog_set_website_label(&this, website_label);
357 // Sets whether the license text in @about is
358 // automatically wrapped.
359 // <wrap_license>: whether to wrap the license
360 void set_wrap_license(int wrap_license) {
361 gtk_about_dialog_set_wrap_license(&this, wrap_license);
364 // The signal which gets emitted to activate a URI.
365 // Applications may connect to it to override the default behaviour,
366 // which is to call gtk_show_uri().
367 // RETURNS: %TRUE if the link has been activated
368 // <uri>: the URI that is activated
369 extern (C) alias static c_int function (AboutDialog* this_, char* uri, void* user_data=null) signal_activate_link;
371 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
372 return super_.signal_connect!name(cb, data, cf);
375 ulong signal_connect(string name:"activate-link", CB/*:signal_activate_link*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
376 return signal_connect_data(&this, cast(char*)"activate-link",
377 cast(GObject2.Callback)cb, data, null, cf);
382 // The type of a function which is called when a URL or email
383 // link is activated.
384 // <about>: the #GtkAboutDialog in which the link was activated
385 // <link_>: the URL or email address to which the activated link points
386 // <data>: user data that was passed when the function was registered with gtk_about_dialog_set_email_hook() or gtk_about_dialog_set_url_hook()
387 extern (C) alias void function (AboutDialog* about, char* link_, void* data) AboutDialogActivateLinkFunc;
389 struct AboutDialogClass {
390 DialogClass parent_class;
391 extern (C) int function (AboutDialog* dialog, char* uri) activate_link;
392 extern (C) void function () _gtk_reserved1;
393 extern (C) void function () _gtk_reserved2;
394 extern (C) void function () _gtk_reserved3;
397 enum AccelFlags {
398 VISIBLE = 1,
399 LOCKED = 2,
400 MASK = 7
403 // A #GtkAccelGroup represents a group of keyboard accelerators,
404 // typically attached to a toplevel #GtkWindow (with
405 // gtk_window_add_accel_group()). Usually you won't need to create a
406 // #GtkAccelGroup directly; instead, when using #GtkItemFactory, GTK+
407 // automatically sets up the accelerators for your menus in the item
408 // factory's #GtkAccelGroup.
409 // Note that <firstterm>accelerators</firstterm> are different from
410 // <firstterm>mnemonics</firstterm>. Accelerators are shortcuts for
411 // activating a menu item; they appear alongside the menu item they're a
412 // shortcut for. For example "Ctrl+Q" might appear alongside the "Quit"
413 // menu item. Mnemonics are shortcuts for GUI elements such as text
414 // entries or buttons; they appear as underlined characters. See
415 // gtk_label_new_with_mnemonic(). Menu items can have both accelerators
416 // and mnemonics, of course.
417 struct AccelGroup /* : GObject.Object */ {
418 alias parent this;
419 alias parent super_;
420 alias parent object;
421 GObject2.Object parent;
422 uint lock_count;
423 Gdk2.ModifierType modifier_mask;
424 GLib2.SList* acceleratables;
425 uint n_accels;
426 AccelGroupEntry* priv_accels;
429 // Creates a new #GtkAccelGroup.
430 // RETURNS: a new #GtkAccelGroup object
431 static AccelGroup* /*new*/ new_() {
432 return gtk_accel_group_new();
435 // Finds the #GtkAccelGroup to which @closure is connected;
436 // see gtk_accel_group_connect().
437 // RETURNS: the #GtkAccelGroup to which @closure is connected, or %NULL.
438 // <closure>: a #GClosure
439 static AccelGroup* from_accel_closure(GObject2.Closure* closure) {
440 return gtk_accel_group_from_accel_closure(closure);
443 // Finds the first accelerator in @accel_group
444 // that matches @accel_key and @accel_mods, and
445 // activates it.
446 // RETURNS: %TRUE if an accelerator was activated and handled this keypress
447 // <accel_quark>: the quark for the accelerator name
448 // <acceleratable>: the #GObject, usually a #GtkWindow, on which to activate the accelerator.
449 // <accel_key>: accelerator keyval from a key event
450 // <accel_mods>: keyboard state mask from a key event
451 int activate(GLib2.Quark accel_quark, GObject2.Object* acceleratable, uint accel_key, Gdk2.ModifierType accel_mods) {
452 return gtk_accel_group_activate(&this, accel_quark, acceleratable, accel_key, accel_mods);
455 // Installs an accelerator in this group. When @accel_group is being activated
456 // in response to a call to gtk_accel_groups_activate(), @closure will be
457 // invoked if the @accel_key and @accel_mods from gtk_accel_groups_activate()
458 // match those of this connection.
459 // The signature used for the @closure is that of #GtkAccelGroupActivate.
460 // Note that, due to implementation details, a single closure can only be
461 // connected to one accelerator group.
462 // <accel_key>: key value of the accelerator
463 // <accel_mods>: modifier combination of the accelerator
464 // <accel_flags>: a flag mask to configure this accelerator
465 // <closure>: closure to be executed upon accelerator activation
466 void connect(uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags, GObject2.Closure* closure) {
467 gtk_accel_group_connect(&this, accel_key, accel_mods, accel_flags, closure);
470 // Installs an accelerator in this group, using an accelerator path to look
471 // up the appropriate key and modifiers (see gtk_accel_map_add_entry()).
472 // When @accel_group is being activated in response to a call to
473 // gtk_accel_groups_activate(), @closure will be invoked if the @accel_key and
474 // for the path.
475 // The signature used for the @closure is that of #GtkAccelGroupActivate.
476 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
477 // pass a static string, you can save some memory by interning it first with
478 // g_intern_static_string().
479 // <accel_path>: path used for determining key and modifiers.
480 // <closure>: closure to be executed upon accelerator activation
481 void connect_by_path(char* accel_path, GObject2.Closure* closure) {
482 gtk_accel_group_connect_by_path(&this, accel_path, closure);
485 // Removes an accelerator previously installed through
486 // gtk_accel_group_connect().
487 // Since 2.20 @closure can be %NULL.
488 // RETURNS: %TRUE if the closure was found and got disconnected
489 // <closure>: the closure to remove from this accelerator group, or %NULL to remove all closures
490 int disconnect(GObject2.Closure* closure=null) {
491 return gtk_accel_group_disconnect(&this, closure);
494 // Removes an accelerator previously installed through
495 // gtk_accel_group_connect().
496 // RETURNS: %TRUE if there was an accelerator which could be removed, %FALSE otherwise
497 // <accel_key>: key value of the accelerator
498 // <accel_mods>: modifier combination of the accelerator
499 int disconnect_key(uint accel_key, Gdk2.ModifierType accel_mods) {
500 return gtk_accel_group_disconnect_key(&this, accel_key, accel_mods);
503 // Unintrospectable method: find() / gtk_accel_group_find()
504 // Finds the first entry in an accelerator group for which
505 // RETURNS: the key of the first entry passing
506 // <find_func>: a function to filter the entries of @accel_group with
507 // <data>: data to pass to @find_func
508 AccelKey* find(AccelGroupFindFunc find_func, void* data) {
509 return gtk_accel_group_find(&this, find_func, data);
512 // Locks are added and removed using gtk_accel_group_lock() and
513 // gtk_accel_group_unlock().
514 // %FALSE otherwise.
515 // RETURNS: %TRUE if there are 1 or more locks on the @accel_group,
516 int get_is_locked() {
517 return gtk_accel_group_get_is_locked(&this);
520 // Gets a #GdkModifierType representing the mask for this
521 // RETURNS: the modifier mask for this accel group.
522 Gdk2.ModifierType get_modifier_mask() {
523 return gtk_accel_group_get_modifier_mask(&this);
526 // Locks the given accelerator group.
527 // Locking an acelerator group prevents the accelerators contained
528 // within it to be changed during runtime. Refer to
529 // gtk_accel_map_change_entry() about runtime accelerator changes.
530 // If called more than once, @accel_group remains locked until
531 // gtk_accel_group_unlock() has been called an equivalent number
532 // of times.
533 void lock() {
534 gtk_accel_group_lock(&this);
537 // Unintrospectable method: query() / gtk_accel_group_query()
538 // Queries an accelerator group for all entries matching @accel_key and
539 // RETURNS: an array of @n_entries #GtkAccelGroupEntry elements, or %NULL. The array is owned by GTK+ and must not be freed.
540 // <accel_key>: key value of the accelerator
541 // <accel_mods>: modifier combination of the accelerator
542 // <n_entries>: location to return the number of entries found, or %NULL
543 AccelGroupEntry* query(uint accel_key, Gdk2.ModifierType accel_mods, uint* n_entries=null) {
544 return gtk_accel_group_query(&this, accel_key, accel_mods, n_entries);
546 // Undoes the last call to gtk_accel_group_lock() on this @accel_group.
547 void unlock() {
548 gtk_accel_group_unlock(&this);
551 // The accel-activate signal is an implementation detail of
552 // #GtkAccelGroup and not meant to be used by applications.
553 // RETURNS: %TRUE if the accelerator was activated
554 // <acceleratable>: the object on which the accelerator was activated
555 // <keyval>: the accelerator keyval
556 // <modifier>: the modifier combination of the accelerator
557 extern (C) alias static c_int function (AccelGroup* this_, GObject2.Object* acceleratable, c_uint keyval, Gdk2.ModifierType* modifier, void* user_data=null) signal_accel_activate;
559 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
560 return super_.signal_connect!name(cb, data, cf);
563 ulong signal_connect(string name:"accel-activate", CB/*:signal_accel_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
564 return signal_connect_data(&this, cast(char*)"accel-activate",
565 cast(GObject2.Callback)cb, data, null, cf);
568 // The accel-changed signal is emitted when a #GtkAccelGroupEntry
569 // is added to or removed from the accel group.
570 // Widgets like #GtkAccelLabel which display an associated
571 // accelerator should connect to this signal, and rebuild
572 // their visual representation if the @accel_closure is theirs.
573 // <keyval>: the accelerator keyval
574 // <modifier>: the modifier combination of the accelerator
575 // <accel_closure>: the #GClosure of the accelerator
576 extern (C) alias static void function (AccelGroup* this_, c_uint keyval, Gdk2.ModifierType* modifier, GObject2.Closure* accel_closure, void* user_data=null) signal_accel_changed;
577 ulong signal_connect(string name:"accel-changed", CB/*:signal_accel_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
578 return signal_connect_data(&this, cast(char*)"accel-changed",
579 cast(GObject2.Callback)cb, data, null, cf);
583 extern (C) alias int function (AccelGroup* accel_group, GObject2.Object* acceleratable, uint keyval, Gdk2.ModifierType modifier) AccelGroupActivate;
585 struct AccelGroupClass {
586 GObject2.ObjectClass parent_class;
587 extern (C) void function (AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifier, GObject2.Closure* accel_closure) accel_changed;
588 extern (C) void function () _gtk_reserved1;
589 extern (C) void function () _gtk_reserved2;
590 extern (C) void function () _gtk_reserved3;
591 extern (C) void function () _gtk_reserved4;
594 struct AccelGroupEntry {
595 AccelKey key;
596 GObject2.Closure* closure;
597 GLib2.Quark accel_path_quark;
600 extern (C) alias int function (AccelKey* key, GObject2.Closure* closure, void* data) AccelGroupFindFunc;
602 struct AccelKey {
603 uint accel_key;
604 Gdk2.ModifierType accel_mods;
605 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
606 uint, "accel_flags", 16,
607 uint, "__dummy32A", 16));
611 // The #GtkAccelLabel widget is a subclass of #GtkLabel that also displays an
612 // accelerator key on the right of the label text, e.g. 'Ctl+S'.
613 // It is commonly used in menus to show the keyboard short-cuts for commands.
614 // The accelerator key to display is not set explicitly.
615 // Instead, the #GtkAccelLabel displays the accelerators which have been added to
616 // a particular widget. This widget is set by calling
617 // gtk_accel_label_set_accel_widget().
618 // For example, a #GtkMenuItem widget may have an accelerator added to emit the
619 // "activate" signal when the 'Ctl+S' key combination is pressed.
620 // A #GtkAccelLabel is created and added to the #GtkMenuItem, and
621 // gtk_accel_label_set_accel_widget() is called with the #GtkMenuItem as the
622 // second argument. The #GtkAccelLabel will now display 'Ctl+S' after its label.
623 // Note that creating a #GtkMenuItem with gtk_menu_item_new_with_label() (or
624 // one of the similar functions for #GtkCheckMenuItem and #GtkRadioMenuItem)
625 // automatically adds a #GtkAccelLabel to the #GtkMenuItem and calls
626 // gtk_accel_label_set_accel_widget() to set it up for you.
627 // A #GtkAccelLabel will only display accelerators which have %GTK_ACCEL_VISIBLE
628 // set (see #GtkAccelFlags).
629 // A #GtkAccelLabel can display multiple accelerators and even signal names,
630 // though it is almost always used to display just one accelerator key.
631 // <example>
632 // <title>Creating a simple menu item with an accelerator key.</title>
633 // <programlisting>
634 // GtkWidget *save_item;
635 // GtkAccelGroup *accel_group;
636 // /<!---->* Create a GtkAccelGroup and add it to the window. *<!---->/
637 // accel_group = gtk_accel_group_new (<!-- -->);
638 // gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
639 // /<!---->* Create the menu item using the convenience function. *<!---->/
640 // save_item = gtk_menu_item_new_with_label ("Save");
641 // gtk_widget_show (save_item);
642 // gtk_container_add (GTK_CONTAINER (menu), save_item);
643 // /<!---->* Now add the accelerator to the GtkMenuItem. Note that since we called
644 // gtk_menu_item_new_with_label(<!-- -->) to create the GtkMenuItem the
645 // GtkAccelLabel is automatically set up to display the GtkMenuItem
646 // accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. *<!---->/
647 // gtk_widget_add_accelerator (save_item, "activate", accel_group,
648 // GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
649 // </programlisting>
650 // </example>
651 struct AccelLabel /* : Label */ {
652 alias label this;
653 alias label super_;
654 Label label;
655 uint gtk_reserved, accel_padding;
656 Widget* accel_widget;
657 GObject2.Closure* accel_closure;
658 AccelGroup* accel_group;
659 char* accel_string;
660 ushort accel_string_width;
663 // Creates a new #GtkAccelLabel.
664 // RETURNS: a new #GtkAccelLabel.
665 // <string>: the label string. Must be non-%NULL.
666 static AccelLabel* new_(char* string_) {
667 return gtk_accel_label_new(string_);
670 // Fetches the widget monitored by this accelerator label. See
671 // gtk_accel_label_set_accel_widget().
672 // RETURNS: the object monitored by the accelerator label, or %NULL.
673 Widget* get_accel_widget() {
674 return gtk_accel_label_get_accel_widget(&this);
677 // Returns the width needed to display the accelerator key(s).
678 // This is used by menus to align all of the #GtkMenuItem widgets, and shouldn't
679 // be needed by applications.
680 // RETURNS: the width needed to display the accelerator key(s).
681 uint get_accel_width() {
682 return gtk_accel_label_get_accel_width(&this);
685 // Recreates the string representing the accelerator keys.
686 // This should not be needed since the string is automatically updated whenever
687 // accelerators are added or removed from the associated widget.
688 // RETURNS: always returns %FALSE.
689 int refetch() {
690 return gtk_accel_label_refetch(&this);
693 // Sets the closure to be monitored by this accelerator label. The closure
694 // must be connected to an accelerator group; see gtk_accel_group_connect().
695 // <accel_closure>: the closure to monitor for accelerator changes.
696 void set_accel_closure(GObject2.Closure* accel_closure) {
697 gtk_accel_label_set_accel_closure(&this, accel_closure);
700 // Sets the widget to be monitored by this accelerator label.
701 // <accel_widget>: the widget to be monitored.
702 void set_accel_widget(Widget* accel_widget) {
703 gtk_accel_label_set_accel_widget(&this, accel_widget);
707 struct AccelLabelClass {
708 LabelClass parent_class;
709 char* signal_quote1, signal_quote2, mod_name_shift, mod_name_control, mod_name_alt, mod_separator, accel_seperator;
710 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
711 uint, "latin1_to_char", 1,
712 uint, "__dummy32A", 31));
713 extern (C) void function () _gtk_reserved1;
714 extern (C) void function () _gtk_reserved2;
715 extern (C) void function () _gtk_reserved3;
716 extern (C) void function () _gtk_reserved4;
719 struct AccelMap /* : GObject.Object */ {
720 alias method_parent this;
721 alias method_parent super_;
722 alias method_parent object;
723 GObject2.Object method_parent;
726 // Registers a new accelerator with the global accelerator map.
727 // This function should only be called once per @accel_path
728 // with the canonical @accel_key and @accel_mods for this path.
729 // To change the accelerator during runtime programatically, use
730 // gtk_accel_map_change_entry().
731 // The accelerator path must consist of "&lt;WINDOWTYPE&gt;/Category1/Category2/.../Action",
732 // where &lt;WINDOWTYPE&gt; should be a unique application-specific identifier, that
733 // corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image",
734 // "Abiword-Document" or "Gnumeric-Settings".
735 // The Category1/.../Action portion is most appropriately chosen by the action the
736 // accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,
737 // e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".
738 // So a full valid accelerator path may look like:
739 // "&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".
740 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
741 // pass a static string, you can save some memory by interning it first with
742 // g_intern_static_string().
743 // <accel_path>: valid accelerator path
744 // <accel_key>: the accelerator key
745 // <accel_mods>: the accelerator modifiers
746 static void add_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods) {
747 gtk_accel_map_add_entry(accel_path, accel_key, accel_mods);
750 // Adds a filter to the global list of accel path filters.
751 // Accel map entries whose accel path matches one of the filters
752 // are skipped by gtk_accel_map_foreach().
753 // This function is intended for GTK+ modules that create their own
754 // menus, but don't want them to be saved into the applications accelerator
755 // map dump.
756 // <filter_pattern>: a pattern (see #GPatternSpec)
757 static void add_filter(char* filter_pattern) {
758 gtk_accel_map_add_filter(filter_pattern);
761 // Changes the @accel_key and @accel_mods currently associated with @accel_path.
762 // Due to conflicts with other accelerators, a change may not always be possible,
763 // conflicts. A change will only occur if all conflicts could be resolved (which
764 // might not be the case if conflicting accelerators are locked). Successful
765 // changes are indicated by a %TRUE return value.
766 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
767 // pass a static string, you can save some memory by interning it first with
768 // g_intern_static_string().
769 // RETURNS: %TRUE if the accelerator could be changed, %FALSE otherwise
770 // <accel_path>: a valid accelerator path
771 // <accel_key>: the new accelerator key
772 // <accel_mods>: the new accelerator modifiers
773 // <replace>: %TRUE if other accelerators may be deleted upon conflicts
774 static int change_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int replace) {
775 return gtk_accel_map_change_entry(accel_path, accel_key, accel_mods, replace);
778 // Unintrospectable function: foreach() / gtk_accel_map_foreach()
779 // Loops over the entries in the accelerator map whose accel path
780 // doesn't match any of the filters added with gtk_accel_map_add_filter(),
781 // and execute @foreach_func on each. The signature of @foreach_func is
782 // that of #GtkAccelMapForeach, the @changed parameter indicates whether
783 // this accelerator was changed during runtime (thus, would need
784 // saving during an accelerator map dump).
785 // <data>: data to be passed into @foreach_func
786 // <foreach_func>: function to be executed for each accel map entry which is not filtered out
787 static void foreach_(void* data, AccelMapForeach foreach_func) {
788 gtk_accel_map_foreach(data, foreach_func);
791 // Unintrospectable function: foreach_unfiltered() / gtk_accel_map_foreach_unfiltered()
792 // Loops over all entries in the accelerator map, and execute
793 // #GtkAccelMapForeach, the @changed parameter indicates whether
794 // this accelerator was changed during runtime (thus, would need
795 // saving during an accelerator map dump).
796 // <data>: data to be passed into @foreach_func
797 // <foreach_func>: function to be executed for each accel map entry
798 static void foreach_unfiltered(void* data, AccelMapForeach foreach_func) {
799 gtk_accel_map_foreach_unfiltered(data, foreach_func);
802 // Unintrospectable function: get() / gtk_accel_map_get()
803 // Gets the singleton global #GtkAccelMap object. This object
804 // is useful only for notification of changes to the accelerator
805 // map via the ::changed signal; it isn't a parameter to the
806 // other accelerator map functions.
807 // RETURNS: the global #GtkAccelMap object
808 static AccelMap* get() {
809 return gtk_accel_map_get();
812 // Parses a file previously saved with gtk_accel_map_save() for
813 // accelerator specifications, and propagates them accordingly.
814 // <file_name>: a file containing accelerator specifications, in the GLib file name encoding
815 static void load(char* file_name) {
816 gtk_accel_map_load(file_name);
819 // Filedescriptor variant of gtk_accel_map_load().
820 // Note that the file descriptor will not be closed by this function.
821 // <fd>: a valid readable file descriptor
822 static void load_fd(int fd) {
823 gtk_accel_map_load_fd(fd);
826 // #GScanner variant of gtk_accel_map_load().
827 // <scanner>: a #GScanner which has already been provided with an input file
828 static void load_scanner(GLib2.Scanner* scanner) {
829 gtk_accel_map_load_scanner(scanner);
832 // Locks the given accelerator path. If the accelerator map doesn't yet contain
833 // an entry for @accel_path, a new one is created.
834 // Locking an accelerator path prevents its accelerator from being changed
835 // during runtime. A locked accelerator path can be unlocked by
836 // gtk_accel_map_unlock_path(). Refer to gtk_accel_map_change_entry()
837 // for information about runtime accelerator changes.
838 // If called more than once, @accel_path remains locked until
839 // gtk_accel_map_unlock_path() has been called an equivalent number
840 // of times.
841 // Note that locking of individual accelerator paths is independent from
842 // locking the #GtkAccelGroup containing them. For runtime accelerator
843 // changes to be possible both the accelerator path and its #GtkAccelGroup
844 // have to be unlocked.
845 // <accel_path>: a valid accelerator path
846 static void lock_path(char* accel_path) {
847 gtk_accel_map_lock_path(accel_path);
850 // Looks up the accelerator entry for @accel_path and fills in @key.
851 // RETURNS: %TRUE if @accel_path is known, %FALSE otherwise
852 // <accel_path>: a valid accelerator path
853 // <key>: the accelerator key to be filled in (optional)
854 static int lookup_entry(char* accel_path, AccelKey* key) {
855 return gtk_accel_map_lookup_entry(accel_path, key);
858 // Saves current accelerator specifications (accelerator path, key
859 // and modifiers) to @file_name.
860 // The file is written in a format suitable to be read back in by
861 // gtk_accel_map_load().
862 // <file_name>: the name of the file to contain accelerator specifications, in the GLib file name encoding
863 static void save(char* file_name) {
864 gtk_accel_map_save(file_name);
867 // Filedescriptor variant of gtk_accel_map_save().
868 // Note that the file descriptor will not be closed by this function.
869 // <fd>: a valid writable file descriptor
870 static void save_fd(int fd) {
871 gtk_accel_map_save_fd(fd);
874 // Undoes the last call to gtk_accel_map_lock_path() on this @accel_path.
875 // Refer to gtk_accel_map_lock_path() for information about accelerator path locking.
876 // <accel_path>: a valid accelerator path
877 static void unlock_path(char* accel_path) {
878 gtk_accel_map_unlock_path(accel_path);
881 // Notifies of a change in the global accelerator map.
882 // The path is also used as the detail for the signal,
883 // so it is possible to connect to
884 // changed::<replaceable>accel_path</replaceable>.
885 // <accel_path>: the path of the accelerator that changed
886 // <accel_key>: the key value for the new accelerator
887 // <accel_mods>: the modifier mask for the new accelerator
888 extern (C) alias static void function (AccelMap* this_, char* accel_path, c_uint accel_key, Gdk2.ModifierType* accel_mods, void* user_data=null) signal_changed;
890 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
891 return super_.signal_connect!name(cb, data, cf);
894 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
895 return signal_connect_data(&this, cast(char*)"changed",
896 cast(GObject2.Callback)cb, data, null, cf);
900 struct AccelMapClass {
903 extern (C) alias void function (void* data, char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int changed) AccelMapForeach;
905 struct Accessible /* : Atk.Object */ {
906 alias parent this;
907 alias parent super_;
908 alias parent object;
909 Atk.Object parent;
910 Widget* widget;
913 // This function specifies the callback function to be called when the widget
914 // corresponding to a GtkAccessible is destroyed.
915 void connect_widget_destroyed() {
916 gtk_accessible_connect_widget_destroyed(&this);
919 // Gets the #GtkWidget corresponding to the #GtkAccessible. The returned widget
920 // does not have a reference added, so you do not need to unref it.
921 // the #GtkAccessible, or %NULL.
922 // RETURNS: pointer to the #GtkWidget corresponding to
923 Widget* get_widget() {
924 return gtk_accessible_get_widget(&this);
927 // Sets the #GtkWidget corresponding to the #GtkAccessible.
928 // <widget>: a #GtkWidget
929 void set_widget(Widget* widget) {
930 gtk_accessible_set_widget(&this, widget);
934 struct AccessibleClass {
935 Atk.ObjectClass parent_class;
936 extern (C) void function (Accessible* accessible) connect_widget_destroyed;
937 extern (C) void function () _gtk_reserved1;
938 extern (C) void function () _gtk_reserved2;
939 extern (C) void function () _gtk_reserved3;
940 extern (C) void function () _gtk_reserved4;
944 // Actions represent operations that the user can be perform, along with
945 // some information how it should be presented in the interface. Each action
946 // provides methods to create icons, menu items and toolbar items
947 // representing itself.
948 // As well as the callback that is called when the action gets activated,
949 // the following also gets associated with the action:
950 // <itemizedlist>
951 // <listitem><para>a name (not translated, for path lookup)</para></listitem>
952 // <listitem><para>a label (translated, for display)</para></listitem>
953 // <listitem><para>an accelerator</para></listitem>
954 // <listitem><para>whether label indicates a stock id</para></listitem>
955 // <listitem><para>a tooltip (optional, translated)</para></listitem>
956 // <listitem><para>a toolbar label (optional, shorter than label)</para></listitem>
957 // </itemizedlist>
958 // The action will also have some state information:
959 // <itemizedlist>
960 // <listitem><para>visible (shown/hidden)</para></listitem>
961 // <listitem><para>sensitive (enabled/disabled)</para></listitem>
962 // </itemizedlist>
963 // Apart from regular actions, there are <link linkend="GtkToggleAction">toggle
964 // actions</link>, which can be toggled between two states and <link
965 // linkend="GtkRadioAction">radio actions</link>, of which only one in a group
966 // can be in the "active" state. Other actions can be implemented as #GtkAction
967 // subclasses.
968 // Each action can have one or more proxy menu item, toolbar button or
969 // other proxy widgets. Proxies mirror the state of the action (text
970 // label, tooltip, icon, visible, sensitive, etc), and should change when
971 // the action's state changes. When the proxy is activated, it should
972 // activate its action.
973 struct Action /* : GObject.Object */ {
974 alias object this;
975 alias object super_;
976 GObject2.Object object;
977 private ActionPrivate* private_data;
980 // Creates a new #GtkAction object. To add the action to a
981 // #GtkActionGroup and set the accelerator for the action,
982 // call gtk_action_group_add_action_with_accel().
983 // See <xref linkend="XML-UI"/> for information on allowed action
984 // names.
985 // RETURNS: a new #GtkAction
986 // <name>: A unique name for the action
987 // <label>: the label displayed in menu items and on buttons, or %NULL
988 // <tooltip>: a tooltip for the action, or %NULL
989 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
990 static Action* /*new*/ new_(char* name, char* label, char* tooltip, char* stock_id) {
991 return gtk_action_new(name, label, tooltip, stock_id);
994 // Emits the "activate" signal on the specified action, if it isn't
995 // insensitive. This gets called by the proxy widgets when they get
996 // activated.
997 // It can also be used to manually activate an action.
998 void activate() {
999 gtk_action_activate(&this);
1002 // Disable activation signals from the action
1003 // This is needed when updating the state of your proxy
1004 // #GtkActivatable widget could result in calling gtk_action_activate(),
1005 // this is a convenience function to avoid recursing in those
1006 // cases (updating toggle state for instance).
1007 void block_activate() {
1008 gtk_action_block_activate(&this);
1011 // Disables calls to the gtk_action_activate()
1012 // function by signals on the given proxy widget. This is used to
1013 // break notification loops for things like check or radio actions.
1014 // This function is intended for use by action implementations.
1015 // action directly so this doesnt apply anymore.
1016 // <proxy>: a proxy widget
1017 void block_activate_from(Widget* proxy) {
1018 gtk_action_block_activate_from(&this, proxy);
1021 // Installs the accelerator for @action if @action has an
1022 // accel path and group. See gtk_action_set_accel_path() and
1023 // gtk_action_set_accel_group()
1024 // Since multiple proxies may independently trigger the installation
1025 // of the accelerator, the @action counts the number of times this
1026 // function has been called and doesn't remove the accelerator until
1027 // gtk_action_disconnect_accelerator() has been called as many times.
1028 void connect_accelerator() {
1029 gtk_action_connect_accelerator(&this);
1032 // Connects a widget to an action object as a proxy. Synchronises
1033 // various properties of the action with the widget (such as label
1034 // text, icon, tooltip, etc), and attaches a callback so that the
1035 // action gets activated when the proxy widget does.
1036 // If the widget is already connected to an action, it is disconnected
1037 // first.
1038 // <proxy>: the proxy widget
1039 void connect_proxy(Widget* proxy) {
1040 gtk_action_connect_proxy(&this, proxy);
1043 // This function is intended for use by action implementations to
1044 // create icons displayed in the proxy widgets.
1045 // RETURNS: a widget that displays the icon for this action.
1046 // <icon_size>: the size of the icon that should be created.
1047 Widget* create_icon(int icon_size) {
1048 return gtk_action_create_icon(&this, icon_size);
1051 // If @action provides a #GtkMenu widget as a submenu for the menu
1052 // item or the toolbar item it creates, this function returns an
1053 // instance of that menu.
1054 // action, or %NULL.
1055 // RETURNS: the menu item provided by the
1056 Widget* create_menu() {
1057 return gtk_action_create_menu(&this);
1060 // Creates a menu item widget that proxies for the given action.
1061 // RETURNS: a menu item connected to the action.
1062 Widget* create_menu_item() {
1063 return gtk_action_create_menu_item(&this);
1066 // Creates a toolbar item widget that proxies for the given action.
1067 // RETURNS: a toolbar item connected to the action.
1068 Widget* create_tool_item() {
1069 return gtk_action_create_tool_item(&this);
1071 // Undoes the effect of one call to gtk_action_connect_accelerator().
1072 void disconnect_accelerator() {
1073 gtk_action_disconnect_accelerator(&this);
1076 // Disconnects a proxy widget from an action.
1077 // Does <emphasis>not</emphasis> destroy the widget, however.
1078 // <proxy>: the proxy widget
1079 void disconnect_proxy(Widget* proxy) {
1080 gtk_action_disconnect_proxy(&this, proxy);
1083 // Returns the accel closure for this action.
1084 // returned closure is owned by GTK+ and must not be unreffed
1085 // or modified.
1086 // RETURNS: the accel closure for this action. The
1087 GObject2.Closure* get_accel_closure() {
1088 return gtk_action_get_accel_closure(&this);
1091 // Returns the accel path for this action.
1092 // if none is set. The returned string is owned by GTK+
1093 // and must not be freed or modified.
1094 // RETURNS: the accel path for this action, or %NULL
1095 char* get_accel_path() {
1096 return gtk_action_get_accel_path(&this);
1099 // Returns whether @action<!-- -->'s menu item proxies will ignore the
1100 // #GtkSettings:gtk-menu-images setting and always show their image,
1101 // if available.
1102 // RETURNS: %TRUE if the menu item proxies will always show their image
1103 int get_always_show_image() {
1104 return gtk_action_get_always_show_image(&this);
1107 // Gets the gicon of @action.
1108 // RETURNS: The action's #GIcon if one is set.
1109 Gio2.Icon* get_gicon() {
1110 return gtk_action_get_gicon(&this);
1113 // Gets the icon name of @action.
1114 // RETURNS: the icon name
1115 char* get_icon_name() {
1116 return gtk_action_get_icon_name(&this);
1119 // Checks whether @action is important or not
1120 // RETURNS: whether @action is important
1121 int get_is_important() {
1122 return gtk_action_get_is_important(&this);
1125 // Gets the label text of @action.
1126 // RETURNS: the label text
1127 char* get_label() {
1128 return gtk_action_get_label(&this);
1131 // Returns the name of the action.
1132 // be freed.
1133 // RETURNS: the name of the action. The string belongs to GTK+ and should not
1134 char* get_name() {
1135 return gtk_action_get_name(&this);
1138 // Returns the proxy widgets for an action.
1139 // See also gtk_widget_get_action().
1140 // and must not be modified.
1141 // RETURNS: a #GSList of proxy widgets. The list is owned by GTK+
1142 GLib2.SList* get_proxies() {
1143 return gtk_action_get_proxies(&this);
1146 // Returns whether the action itself is sensitive. Note that this doesn't
1147 // necessarily mean effective sensitivity. See gtk_action_is_sensitive()
1148 // for that.
1149 // RETURNS: %TRUE if the action itself is sensitive.
1150 int get_sensitive() {
1151 return gtk_action_get_sensitive(&this);
1154 // Gets the short label text of @action.
1155 // RETURNS: the short label text.
1156 char* get_short_label() {
1157 return gtk_action_get_short_label(&this);
1160 // Gets the stock id of @action.
1161 // RETURNS: the stock id
1162 char* get_stock_id() {
1163 return gtk_action_get_stock_id(&this);
1166 // Gets the tooltip text of @action.
1167 // RETURNS: the tooltip text
1168 char* get_tooltip() {
1169 return gtk_action_get_tooltip(&this);
1172 // Returns whether the action itself is visible. Note that this doesn't
1173 // necessarily mean effective visibility. See gtk_action_is_sensitive()
1174 // for that.
1175 // RETURNS: %TRUE if the action itself is visible.
1176 int get_visible() {
1177 return gtk_action_get_visible(&this);
1180 // Checks whether @action is visible when horizontal
1181 // RETURNS: whether @action is visible when horizontal
1182 int get_visible_horizontal() {
1183 return gtk_action_get_visible_horizontal(&this);
1186 // Checks whether @action is visible when horizontal
1187 // RETURNS: whether @action is visible when horizontal
1188 int get_visible_vertical() {
1189 return gtk_action_get_visible_vertical(&this);
1192 // Returns whether the action is effectively sensitive.
1193 // are both sensitive.
1194 // RETURNS: %TRUE if the action and its associated action group
1195 int is_sensitive() {
1196 return gtk_action_is_sensitive(&this);
1199 // Returns whether the action is effectively visible.
1200 // are both visible.
1201 // RETURNS: %TRUE if the action and its associated action group
1202 int is_visible() {
1203 return gtk_action_is_visible(&this);
1206 // Sets the #GtkAccelGroup in which the accelerator for this action
1207 // will be installed.
1208 // <accel_group>: a #GtkAccelGroup or %NULL
1209 void set_accel_group(AccelGroup* accel_group=null) {
1210 gtk_action_set_accel_group(&this, accel_group);
1213 // Sets the accel path for this action. All proxy widgets associated
1214 // with the action will have this accel path, so that their
1215 // accelerators are consistent.
1216 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
1217 // pass a static string, you can save some memory by interning it first with
1218 // g_intern_static_string().
1219 // <accel_path>: the accelerator path
1220 void set_accel_path(char* accel_path) {
1221 gtk_action_set_accel_path(&this, accel_path);
1224 // Sets whether @action<!-- -->'s menu item proxies will ignore the
1225 // #GtkSettings:gtk-menu-images setting and always show their image, if available.
1226 // Use this if the menu item would be useless or hard to use
1227 // without their image.
1228 // <always_show>: %TRUE if menuitem proxies should always show their image
1229 void set_always_show_image(int always_show) {
1230 gtk_action_set_always_show_image(&this, always_show);
1233 // Sets the icon of @action.
1234 // <icon>: the #GIcon to set
1235 void set_gicon(Gio2.Icon* icon) {
1236 gtk_action_set_gicon(&this, icon);
1239 // Sets the icon name on @action
1240 // <icon_name>: the icon name to set
1241 void set_icon_name(char* icon_name) {
1242 gtk_action_set_icon_name(&this, icon_name);
1245 // Sets whether the action is important, this attribute is used
1246 // primarily by toolbar items to decide whether to show a label
1247 // or not.
1248 // <is_important>: %TRUE to make the action important
1249 void set_is_important(int is_important) {
1250 gtk_action_set_is_important(&this, is_important);
1253 // Sets the label of @action.
1254 // <label>: the label text to set
1255 void set_label(char* label) {
1256 gtk_action_set_label(&this, label);
1259 // Sets the ::sensitive property of the action to @sensitive. Note that
1260 // this doesn't necessarily mean effective sensitivity. See
1261 // gtk_action_is_sensitive()
1262 // for that.
1263 // <sensitive>: %TRUE to make the action sensitive
1264 void set_sensitive(int sensitive) {
1265 gtk_action_set_sensitive(&this, sensitive);
1268 // Sets a shorter label text on @action.
1269 // <short_label>: the label text to set
1270 void set_short_label(char* short_label) {
1271 gtk_action_set_short_label(&this, short_label);
1274 // Sets the stock id on @action
1275 // <stock_id>: the stock id
1276 void set_stock_id(char* stock_id) {
1277 gtk_action_set_stock_id(&this, stock_id);
1280 // Sets the tooltip text on @action
1281 // <tooltip>: the tooltip text
1282 void set_tooltip(char* tooltip) {
1283 gtk_action_set_tooltip(&this, tooltip);
1286 // Sets the ::visible property of the action to @visible. Note that
1287 // this doesn't necessarily mean effective visibility. See
1288 // gtk_action_is_visible()
1289 // for that.
1290 // <visible>: %TRUE to make the action visible
1291 void set_visible(int visible) {
1292 gtk_action_set_visible(&this, visible);
1295 // Sets whether @action is visible when horizontal
1296 // <visible_horizontal>: whether the action is visible horizontally
1297 void set_visible_horizontal(int visible_horizontal) {
1298 gtk_action_set_visible_horizontal(&this, visible_horizontal);
1301 // Sets whether @action is visible when vertical
1302 // <visible_vertical>: whether the action is visible vertically
1303 void set_visible_vertical(int visible_vertical) {
1304 gtk_action_set_visible_vertical(&this, visible_vertical);
1306 // Reenable activation signals from the action
1307 void unblock_activate() {
1308 gtk_action_unblock_activate(&this);
1311 // Re-enables calls to the gtk_action_activate()
1312 // function by signals on the given proxy widget. This undoes the
1313 // blocking done by gtk_action_block_activate_from().
1314 // This function is intended for use by action implementations.
1315 // action directly so this doesnt apply anymore.
1316 // <proxy>: a proxy widget
1317 void unblock_activate_from(Widget* proxy) {
1318 gtk_action_unblock_activate_from(&this, proxy);
1320 // The "activate" signal is emitted when the action is activated.
1321 extern (C) alias static void function (Action* this_, void* user_data=null) signal_activate;
1323 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1324 return super_.signal_connect!name(cb, data, cf);
1327 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1328 return signal_connect_data(&this, cast(char*)"activate",
1329 cast(GObject2.Callback)cb, data, null, cf);
1333 struct ActionClass {
1334 GObject2.ObjectClass parent_class;
1335 extern (C) void function (Action* action) activate;
1336 Type menu_item_type, toolbar_item_type;
1337 // RETURNS: a menu item connected to the action.
1338 extern (C) Widget* function (Action* action) create_menu_item;
1339 // RETURNS: a toolbar item connected to the action.
1340 extern (C) Widget* function (Action* action) create_tool_item;
1341 // <proxy>: the proxy widget
1342 extern (C) void function (Action* action, Widget* proxy) connect_proxy;
1343 // <proxy>: the proxy widget
1344 extern (C) void function (Action* action, Widget* proxy) disconnect_proxy;
1345 // RETURNS: the menu item provided by the
1346 extern (C) Widget* function (Action* action) create_menu;
1347 extern (C) void function () _gtk_reserved2;
1348 extern (C) void function () _gtk_reserved3;
1349 extern (C) void function () _gtk_reserved4;
1352 struct ActionEntry {
1353 char* name, stock_id, label, accelerator, tooltip;
1354 GObject2.Callback callback;
1357 struct ActionGroup /* : GObject.Object */ {
1358 alias parent this;
1359 alias parent super_;
1360 alias parent object;
1361 GObject2.Object parent;
1362 private ActionGroupPrivate* private_data;
1365 // Creates a new #GtkActionGroup object. The name of the action group
1366 // is used when associating <link linkend="Action-Accel">keybindings</link>
1367 // with the actions.
1368 // RETURNS: the new #GtkActionGroup
1369 // <name>: the name of the action group.
1370 static ActionGroup* /*new*/ new_(char* name) {
1371 return gtk_action_group_new(name);
1374 // Adds an action object to the action group. Note that this function
1375 // does not set up the accel path of the action, which can lead to problems
1376 // if a user tries to modify the accelerator of a menuitem associated with
1377 // the action. Therefore you must either set the accel path yourself with
1378 // gtk_action_set_accel_path(), or use
1379 // <literal>gtk_action_group_add_action_with_accel (..., NULL)</literal>.
1380 // <action>: an action
1381 void add_action(Action* action) {
1382 gtk_action_group_add_action(&this, action);
1385 // Adds an action object to the action group and sets up the accelerator.
1386 // If @accelerator is %NULL, attempts to use the accelerator associated
1387 // with the stock_id of the action.
1388 // Accel paths are set to
1389 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1390 // <action>: the action to add
1391 // <accelerator>: the accelerator for the action, in the format understood by gtk_accelerator_parse(), or "" for no accelerator, or %NULL to use the stock accelerator
1392 void add_action_with_accel(Action* action, char* accelerator=null) {
1393 gtk_action_group_add_action_with_accel(&this, action, accelerator);
1396 // This is a convenience function to create a number of actions and add them
1397 // to the action group.
1398 // The "activate" signals of the actions are connected to the callbacks and
1399 // their accel paths are set to
1400 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1401 // <entries>: an array of action descriptions
1402 // <n_entries>: the number of entries
1403 // <user_data>: data to pass to the action callbacks
1404 void add_actions(ActionEntry* entries, uint n_entries, void* user_data) {
1405 gtk_action_group_add_actions(&this, entries, n_entries, user_data);
1408 // This variant of gtk_action_group_add_actions() adds a #GDestroyNotify
1409 // callback for @user_data.
1410 // <entries>: an array of action descriptions
1411 // <n_entries>: the number of entries
1412 // <user_data>: data to pass to the action callbacks
1413 // <destroy>: destroy notification callback for @user_data
1414 void add_actions_full(ActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy) {
1415 gtk_action_group_add_actions_full(&this, entries, n_entries, user_data, destroy);
1418 // Unintrospectable method: add_radio_actions() / gtk_action_group_add_radio_actions()
1419 // This is a convenience routine to create a group of radio actions and
1420 // add them to the action group.
1421 // The "changed" signal of the first radio action is connected to the
1422 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1423 // <entries>: an array of radio action descriptions
1424 // <n_entries>: the number of entries
1425 // <value>: the value of the action to activate initially, or -1 if no action should be activated
1426 // <on_change>: the callback to connect to the changed signal
1427 // <user_data>: data to pass to the action callbacks
1428 void add_radio_actions(RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data) {
1429 gtk_action_group_add_radio_actions(&this, entries, n_entries, value, on_change, user_data);
1432 // This variant of gtk_action_group_add_radio_actions() adds a
1433 // #GDestroyNotify callback for @user_data.
1434 // <entries>: an array of radio action descriptions
1435 // <n_entries>: the number of entries
1436 // <value>: the value of the action to activate initially, or -1 if no action should be activated
1437 // <on_change>: the callback to connect to the changed signal
1438 // <user_data>: data to pass to the action callbacks
1439 // <destroy>: destroy notification callback for @user_data
1440 void add_radio_actions_full(RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data, GLib2.DestroyNotify destroy) {
1441 gtk_action_group_add_radio_actions_full(&this, entries, n_entries, value, on_change, user_data, destroy);
1444 // This is a convenience function to create a number of toggle actions and add them
1445 // to the action group.
1446 // The "activate" signals of the actions are connected to the callbacks and
1447 // their accel paths are set to
1448 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1449 // <entries>: an array of toggle action descriptions
1450 // <n_entries>: the number of entries
1451 // <user_data>: data to pass to the action callbacks
1452 void add_toggle_actions(ToggleActionEntry* entries, uint n_entries, void* user_data) {
1453 gtk_action_group_add_toggle_actions(&this, entries, n_entries, user_data);
1456 // This variant of gtk_action_group_add_toggle_actions() adds a
1457 // #GDestroyNotify callback for @user_data.
1458 // <entries>: an array of toggle action descriptions
1459 // <n_entries>: the number of entries
1460 // <user_data>: data to pass to the action callbacks
1461 // <destroy>: destroy notification callback for @user_data
1462 void add_toggle_actions_full(ToggleActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy) {
1463 gtk_action_group_add_toggle_actions_full(&this, entries, n_entries, user_data, destroy);
1466 // Looks up an action in the action group by name.
1467 // RETURNS: the action, or %NULL if no action by that name exists
1468 // <action_name>: the name of the action
1469 Action* get_action(char* action_name) {
1470 return gtk_action_group_get_action(&this, action_name);
1473 // Gets the name of the action group.
1474 // RETURNS: the name of the action group.
1475 char* get_name() {
1476 return gtk_action_group_get_name(&this);
1479 // Returns %TRUE if the group is sensitive. The constituent actions
1480 // can only be logically sensitive (see gtk_action_is_sensitive()) if
1481 // they are sensitive (see gtk_action_get_sensitive()) and their group
1482 // is sensitive.
1483 // RETURNS: %TRUE if the group is sensitive.
1484 int get_sensitive() {
1485 return gtk_action_group_get_sensitive(&this);
1488 // Returns %TRUE if the group is visible. The constituent actions
1489 // can only be logically visible (see gtk_action_is_visible()) if
1490 // they are visible (see gtk_action_get_visible()) and their group
1491 // is visible.
1492 // RETURNS: %TRUE if the group is visible.
1493 int get_visible() {
1494 return gtk_action_group_get_visible(&this);
1497 // Lists the actions in the action group.
1498 // RETURNS: an allocated list of the action objects in the action group
1499 GLib2.List* /*new container*/ list_actions() {
1500 return gtk_action_group_list_actions(&this);
1503 // Removes an action object from the action group.
1504 // <action>: an action
1505 void remove_action(Action* action) {
1506 gtk_action_group_remove_action(&this, action);
1509 // Changes the sensitivity of @action_group
1510 // <sensitive>: new sensitivity
1511 void set_sensitive(int sensitive) {
1512 gtk_action_group_set_sensitive(&this, sensitive);
1515 // Sets a function to be used for translating the @label and @tooltip of
1516 // #GtkActionGroupEntry<!-- -->s added by gtk_action_group_add_actions().
1517 // If you're using gettext(), it is enough to set the translation domain
1518 // with gtk_action_group_set_translation_domain().
1519 // <func>: a #GtkTranslateFunc
1520 // <data>: data to be passed to @func and @notify
1521 // <notify>: a #GDestroyNotify function to be called when @action_group is destroyed and when the translation function is changed again
1522 void set_translate_func(TranslateFunc func, void* data, GLib2.DestroyNotify notify) {
1523 gtk_action_group_set_translate_func(&this, func, data, notify);
1526 // Sets the translation domain and uses g_dgettext() for translating the
1527 // gtk_action_group_add_actions().
1528 // If you're not using gettext() for localization, see
1529 // gtk_action_group_set_translate_func().
1530 // <domain>: the translation domain to use for g_dgettext() calls
1531 void set_translation_domain(char* domain) {
1532 gtk_action_group_set_translation_domain(&this, domain);
1535 // Changes the visible of @action_group.
1536 // <visible>: new visiblity
1537 void set_visible(int visible) {
1538 gtk_action_group_set_visible(&this, visible);
1541 // Translates a string using the specified translate_func(). This
1542 // is mainly intended for language bindings.
1543 // RETURNS: the translation of @string
1544 // <string>: a string
1545 char* translate_string(char* string_) {
1546 return gtk_action_group_translate_string(&this, string_);
1549 // The ::connect-proxy signal is emitted after connecting a proxy to
1550 // an action in the group. Note that the proxy may have been connected
1551 // to a different action before.
1552 // This is intended for simple customizations for which a custom action
1553 // class would be too clumsy, e.g. showing tooltips for menuitems in the
1554 // statusbar.
1555 // #GtkUIManager proxies the signal and provides global notification
1556 // just before any action is connected to a proxy, which is probably more
1557 // convenient to use.
1558 // <action>: the action
1559 // <proxy>: the proxy
1560 extern (C) alias static void function (ActionGroup* this_, Action* action, Widget* proxy, void* user_data=null) signal_connect_proxy;
1562 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1563 return super_.signal_connect!name(cb, data, cf);
1566 ulong signal_connect(string name:"connect-proxy", CB/*:signal_connect_proxy*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1567 return signal_connect_data(&this, cast(char*)"connect-proxy",
1568 cast(GObject2.Callback)cb, data, null, cf);
1571 // The ::disconnect-proxy signal is emitted after disconnecting a proxy
1572 // from an action in the group.
1573 // #GtkUIManager proxies the signal and provides global notification
1574 // just before any action is connected to a proxy, which is probably more
1575 // convenient to use.
1576 // <action>: the action
1577 // <proxy>: the proxy
1578 extern (C) alias static void function (ActionGroup* this_, Action* action, Widget* proxy, void* user_data=null) signal_disconnect_proxy;
1579 ulong signal_connect(string name:"disconnect-proxy", CB/*:signal_disconnect_proxy*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1580 return signal_connect_data(&this, cast(char*)"disconnect-proxy",
1581 cast(GObject2.Callback)cb, data, null, cf);
1584 // The ::post-activate signal is emitted just after the @action in the
1585 // This is intended for #GtkUIManager to proxy the signal and provide global
1586 // notification just after any action is activated.
1587 // <action>: the action
1588 extern (C) alias static void function (ActionGroup* this_, Action* action, void* user_data=null) signal_post_activate;
1589 ulong signal_connect(string name:"post-activate", CB/*:signal_post_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1590 return signal_connect_data(&this, cast(char*)"post-activate",
1591 cast(GObject2.Callback)cb, data, null, cf);
1594 // The ::pre-activate signal is emitted just before the @action in the
1595 // This is intended for #GtkUIManager to proxy the signal and provide global
1596 // notification just before any action is activated.
1597 // <action>: the action
1598 extern (C) alias static void function (ActionGroup* this_, Action* action, void* user_data=null) signal_pre_activate;
1599 ulong signal_connect(string name:"pre-activate", CB/*:signal_pre_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1600 return signal_connect_data(&this, cast(char*)"pre-activate",
1601 cast(GObject2.Callback)cb, data, null, cf);
1605 struct ActionGroupClass {
1606 GObject2.ObjectClass parent_class;
1608 // RETURNS: the action, or %NULL if no action by that name exists
1609 // <action_name>: the name of the action
1610 extern (C) Action* function (ActionGroup* action_group, char* action_name) get_action;
1611 extern (C) void function () _gtk_reserved1;
1612 extern (C) void function () _gtk_reserved2;
1613 extern (C) void function () _gtk_reserved3;
1614 extern (C) void function () _gtk_reserved4;
1617 struct ActionGroupPrivate {
1620 struct ActionPrivate {
1624 // Activatable widgets can be connected to a #GtkAction and reflects
1625 // the state of its action. A #GtkActivatable can also provide feedback
1626 // through its action, as they are responsible for activating their
1627 // related actions.
1628 // <refsect2>
1629 // <title>Implementing GtkActivatable</title>
1630 // <para>
1631 // When extending a class that is already #GtkActivatable; it is only
1632 // necessary to implement the #GtkActivatable->sync_action_properties()
1633 // and #GtkActivatable->update() methods and chain up to the parent
1634 // implementation, however when introducing
1635 // a new #GtkActivatable class; the #GtkActivatable:related-action and
1636 // #GtkActivatable:use-action-appearance properties need to be handled by
1637 // the implementor. Handling these properties is mostly a matter of installing
1638 // the action pointer and boolean flag on your instance, and calling
1639 // gtk_activatable_do_set_related_action() and
1640 // gtk_activatable_sync_action_properties() at the appropriate times.
1641 // </para>
1642 // <example>
1643 // <title>A class fragment implementing #GtkActivatable</title>
1644 // <programlisting><![CDATA[
1645 // enum {
1646 // ...
1647 // PROP_ACTIVATABLE_RELATED_ACTION,
1648 // PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
1649 // }
1650 // struct _FooBarPrivate
1651 // {
1652 // ...
1653 // GtkAction *action;
1654 // gboolean use_action_appearance;
1655 // };
1656 // ...
1657 // static void foo_bar_activatable_interface_init (GtkActivatableIface *iface);
1658 // static void foo_bar_activatable_update (GtkActivatable *activatable,
1659 // GtkAction *action,
1660 // const gchar *property_name);
1661 // static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable,
1662 // GtkAction *action);
1663 // ...
1664 // static void
1665 // foo_bar_class_init (FooBarClass *klass)
1666 // {
1667 // ...
1668 // g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action");
1669 // g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance");
1670 // ...
1671 // }
1672 // static void
1673 // foo_bar_activatable_interface_init (GtkActivatableIface *iface)
1674 // {
1675 // iface->update = foo_bar_activatable_update;
1676 // iface->sync_action_properties = foo_bar_activatable_sync_action_properties;
1677 // }
1678 // ... Break the reference using gtk_activatable_do_set_related_action()...
1679 // static void
1680 // foo_bar_dispose (GObject *object)
1681 // {
1682 // FooBar *bar = FOO_BAR (object);
1683 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1684 // ...
1685 // if (priv->action)
1686 // {
1687 // gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), NULL);
1688 // priv->action = NULL;
1689 // }
1690 // G_OBJECT_CLASS (foo_bar_parent_class)->dispose (object);
1691 // }
1692 // ... Handle the "related-action" and "use-action-appearance" properties ...
1693 // static void
1694 // foo_bar_set_property (GObject *object,
1695 // guint prop_id,
1696 // const GValue *value,
1697 // GParamSpec *pspec)
1698 // {
1699 // FooBar *bar = FOO_BAR (object);
1700 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1701 // switch (prop_id)
1702 // {
1703 // ...
1704 // case PROP_ACTIVATABLE_RELATED_ACTION:
1705 // foo_bar_set_related_action (bar, g_value_get_object (value));
1706 // break;
1707 // case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
1708 // foo_bar_set_use_action_appearance (bar, g_value_get_boolean (value));
1709 // break;
1710 // default:
1711 // G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1712 // break;
1713 // }
1714 // }
1715 // static void
1716 // foo_bar_get_property (GObject *object,
1717 // guint prop_id,
1718 // GValue *value,
1719 // GParamSpec *pspec)
1720 // {
1721 // FooBar *bar = FOO_BAR (object);
1722 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1723 // switch (prop_id)
1724 // {
1725 // ...
1726 // case PROP_ACTIVATABLE_RELATED_ACTION:
1727 // g_value_set_object (value, priv->action);
1728 // break;
1729 // case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
1730 // g_value_set_boolean (value, priv->use_action_appearance);
1731 // break;
1732 // default:
1733 // G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1734 // break;
1735 // }
1736 // }
1737 // static void
1738 // foo_bar_set_use_action_appearance (FooBar *bar,
1739 // gboolean use_appearance)
1740 // {
1741 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1742 // if (priv->use_action_appearance != use_appearance)
1743 // {
1744 // priv->use_action_appearance = use_appearance;
1745 // gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action);
1746 // }
1747 // }
1748 // ... call gtk_activatable_do_set_related_action() and then assign the action pointer,
1749 // no need to reference the action here since gtk_activatable_do_set_related_action() already
1750 // holds a reference here for you...
1751 // static void
1752 // foo_bar_set_related_action (FooBar *bar,
1753 // GtkAction *action)
1754 // {
1755 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1756 // if (priv->action == action)
1757 // return;
1758 // gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), action);
1759 // priv->action = action;
1760 // }
1761 // ... Selectively reset and update activatable depending on the use-action-appearance property ...
1762 // static void
1763 // gtk_button_activatable_sync_action_properties (GtkActivatable *activatable,
1764 // GtkAction *action)
1765 // {
1766 // GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
1767 // if (!action)
1768 // return;
1769 // if (gtk_action_is_visible (action))
1770 // gtk_widget_show (GTK_WIDGET (activatable));
1771 // else
1772 // gtk_widget_hide (GTK_WIDGET (activatable));
1773 // gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
1774 // ...
1775 // if (priv->use_action_appearance)
1776 // {
1777 // if (gtk_action_get_stock_id (action))
1778 // foo_bar_set_stock (button, gtk_action_get_stock_id (action));
1779 // else if (gtk_action_get_label (action))
1780 // foo_bar_set_label (button, gtk_action_get_label (action));
1781 // ...
1782 // }
1783 // }
1784 // static void
1785 // foo_bar_activatable_update (GtkActivatable *activatable,
1786 // GtkAction *action,
1787 // const gchar *property_name)
1788 // {
1789 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable);
1790 // if (strcmp (property_name, "visible") == 0)
1791 // {
1792 // if (gtk_action_is_visible (action))
1793 // gtk_widget_show (GTK_WIDGET (activatable));
1794 // else
1795 // gtk_widget_hide (GTK_WIDGET (activatable));
1796 // }
1797 // else if (strcmp (property_name, "sensitive") == 0)
1798 // gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
1799 // ...
1800 // if (!priv->use_action_appearance)
1801 // return;
1802 // if (strcmp (property_name, "stock-id") == 0)
1803 // foo_bar_set_stock (button, gtk_action_get_stock_id (action));
1804 // else if (strcmp (property_name, "label") == 0)
1805 // foo_bar_set_label (button, gtk_action_get_label (action));
1806 // ...
1807 // }]]></programlisting>
1808 // </example>
1809 // </refsect2>
1810 struct Activatable {
1812 // This is a utility function for #GtkActivatable implementors.
1813 // When implementing #GtkActivatable you must call this when
1814 // handling changes of the #GtkActivatable:related-action, and
1815 // you must also use this to break references in #GObject->dispose().
1816 // This function adds a reference to the currently set related
1817 // action for you, it also makes sure the #GtkActivatable->update()
1818 // method is called when the related #GtkAction properties change
1819 // and registers to the action's proxy list.
1820 // <note><para>Be careful to call this before setting the local
1821 // copy of the #GtkAction property, since this function uses
1822 // gtk_activatable_get_action() to retrieve the previous action</para></note>
1823 // <action>: the #GtkAction to set
1824 void do_set_related_action(Action* action) {
1825 gtk_activatable_do_set_related_action(&this, action);
1828 // Gets the related #GtkAction for @activatable.
1829 // RETURNS: the related #GtkAction if one is set.
1830 Action* get_related_action() {
1831 return gtk_activatable_get_related_action(&this);
1834 // Gets whether this activatable should reset its layout
1835 // and appearance when setting the related action or when
1836 // the action changes appearance.
1837 // RETURNS: whether @activatable uses its actions appearance.
1838 int get_use_action_appearance() {
1839 return gtk_activatable_get_use_action_appearance(&this);
1842 // Sets the related action on the @activatable object.
1843 // <note><para>#GtkActivatable implementors need to handle the #GtkActivatable:related-action
1844 // property and call gtk_activatable_do_set_related_action() when it changes.</para></note>
1845 // <action>: the #GtkAction to set
1846 void set_related_action(Action* action) {
1847 gtk_activatable_set_related_action(&this, action);
1850 // Sets whether this activatable should reset its layout and appearance
1851 // when setting the related action or when the action changes appearance
1852 // <note><para>#GtkActivatable implementors need to handle the
1853 // #GtkActivatable:use-action-appearance property and call
1854 // gtk_activatable_sync_action_properties() to update @activatable
1855 // if needed.</para></note>
1856 // <use_appearance>: whether to use the actions appearance
1857 void set_use_action_appearance(int use_appearance) {
1858 gtk_activatable_set_use_action_appearance(&this, use_appearance);
1861 // This is called to update the activatable completely, this is called
1862 // internally when the #GtkActivatable::related-action property is set
1863 // or unset and by the implementing class when
1864 // #GtkActivatable::use-action-appearance changes.
1865 // <action>: the related #GtkAction or %NULL
1866 void sync_action_properties(Action* action=null) {
1867 gtk_activatable_sync_action_properties(&this, action);
1871 struct ActivatableIface /* Version 2.16 */ {
1872 GObject2.TypeInterface g_iface;
1873 extern (C) void function (Activatable* activatable, Action* action, char* property_name) update;
1874 // <action>: the related #GtkAction or %NULL
1875 extern (C) void function (Activatable* activatable, Action* action=null) sync_action_properties;
1878 struct Adjustment /* : Object */ {
1879 alias parent_instance this;
1880 alias parent_instance super_;
1881 alias parent_instance object;
1882 Object parent_instance;
1883 double lower, upper, value, step_increment, page_increment, page_size;
1885 static Adjustment* new_(double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
1886 return gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
1888 void changed() {
1889 gtk_adjustment_changed(&this);
1891 void clamp_page(double lower, double upper) {
1892 gtk_adjustment_clamp_page(&this, lower, upper);
1895 // Sets all properties of the adjustment at once.
1896 // Use this function to avoid multiple emissions of the "changed"
1897 // signal. See gtk_adjustment_set_lower() for an alternative way
1898 // of compressing multiple emissions of "changed" into one.
1899 // <value>: the new value
1900 // <lower>: the new minimum value
1901 // <upper>: the new maximum value
1902 // <step_increment>: the new step increment
1903 // <page_increment>: the new page increment
1904 // <page_size>: the new page size
1905 void configure(double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
1906 gtk_adjustment_configure(&this, value, lower, upper, step_increment, page_increment, page_size);
1909 // Retrieves the minimum value of the adjustment.
1910 // RETURNS: The current minimum value of the adjustment.
1911 double get_lower() {
1912 return gtk_adjustment_get_lower(&this);
1915 // Retrieves the page increment of the adjustment.
1916 // RETURNS: The current page increment of the adjustment.
1917 double get_page_increment() {
1918 return gtk_adjustment_get_page_increment(&this);
1921 // Retrieves the page size of the adjustment.
1922 // RETURNS: The current page size of the adjustment.
1923 double get_page_size() {
1924 return gtk_adjustment_get_page_size(&this);
1927 // Retrieves the step increment of the adjustment.
1928 // RETURNS: The current step increment of the adjustment.
1929 double get_step_increment() {
1930 return gtk_adjustment_get_step_increment(&this);
1933 // Retrieves the maximum value of the adjustment.
1934 // RETURNS: The current maximum value of the adjustment.
1935 double get_upper() {
1936 return gtk_adjustment_get_upper(&this);
1939 // Gets the current value of the adjustment. See
1940 // gtk_adjustment_set_value ().
1941 // RETURNS: The current value of the adjustment.
1942 double get_value() {
1943 return gtk_adjustment_get_value(&this);
1946 // Sets the minimum value of the adjustment.
1947 // When setting multiple adjustment properties via their individual
1948 // setters, multiple "changed" signals will be emitted. However, since
1949 // the emission of the "changed" signal is tied to the emission of the
1950 // "GObject::notify" signals of the changed properties, it's possible
1951 // to compress the "changed" signals into one by calling
1952 // g_object_freeze_notify() and g_object_thaw_notify() around the
1953 // calls to the individual setters.
1954 // Alternatively, using a single g_object_set() for all the properties
1955 // to change, or using gtk_adjustment_configure() has the same effect
1956 // of compressing "changed" emissions.
1957 // <lower>: the new minimum value
1958 void set_lower(double lower) {
1959 gtk_adjustment_set_lower(&this, lower);
1962 // Sets the page increment of the adjustment.
1963 // See gtk_adjustment_set_lower() about how to compress multiple
1964 // emissions of the "changed" signal when setting multiple adjustment
1965 // properties.
1966 // <page_increment>: the new page increment
1967 void set_page_increment(double page_increment) {
1968 gtk_adjustment_set_page_increment(&this, page_increment);
1971 // Sets the page size of the adjustment.
1972 // See gtk_adjustment_set_lower() about how to compress multiple
1973 // emissions of the "changed" signal when setting multiple adjustment
1974 // properties.
1975 // <page_size>: the new page size
1976 void set_page_size(double page_size) {
1977 gtk_adjustment_set_page_size(&this, page_size);
1980 // Sets the step increment of the adjustment.
1981 // See gtk_adjustment_set_lower() about how to compress multiple
1982 // emissions of the "changed" signal when setting multiple adjustment
1983 // properties.
1984 // <step_increment>: the new step increment
1985 void set_step_increment(double step_increment) {
1986 gtk_adjustment_set_step_increment(&this, step_increment);
1989 // Sets the maximum value of the adjustment.
1990 // Note that values will be restricted by
1991 // <literal>upper - page-size</literal> if the page-size
1992 // property is nonzero.
1993 // See gtk_adjustment_set_lower() about how to compress multiple
1994 // emissions of the "changed" signal when setting multiple adjustment
1995 // properties.
1996 // <upper>: the new maximum value
1997 void set_upper(double upper) {
1998 gtk_adjustment_set_upper(&this, upper);
2000 void set_value(double value) {
2001 gtk_adjustment_set_value(&this, value);
2003 void value_changed() {
2004 gtk_adjustment_value_changed(&this);
2006 extern (C) alias static void function (Adjustment* this_, void* user_data=null) signal_changed;
2008 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2009 return super_.signal_connect!name(cb, data, cf);
2012 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2013 return signal_connect_data(&this, cast(char*)"changed",
2014 cast(GObject2.Callback)cb, data, null, cf);
2016 extern (C) alias static void function (Adjustment* this_, void* user_data=null) signal_value_changed;
2017 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2018 return signal_connect_data(&this, cast(char*)"value-changed",
2019 cast(GObject2.Callback)cb, data, null, cf);
2023 struct AdjustmentClass {
2024 ObjectClass parent_class;
2025 extern (C) void function (Adjustment* adjustment) changed;
2026 extern (C) void function (Adjustment* adjustment) value_changed;
2027 extern (C) void function () _gtk_reserved1;
2028 extern (C) void function () _gtk_reserved2;
2029 extern (C) void function () _gtk_reserved3;
2030 extern (C) void function () _gtk_reserved4;
2034 // The #GtkAlignment widget controls the alignment and size of its child widget.
2035 // The scale settings are used to specify how much the child widget should
2036 // expand to fill the space allocated to the #GtkAlignment.
2037 // The values can range from 0 (meaning the child doesn't expand at all) to
2038 // 1 (meaning the child expands to fill all of the available space).
2039 // The align settings are used to place the child widget within the available
2040 // area. The values range from 0 (top or left) to 1 (bottom or right).
2041 // Of course, if the scale settings are both set to 1, the alignment settings
2042 // have no effect.
2043 struct Alignment /* : Bin */ {
2044 alias bin this;
2045 alias bin super_;
2046 Bin bin;
2047 float xalign, yalign, xscale, yscale;
2050 // Creates a new #GtkAlignment.
2051 // RETURNS: the new #GtkAlignment.
2052 // <xalign>: the horizontal alignment of the child widget, from 0 (left) to 1 (right).
2053 // <yalign>: the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
2054 // <xscale>: the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the #GtkAlignment.
2055 // <yscale>: the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to @xscale.
2056 static Alignment* new_(float xalign, float yalign, float xscale, float yscale) {
2057 return gtk_alignment_new(xalign, yalign, xscale, yscale);
2060 // Gets the padding on the different sides of the widget.
2061 // See gtk_alignment_set_padding ().
2062 // <padding_top>: location to store the padding for the top of the widget, or %NULL
2063 // <padding_bottom>: location to store the padding for the bottom of the widget, or %NULL
2064 // <padding_left>: location to store the padding for the left of the widget, or %NULL
2065 // <padding_right>: location to store the padding for the right of the widget, or %NULL
2066 void get_padding(/*out*/ uint* padding_top=null, /*out*/ uint* padding_bottom=null, /*out*/ uint* padding_left=null, /*out*/ uint* padding_right=null) {
2067 gtk_alignment_get_padding(&this, padding_top, padding_bottom, padding_left, padding_right);
2070 // Sets the #GtkAlignment values.
2071 // <xalign>: the horizontal alignment of the child widget, from 0 (left) to 1 (right).
2072 // <yalign>: the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
2073 // <xscale>: the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the #GtkAlignment.
2074 // <yscale>: the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to @xscale.
2075 void set(float xalign, float yalign, float xscale, float yscale) {
2076 gtk_alignment_set(&this, xalign, yalign, xscale, yscale);
2079 // Sets the padding on the different sides of the widget.
2080 // The padding adds blank space to the sides of the widget. For instance,
2081 // this can be used to indent the child widget towards the right by adding
2082 // padding on the left.
2083 // <padding_top>: the padding at the top of the widget
2084 // <padding_bottom>: the padding at the bottom of the widget
2085 // <padding_left>: the padding at the left of the widget
2086 // <padding_right>: the padding at the right of the widget.
2087 void set_padding(uint padding_top, uint padding_bottom, uint padding_left, uint padding_right) {
2088 gtk_alignment_set_padding(&this, padding_top, padding_bottom, padding_left, padding_right);
2092 struct AlignmentClass {
2093 BinClass parent_class;
2096 struct AlignmentPrivate {
2099 enum AnchorType {
2100 CENTER = 0,
2101 NORTH = 1,
2102 NORTH_WEST = 2,
2103 NORTH_EAST = 3,
2104 SOUTH = 4,
2105 SOUTH_WEST = 5,
2106 SOUTH_EAST = 6,
2107 WEST = 7,
2108 EAST = 8,
2109 N = 1,
2110 NW = 2,
2111 NE = 3,
2112 S = 4,
2113 SW = 5,
2114 SE = 6,
2115 W = 7,
2116 E = 8
2118 struct Arg {
2119 Type type;
2120 char* name;
2122 union d {
2123 char char_data;
2124 ubyte uchar_data;
2125 int bool_data;
2126 int int_data;
2127 uint uint_data;
2128 c_long long_data;
2129 c_ulong ulong_data;
2130 float float_data;
2131 double double_data;
2132 char* string_data;
2133 Object* object_data;
2134 void* pointer_data;
2136 struct signal_data {
2137 GObject2.Callback f;
2138 void* d;
2143 enum ArgFlags {
2144 READABLE = 1,
2145 WRITABLE = 2,
2146 CONSTRUCT = 4,
2147 CONSTRUCT_ONLY = 8,
2148 CHILD_ARG = 16
2151 // GtkArrow should be used to draw simple arrows that need to point in
2152 // one of the four cardinal directions (up, down, left, or right). The
2153 // style of the arrow can be one of shadow in, shadow out, etched in, or
2154 // etched out. Note that these directions and style types may be
2155 // ammended in versions of GTK+ to come.
2156 // GtkArrow will fill any space alloted to it, but since it is inherited
2157 // from #GtkMisc, it can be padded and/or aligned, to fill exactly the
2158 // space the programmer desires.
2159 // Arrows are created with a call to gtk_arrow_new(). The direction or
2160 // style of an arrow can be changed after creation by using gtk_arrow_set().
2161 struct Arrow /* : Misc */ {
2162 alias misc this;
2163 alias misc super_;
2164 Misc misc;
2165 short arrow_type, shadow_type;
2168 // Creates a new #GtkArrow widget.
2169 // RETURNS: the new #GtkArrow widget.
2170 // <arrow_type>: a valid #GtkArrowType.
2171 // <shadow_type>: a valid #GtkShadowType.
2172 static Arrow* new_(ArrowType arrow_type, ShadowType shadow_type) {
2173 return gtk_arrow_new(arrow_type, shadow_type);
2176 // Sets the direction and style of the #GtkArrow, @arrow.
2177 // <arrow_type>: a valid #GtkArrowType.
2178 // <shadow_type>: a valid #GtkShadowType.
2179 void set(ArrowType arrow_type, ShadowType shadow_type) {
2180 gtk_arrow_set(&this, arrow_type, shadow_type);
2184 struct ArrowClass {
2185 MiscClass parent_class;
2188 enum ArrowPlacement {
2189 BOTH = 0,
2190 START = 1,
2191 END = 2
2193 enum ArrowType {
2194 UP = 0,
2195 DOWN = 1,
2196 LEFT = 2,
2197 RIGHT = 3,
2198 NONE = 4
2201 // The #GtkAspectFrame is useful when you want
2202 // pack a widget so that it can resize but always retains
2203 // the same aspect ratio. For instance, one might be
2204 // drawing a small preview of a larger image. #GtkAspectFrame
2205 // derives from #GtkFrame, so it can draw a label and
2206 // a frame around the child. The frame will be
2207 // "shrink-wrapped" to the size of the child.
2208 struct AspectFrame /* : Frame */ {
2209 alias frame this;
2210 alias frame super_;
2211 Frame frame;
2212 float xalign, yalign, ratio;
2213 int obey_child;
2214 Allocation center_allocation;
2217 // Create a new #GtkAspectFrame.
2218 // RETURNS: the new #GtkAspectFrame.
2219 // <label>: Label text.
2220 // <xalign>: Horizontal alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2221 // <yalign>: Vertical alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2222 // <ratio>: The desired aspect ratio.
2223 // <obey_child>: If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child.
2224 static AspectFrame* new_(char* label, float xalign, float yalign, float ratio, int obey_child) {
2225 return gtk_aspect_frame_new(label, xalign, yalign, ratio, obey_child);
2228 // Set parameters for an existing #GtkAspectFrame.
2229 // <xalign>: Horizontal alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2230 // <yalign>: Vertical alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2231 // <ratio>: The desired aspect ratio.
2232 // <obey_child>: If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child.
2233 void set(float xalign, float yalign, float ratio, int obey_child) {
2234 gtk_aspect_frame_set(&this, xalign, yalign, ratio, obey_child);
2238 struct AspectFrameClass {
2239 FrameClass parent_class;
2243 // A #GtkAssistant is a widget used to represent a generally complex
2244 // operation splitted in several steps, guiding the user through its pages
2245 // and controlling the page flow to collect the necessary data.
2246 // <refsect2 id="GtkAssistant-BUILDER-UI">
2247 // <title>GtkAssistant as GtkBuildable</title>
2248 // <para>
2249 // The GtkAssistant implementation of the GtkBuildable interface exposes the
2250 // To add pages to an assistant in GtkBuilder, simply add it as a
2251 // &lt;child&gt; to the GtkAssistant object, and set its child properties
2252 // as necessary.
2253 // </para>
2254 // </refsect2>
2255 struct Assistant /* : Window */ {
2256 alias parent this;
2257 alias parent super_;
2258 alias parent window;
2259 Window parent;
2260 Widget* cancel_, forward, back, apply_, close_, last;
2261 private AssistantPrivate* priv;
2264 // Creates a new #GtkAssistant.
2265 // RETURNS: a newly created #GtkAssistant
2266 static Assistant* new_() {
2267 return gtk_assistant_new();
2270 // Adds a widget to the action area of a #GtkAssistant.
2271 // <child>: a #GtkWidget
2272 void add_action_widget(Widget* child) {
2273 gtk_assistant_add_action_widget(&this, child);
2276 // Appends a page to the @assistant.
2277 // RETURNS: the index (starting at 0) of the inserted page
2278 // <page>: a #GtkWidget
2279 int append_page(Widget* page) {
2280 return gtk_assistant_append_page(&this, page);
2283 // Erases the visited page history so the back button is not
2284 // shown on the current page, and removes the cancel button
2285 // from subsequent pages.
2286 // Use this when the information provided up to the current
2287 // page is hereafter deemed permanent and cannot be modified
2288 // or undone. For example, showing a progress page to track
2289 // a long-running, unreversible operation after the user has
2290 // clicked apply on a confirmation page.
2291 void commit() {
2292 gtk_assistant_commit(&this);
2295 // Returns the page number of the current page
2296 // the @assistant, if the @assistant has no pages, -1 will be returned
2297 // RETURNS: The index (starting from 0) of the current page in
2298 int get_current_page() {
2299 return gtk_assistant_get_current_page(&this);
2302 // Returns the number of pages in the @assistant
2303 // RETURNS: The number of pages in the @assistant.
2304 int get_n_pages() {
2305 return gtk_assistant_get_n_pages(&this);
2308 // Returns the child widget contained in page number @page_num.
2309 // if @page_num is out of bounds.
2310 // RETURNS: The child widget, or %NULL
2311 // <page_num>: The index of a page in the @assistant, or -1 to get the last page;
2312 Widget* get_nth_page(int page_num) {
2313 return gtk_assistant_get_nth_page(&this, page_num);
2316 // Gets whether @page is complete.
2317 // RETURNS: %TRUE if @page is complete.
2318 // <page>: a page of @assistant
2319 int get_page_complete(Widget* page) {
2320 return gtk_assistant_get_page_complete(&this, page);
2323 // Gets the header image for @page.
2324 // if there's no header image for the page.
2325 // RETURNS: the header image for @page, or %NULL
2326 // <page>: a page of @assistant
2327 GdkPixbuf2.Pixbuf* get_page_header_image(Widget* page) {
2328 return gtk_assistant_get_page_header_image(&this, page);
2331 // Gets the header image for @page.
2332 // if there's no side image for the page.
2333 // RETURNS: the side image for @page, or %NULL
2334 // <page>: a page of @assistant
2335 GdkPixbuf2.Pixbuf* get_page_side_image(Widget* page) {
2336 return gtk_assistant_get_page_side_image(&this, page);
2339 // Gets the title for @page.
2340 // RETURNS: the title for @page.
2341 // <page>: a page of @assistant
2342 char* get_page_title(Widget* page) {
2343 return gtk_assistant_get_page_title(&this, page);
2346 // Gets the page type of @page.
2347 // RETURNS: the page type of @page.
2348 // <page>: a page of @assistant
2349 AssistantPageType get_page_type(Widget* page) {
2350 return gtk_assistant_get_page_type(&this, page);
2353 // Inserts a page in the @assistant at a given position.
2354 // RETURNS: the index (starting from 0) of the inserted page
2355 // <page>: a #GtkWidget
2356 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page to the @assistant
2357 int insert_page(Widget* page, int position) {
2358 return gtk_assistant_insert_page(&this, page, position);
2361 // Prepends a page to the @assistant.
2362 // RETURNS: the index (starting at 0) of the inserted page
2363 // <page>: a #GtkWidget
2364 int prepend_page(Widget* page) {
2365 return gtk_assistant_prepend_page(&this, page);
2368 // Removes a widget from the action area of a #GtkAssistant.
2369 // <child>: a #GtkWidget
2370 void remove_action_widget(Widget* child) {
2371 gtk_assistant_remove_action_widget(&this, child);
2374 // Switches the page to @page_num. Note that this will only be necessary
2375 // in custom buttons, as the @assistant flow can be set with
2376 // gtk_assistant_set_forward_page_func().
2377 // <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.
2378 void set_current_page(int page_num) {
2379 gtk_assistant_set_current_page(&this, page_num);
2382 // Sets the page forwarding function to be @page_func, this function will
2383 // be used to determine what will be the next page when the user presses
2384 // the forward button. Setting @page_func to %NULL will make the assistant
2385 // to use the default forward function, which just goes to the next visible
2386 // page.
2387 // <page_func>: the #GtkAssistantPageFunc, or %NULL to use the default one
2388 // <data>: user data for @page_func
2389 // <destroy>: destroy notifier for @data
2390 void set_forward_page_func(AssistantPageFunc page_func, void* data, GLib2.DestroyNotify destroy) {
2391 gtk_assistant_set_forward_page_func(&this, page_func, data, destroy);
2394 // Sets whether @page contents are complete. This will make
2395 // <page>: a page of @assistant
2396 // <complete>: the completeness status of the page
2397 void set_page_complete(Widget* page, int complete) {
2398 gtk_assistant_set_page_complete(&this, page, complete);
2401 // Sets a header image for @page. This image is displayed in the header
2402 // area of the assistant when @page is the current page.
2403 // <page>: a page of @assistant
2404 // <pixbuf>: the new header image @page
2405 void set_page_header_image(Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null) {
2406 gtk_assistant_set_page_header_image(&this, page, pixbuf);
2409 // Sets a header image for @page. This image is displayed in the side
2410 // area of the assistant when @page is the current page.
2411 // <page>: a page of @assistant
2412 // <pixbuf>: the new header image @page
2413 void set_page_side_image(Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null) {
2414 gtk_assistant_set_page_side_image(&this, page, pixbuf);
2417 // Sets a title for @page. The title is displayed in the header
2418 // area of the assistant when @page is the current page.
2419 // <page>: a page of @assistant
2420 // <title>: the new title for @page
2421 void set_page_title(Widget* page, char* title) {
2422 gtk_assistant_set_page_title(&this, page, title);
2425 // Sets the page type for @page. The page type determines the page
2426 // behavior in the @assistant.
2427 // <page>: a page of @assistant
2428 // <type>: the new type for @page
2429 void set_page_type(Widget* page, AssistantPageType type) {
2430 gtk_assistant_set_page_type(&this, page, type);
2433 // Forces @assistant to recompute the buttons state.
2434 // GTK+ automatically takes care of this in most situations,
2435 // e.g. when the user goes to a different page, or when the
2436 // visibility or completeness of a page changes.
2437 // One situation where it can be necessary to call this
2438 // function is when changing a value on the current page
2439 // affects the future page flow of the assistant.
2440 void update_buttons_state() {
2441 gtk_assistant_update_buttons_state(&this);
2444 // The ::apply signal is emitted when the apply button is clicked. The default
2445 // behavior of the #GtkAssistant is to switch to the page after the current
2446 // page, unless the current page is the last one.
2447 // A handler for the ::apply signal should carry out the actions for which
2448 // the wizard has collected data. If the action takes a long time to complete,
2449 // you might consider putting a page of type %GTK_ASSISTANT_PAGE_PROGRESS
2450 // after the confirmation page and handle this operation within the
2451 // #GtkAssistant::prepare signal of the progress page.
2452 extern (C) alias static void function (Assistant* this_, void* user_data=null) signal_apply;
2454 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2455 return super_.signal_connect!name(cb, data, cf);
2458 ulong signal_connect(string name:"apply", CB/*:signal_apply*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2459 return signal_connect_data(&this, cast(char*)"apply",
2460 cast(GObject2.Callback)cb, data, null, cf);
2462 // The ::cancel signal is emitted when then the cancel button is clicked.
2463 extern (C) alias static void function (Assistant* this_, void* user_data=null) signal_cancel;
2464 ulong signal_connect(string name:"cancel", CB/*:signal_cancel*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2465 return signal_connect_data(&this, cast(char*)"cancel",
2466 cast(GObject2.Callback)cb, data, null, cf);
2469 // The ::close signal is emitted either when the close button of
2470 // a summary page is clicked, or when the apply button in the last
2471 // page in the flow (of type %GTK_ASSISTANT_PAGE_CONFIRM) is clicked.
2472 extern (C) alias static void function (Assistant* this_, void* user_data=null) signal_close;
2473 ulong signal_connect(string name:"close", CB/*:signal_close*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2474 return signal_connect_data(&this, cast(char*)"close",
2475 cast(GObject2.Callback)cb, data, null, cf);
2478 // The ::prepare signal is emitted when a new page is set as the assistant's
2479 // current page, before making the new page visible. A handler for this signal
2480 // can do any preparation which are necessary before showing @page.
2481 // <page>: the current page
2482 extern (C) alias static void function (Assistant* this_, Widget* page, void* user_data=null) signal_prepare;
2483 ulong signal_connect(string name:"prepare", CB/*:signal_prepare*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2484 return signal_connect_data(&this, cast(char*)"prepare",
2485 cast(GObject2.Callback)cb, data, null, cf);
2489 struct AssistantClass {
2490 WindowClass parent_class;
2491 extern (C) void function (Assistant* assistant, Widget* page) prepare;
2492 extern (C) void function (Assistant* assistant) apply;
2493 extern (C) void function (Assistant* assistant) close;
2494 extern (C) void function (Assistant* assistant) cancel;
2495 extern (C) void function () _gtk_reserved1;
2496 extern (C) void function () _gtk_reserved2;
2497 extern (C) void function () _gtk_reserved3;
2498 extern (C) void function () _gtk_reserved4;
2499 extern (C) void function () _gtk_reserved5;
2503 // A function used by gtk_assistant_set_forward_page_func() to know which
2504 // is the next page given a current one. It's called both for computing the
2505 // next page when the user presses the "forward" button and for handling
2506 // the behavior of the "last" button.
2507 // RETURNS: The next page number.
2508 // <current_page>: The page number used to calculate the next page.
2509 // <data>: user data.
2510 extern (C) alias int function (int current_page, void* data) AssistantPageFunc;
2513 // An enum for determining the page role inside the #GtkAssistant. It's
2514 // used to handle buttons sensitivity and visibility.
2515 // Note that an assistant needs to end its page flow with a page of type
2516 // %GTK_ASSISTANT_PAGE_CONFIRM, %GTK_ASSISTANT_PAGE_SUMMARY or
2517 // %GTK_ASSISTANT_PAGE_PROGRESS to be correct.
2518 enum AssistantPageType {
2519 CONTENT = 0,
2520 INTRO = 1,
2521 CONFIRM = 2,
2522 SUMMARY = 3,
2523 PROGRESS = 4
2525 struct AssistantPrivate {
2528 enum AttachOptions {
2529 EXPAND = 1,
2530 SHRINK = 2,
2531 FILL = 4
2533 enum int BINARY_AGE = 2408;
2534 enum int BUTTONBOX_DEFAULT = -1;
2536 // The #GtkBin widget is a container with just one child.
2537 // It is not very useful itself, but it is useful for deriving subclasses,
2538 // since it provides common code needed for handling a single child widget.
2539 // Many GTK+ widgets are subclasses of #GtkBin, including #GtkWindow,
2540 // #GtkButton, #GtkFrame, #GtkHandleBox or #GtkScrolledWindow.
2541 struct Bin /* : Container */ {
2542 alias container this;
2543 alias container super_;
2544 Container container;
2545 Widget* child;
2548 // Gets the child of the #GtkBin, or %NULL if the bin contains
2549 // no child widget. The returned widget does not have a reference
2550 // added, so you do not need to unref it.
2551 // RETURNS: pointer to child of the #GtkBin
2552 Widget* get_child() {
2553 return gtk_bin_get_child(&this);
2557 struct BinClass {
2558 ContainerClass parent_class;
2561 struct BindingArg {
2562 Type arg_type;
2564 union d {
2565 c_long long_data;
2566 double double_data;
2567 char* string_data;
2571 struct BindingEntry {
2572 uint keyval;
2573 Gdk2.ModifierType modifiers;
2574 BindingSet* binding_set;
2575 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2576 uint, "destroyed", 1,
2577 uint, "in_emission", 1,
2578 uint, "marks_unbound", 1,
2579 uint, "__dummy32A", 29));
2580 BindingEntry* set_next, hash_next;
2581 BindingSignal* signals;
2584 struct BindingSet {
2585 char* set_name;
2586 int priority;
2587 GLib2.SList* widget_path_pspecs, widget_class_pspecs, class_branch_pspecs;
2588 BindingEntry* entries, current;
2589 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2590 uint, "parsed", 1,
2591 uint, "__dummy32A", 31));
2594 // Find a key binding matching @keyval and @modifiers within
2595 // RETURNS: %TRUE if a binding was found and activated
2596 // <keyval>: key value of the binding
2597 // <modifiers>: key modifier of the binding
2598 // <object>: object to activate when binding found
2599 int activate(uint keyval, Gdk2.ModifierType modifiers, Object* object) {
2600 return gtk_binding_set_activate(&this, keyval, modifiers, object);
2603 // This function is used internally by the GtkRC parsing mechanism to
2604 // assign match patterns to #GtkBindingSet structures.
2605 // <path_type>: path type the pattern applies to
2606 // <path_pattern>: the actual match pattern
2607 // <priority>: binding priority
2608 void add_path(PathType path_type, char* path_pattern, PathPriorityType priority) {
2609 gtk_binding_set_add_path(&this, path_type, path_pattern, priority);
2613 struct BindingSignal {
2614 BindingSignal* next;
2615 char* signal_name;
2616 uint n_args;
2617 BindingArg* args;
2620 struct Border {
2621 int left, right, top, bottom;
2624 // Allocates a new #GtkBorder structure and initializes its elements to zero.
2625 // freed with gtk_border_free()
2626 // RETURNS: a new empty #GtkBorder. The newly allocated #GtkBorder should be
2627 static Border* /*new*/ new_() {
2628 return gtk_border_new();
2631 // Copies a #GtkBorder structure.
2632 // RETURNS: a copy of @border_.
2633 Border* /*new*/ copy() {
2634 return gtk_border_copy(&this);
2636 // Frees a #GtkBorder structure.
2637 void free() {
2638 gtk_border_free(&this);
2642 struct Box /* : Container */ {
2643 alias container this;
2644 alias container super_;
2645 Container container;
2646 GLib2.List* children;
2647 short spacing;
2648 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2649 uint, "homogeneous", 1,
2650 uint, "__dummy32A", 31));
2653 // Returns whether the box is homogeneous (all children are the
2654 // same size). See gtk_box_set_homogeneous().
2655 // RETURNS: %TRUE if the box is homogeneous.
2656 int get_homogeneous() {
2657 return gtk_box_get_homogeneous(&this);
2660 // Gets the value set by gtk_box_set_spacing().
2661 // RETURNS: spacing between children
2662 int get_spacing() {
2663 return gtk_box_get_spacing(&this);
2666 // Adds @child to @box, packed with reference to the end of @box.
2667 // The @child is packed after (away from end of) any other child
2668 // packed with reference to the end of @box.
2669 // <child>: the #GtkWidget to be added to @box
2670 // <expand>: %TRUE if the new child is to be given extra space allocated to @box. The extra space will be divided evenly between all children of @box that use this option
2671 // <fill>: %TRUE if space given to @child by the @expand option is actually allocated to @child, rather than just padding it. This parameter has no effect if @expand is set to %FALSE. A child is always allocated the full height of a #GtkHBox and the full width of a #GtkVBox. This option affects the other dimension
2672 // <padding>: extra space in pixels to put between this child and its neighbors, over and above the global amount specified by #GtkBox:spacing property. If @child is a widget at one of the reference ends of @box, then @padding pixels are also put between
2673 void pack_end(Widget* child, int expand, int fill, uint padding) {
2674 gtk_box_pack_end(&this, child, expand, fill, padding);
2677 // Adds @widget to @box, packed with reference to the end of @box.
2678 // The child is packed after any other child packed with reference
2679 // to the start of @box.
2680 // Parameters for how to pack the child @widget, #GtkBox:expand,
2681 // #GtkBox:fill and #GtkBox:padding, are given their default
2682 // values, %TRUE, %TRUE, and 0, respectively.
2683 // <widget>: the #GtkWidget to be added to @box
2684 void pack_end_defaults(Widget* widget) {
2685 gtk_box_pack_end_defaults(&this, widget);
2688 // Adds @child to @box, packed with reference to the start of @box.
2689 // The @child is packed after any other child packed with reference
2690 // to the start of @box.
2691 // <child>: the #GtkWidget to be added to @box
2692 // <expand>: %TRUE if the new child is to be given extra space allocated to
2693 // <fill>: %TRUE if space given to @child by the @expand option is actually allocated to @child, rather than just padding it. This parameter has no effect if @expand is set to %FALSE. A child is always allocated the full height of a #GtkHBox and the full width of a #GtkVBox. This option affects the other dimension
2694 // <padding>: extra space in pixels to put between this child and its neighbors, over and above the global amount specified by #GtkBox:spacing property. If @child is a widget at one of the reference ends of @box, then @padding pixels are also put between
2695 void pack_start(Widget* child, int expand, int fill, uint padding) {
2696 gtk_box_pack_start(&this, child, expand, fill, padding);
2699 // Adds @widget to @box, packed with reference to the start of @box.
2700 // The child is packed after any other child packed with reference
2701 // to the start of @box.
2702 // Parameters for how to pack the child @widget, #GtkBox:expand,
2703 // #GtkBox:fill and #GtkBox:padding, are given their default
2704 // values, %TRUE, %TRUE, and 0, respectively.
2705 // <widget>: the #GtkWidget to be added to @box
2706 void pack_start_defaults(Widget* widget) {
2707 gtk_box_pack_start_defaults(&this, widget);
2710 // Obtains information about how @child is packed into @box.
2711 // <child>: the #GtkWidget of the child to query
2712 // <expand>: pointer to return location for #GtkBox:expand child property
2713 // <fill>: pointer to return location for #GtkBox:fill child property
2714 // <padding>: pointer to return location for #GtkBox:padding child property
2715 // <pack_type>: pointer to return location for #GtkBox:pack-type child property
2716 void query_child_packing(Widget* child, int* expand, int* fill, uint* padding, PackType* pack_type) {
2717 gtk_box_query_child_packing(&this, child, expand, fill, padding, pack_type);
2720 // Moves @child to a new @position in the list of @box children.
2721 // The list is the <structfield>children</structfield> field of
2722 // #GtkBox-struct, and contains both widgets packed #GTK_PACK_START
2723 // as well as widgets packed #GTK_PACK_END, in the order that these
2724 // widgets were added to @box.
2725 // A widget's position in the @box children list determines where
2726 // the widget is packed into @box. A child widget at some position
2727 // in the list will be packed just after all other widgets of the
2728 // same packing type that appear earlier in the list.
2729 // <child>: the #GtkWidget to move
2730 // <position>: the new position for @child in the list of children of @box, starting from 0. If negative, indicates the end of the list
2731 void reorder_child(Widget* child, int position) {
2732 gtk_box_reorder_child(&this, child, position);
2735 // Sets the way @child is packed into @box.
2736 // <child>: the #GtkWidget of the child to set
2737 // <expand>: the new value of the #GtkBox:expand child property
2738 // <fill>: the new value of the #GtkBox:fill child property
2739 // <padding>: the new value of the #GtkBox:padding child property
2740 // <pack_type>: the new value of the #GtkBox:pack-type child property
2741 void set_child_packing(Widget* child, int expand, int fill, uint padding, PackType pack_type) {
2742 gtk_box_set_child_packing(&this, child, expand, fill, padding, pack_type);
2745 // Sets the #GtkBox:homogeneous property of @box, controlling
2746 // whether or not all children of @box are given equal space
2747 // in the box.
2748 // <homogeneous>: a boolean value, %TRUE to create equal allotments, %FALSE for variable allotments
2749 void set_homogeneous(int homogeneous) {
2750 gtk_box_set_homogeneous(&this, homogeneous);
2753 // Sets the #GtkBox:spacing property of @box, which is the
2754 // number of pixels to place between children of @box.
2755 // <spacing>: the number of pixels to put between children
2756 void set_spacing(int spacing) {
2757 gtk_box_set_spacing(&this, spacing);
2762 // The #GtkBoxChild holds a child widget of #GtkBox and describes how the child
2763 // is to be packed into the #GtkBox. All fields of this #GtkBoxChild should be
2764 // considered read-only and they should never be set directly by an application.
2765 // Use gtk_box_query_child_packing() and gtk_box_set_child_packing() to query
2766 // and set the #GtkBoxChild.padding, #GtkBoxChild.expand, #GtkBoxChild.fill and
2767 // #GtkBoxChild.pack fields.
2768 struct BoxChild {
2769 Widget* widget;
2770 ushort padding;
2771 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2772 uint, "expand", 1,
2773 uint, "fill", 1,
2774 uint, "pack", 1,
2775 uint, "is_secondary", 1,
2776 uint, "__dummy32A", 28));
2779 struct BoxClass {
2780 ContainerClass parent_class;
2784 // In order to allow construction from a <link linkend="BUILDER-UI">GtkBuilder
2785 // UI description</link>, an object class must implement the
2786 // GtkBuildable interface. The interface includes methods for setting
2787 // names and properties of objects, parsing custom tags, constructing
2788 // child objects.
2789 // The GtkBuildable interface is implemented by all widgets and
2790 // many of the non-widget objects that are provided by GTK+. The
2791 // main user of this interface is #GtkBuilder, there should be
2792 // very little need for applications to call any
2793 // <function>gtk_buildable_...</function> functions.
2794 struct Buildable {
2796 // Adds a child to @buildable. @type is an optional string
2797 // describing how the child should be added.
2798 // <builder>: a #GtkBuilder
2799 // <child>: child to add
2800 // <type>: kind of child or %NULL
2801 void add_child(Builder* builder, GObject2.Object* child, char* type=null) {
2802 gtk_buildable_add_child(&this, builder, child, type);
2805 // Constructs a child of @buildable with the name @name.
2806 // #GtkBuilder calls this function if a "constructor" has been
2807 // specified in the UI definition.
2808 // RETURNS: the constructed child
2809 // <builder>: #GtkBuilder used to construct this object
2810 // <name>: name of child to construct
2811 GObject2.Object* /*new*/ construct_child(Builder* builder, char* name) {
2812 return gtk_buildable_construct_child(&this, builder, name);
2815 // This is similar to gtk_buildable_parser_finished() but is
2816 // called once for each custom tag handled by the @buildable.
2817 // <builder>: a #GtkBuilder
2818 // <child>: child object or %NULL for non-child tags
2819 // <tagname>: the name of the tag
2820 // <data>: user data created in custom_tag_start
2821 void custom_finished(Builder* builder, GObject2.Object* child, char* tagname, void* data) {
2822 gtk_buildable_custom_finished(&this, builder, child, tagname, data);
2825 // This is called at the end of each custom element handled by
2826 // the buildable.
2827 // <builder>: #GtkBuilder used to construct this object
2828 // <child>: child object or %NULL for non-child tags
2829 // <tagname>: name of tag
2830 // <data>: user data that will be passed in to parser functions
2831 void custom_tag_end(Builder* builder, GObject2.Object* child, char* tagname, void* data) {
2832 gtk_buildable_custom_tag_end(&this, builder, child, tagname, data);
2835 // This is called for each unknown element under &lt;child&gt;.
2836 // if it doesn't.
2837 // RETURNS: %TRUE if a object has a custom implementation, %FALSE
2838 // <builder>: a #GtkBuilder used to construct this object
2839 // <child>: child object or %NULL for non-child tags
2840 // <tagname>: name of tag
2841 // <parser>: a #GMarkupParser structure to fill in
2842 // <data>: return location for user data that will be passed in to parser functions
2843 int custom_tag_start(Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data) {
2844 return gtk_buildable_custom_tag_start(&this, builder, child, tagname, parser, data);
2847 // Get the internal child called @childname of the @buildable object.
2848 // RETURNS: the internal child of the buildable object
2849 // <builder>: a #GtkBuilder
2850 // <childname>: name of child
2851 GObject2.Object* get_internal_child(Builder* builder, char* childname) {
2852 return gtk_buildable_get_internal_child(&this, builder, childname);
2855 // Gets the name of the @buildable object.
2856 // #GtkBuilder sets the name based on the the
2857 // <link linkend="BUILDER-UI">GtkBuilder UI definition</link>
2858 // used to construct the @buildable.
2859 // RETURNS: the name set with gtk_buildable_set_name()
2860 char* get_name() {
2861 return gtk_buildable_get_name(&this);
2864 // Called when the builder finishes the parsing of a
2865 // <link linkend="BUILDER-UI">GtkBuilder UI definition</link>.
2866 // Note that this will be called once for each time
2867 // gtk_builder_add_from_file() or gtk_builder_add_from_string()
2868 // is called on a builder.
2869 // <builder>: a #GtkBuilder
2870 void parser_finished(Builder* builder) {
2871 gtk_buildable_parser_finished(&this, builder);
2874 // Sets the property name @name to @value on the @buildable object.
2875 // <builder>: a #GtkBuilder
2876 // <name>: name of property
2877 // <value>: value of property
2878 void set_buildable_property(Builder* builder, char* name, GObject2.Value* value) {
2879 gtk_buildable_set_buildable_property(&this, builder, name, value);
2882 // Sets the name of the @buildable object.
2883 // <name>: name to set
2884 void set_name(char* name) {
2885 gtk_buildable_set_name(&this, name);
2890 // The GtkBuildableIface interface contains method that are
2891 // necessary to allow #GtkBuilder to construct an object from
2892 // a GtkBuilder UI definition.
2893 struct BuildableIface {
2894 GObject2.TypeInterface g_iface;
2895 // <name>: name to set
2896 extern (C) void function (Buildable* buildable, char* name) set_name;
2897 // RETURNS: the name set with gtk_buildable_set_name()
2898 extern (C) char* function (Buildable* buildable) get_name;
2900 // <builder>: a #GtkBuilder
2901 // <child>: child to add
2902 // <type>: kind of child or %NULL
2903 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* type=null) add_child;
2905 // <builder>: a #GtkBuilder
2906 // <name>: name of property
2907 // <value>: value of property
2908 extern (C) void function (Buildable* buildable, Builder* builder, char* name, GObject2.Value* value) set_buildable_property;
2910 // RETURNS: the constructed child
2911 // <builder>: #GtkBuilder used to construct this object
2912 // <name>: name of child to construct
2913 extern (C) GObject2.Object* /*new*/ function (Buildable* buildable, Builder* builder, char* name) construct_child;
2915 // RETURNS: %TRUE if a object has a custom implementation, %FALSE
2916 // <builder>: a #GtkBuilder used to construct this object
2917 // <child>: child object or %NULL for non-child tags
2918 // <tagname>: name of tag
2919 // <parser>: a #GMarkupParser structure to fill in
2920 // <data>: return location for user data that will be passed in to parser functions
2921 extern (C) int function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data) custom_tag_start;
2923 // <builder>: #GtkBuilder used to construct this object
2924 // <child>: child object or %NULL for non-child tags
2925 // <tagname>: name of tag
2926 // <data>: user data that will be passed in to parser functions
2927 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, void* data) custom_tag_end;
2929 // <builder>: a #GtkBuilder
2930 // <child>: child object or %NULL for non-child tags
2931 // <tagname>: the name of the tag
2932 // <data>: user data created in custom_tag_start
2933 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, void* data) custom_finished;
2934 // <builder>: a #GtkBuilder
2935 extern (C) void function (Buildable* buildable, Builder* builder) parser_finished;
2937 // RETURNS: the internal child of the buildable object
2938 // <builder>: a #GtkBuilder
2939 // <childname>: name of child
2940 extern (C) GObject2.Object* function (Buildable* buildable, Builder* builder, char* childname) get_internal_child;
2943 struct Builder /* : GObject.Object */ {
2944 alias parent_instance this;
2945 alias parent_instance super_;
2946 alias parent_instance object;
2947 GObject2.Object parent_instance;
2948 BuilderPrivate* priv;
2951 // Creates a new builder object.
2952 // RETURNS: a new #GtkBuilder object
2953 static Builder* /*new*/ new_() {
2954 return gtk_builder_new();
2957 // Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder
2958 // UI definition</link> and merges it with the current contents of @builder.
2959 // Upon errors 0 will be returned and @error will be assigned a
2960 // #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR
2961 // domain.
2962 // RETURNS: A positive value on success, 0 if an error occurred
2963 // <filename>: the name of the file to parse
2964 uint add_from_file(char* filename, GLib2.Error** error=null) {
2965 return gtk_builder_add_from_file(&this, filename, error);
2968 // Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
2969 // UI definition</link> and merges it with the current contents of @builder.
2970 // Upon errors 0 will be returned and @error will be assigned a
2971 // #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
2972 // RETURNS: A positive value on success, 0 if an error occurred
2973 // <buffer>: the string to parse
2974 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
2975 uint add_from_string(char* buffer, size_t length, GLib2.Error** error=null) {
2976 return gtk_builder_add_from_string(&this, buffer, length, error);
2979 // Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder
2980 // UI definition</link> building only the requested objects and merges
2981 // them with the current contents of @builder.
2982 // Upon errors 0 will be returned and @error will be assigned a
2983 // #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR
2984 // domain.
2985 // <note><para>
2986 // If you are adding an object that depends on an object that is not
2987 // its child (for instance a #GtkTreeView that depends on its
2988 // #GtkTreeModel), you have to explicitely list all of them in @object_ids.
2989 // </para></note>
2990 // RETURNS: A positive value on success, 0 if an error occurred
2991 // <filename>: the name of the file to parse
2992 // <object_ids>: nul-terminated array of objects to build
2993 uint add_objects_from_file(char* filename, char** object_ids, GLib2.Error** error=null) {
2994 return gtk_builder_add_objects_from_file(&this, filename, object_ids, error);
2997 // Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
2998 // UI definition</link> building only the requested objects and merges
2999 // them with the current contents of @builder.
3000 // Upon errors 0 will be returned and @error will be assigned a
3001 // #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
3002 // <note><para>
3003 // If you are adding an object that depends on an object that is not
3004 // its child (for instance a #GtkTreeView that depends on its
3005 // #GtkTreeModel), you have to explicitely list all of them in @object_ids.
3006 // </para></note>
3007 // RETURNS: A positive value on success, 0 if an error occurred
3008 // <buffer>: the string to parse
3009 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
3010 // <object_ids>: nul-terminated array of objects to build
3011 uint add_objects_from_string(char* buffer, size_t length, char** object_ids, GLib2.Error** error=null) {
3012 return gtk_builder_add_objects_from_string(&this, buffer, length, object_ids, error);
3015 // This method is a simpler variation of gtk_builder_connect_signals_full().
3016 // It uses #GModule's introspective features (by opening the module %NULL)
3017 // to look at the application's symbol table. From here it tries to match
3018 // the signal handler names given in the interface description with
3019 // symbols in the application and connects the signals.
3020 // Note that this function will not work correctly if #GModule is not
3021 // supported on the platform.
3022 // When compiling applications for Windows, you must declare signal callbacks
3023 // with #G_MODULE_EXPORT, or they will not be put in the symbol table.
3024 // On Linux and Unices, this is not necessary; applications should instead
3025 // be compiled with the -Wl,--export-dynamic CFLAGS, and linked against
3026 // gmodule-export-2.0.
3027 // <user_data>: a pointer to a structure sent in as user data to all signals
3028 void connect_signals(void* user_data) {
3029 gtk_builder_connect_signals(&this, user_data);
3032 // This function can be thought of the interpreted language binding
3033 // version of gtk_builder_connect_signals(), except that it does not
3034 // require GModule to function correctly.
3035 // <func>: the function used to connect the signals
3036 // <user_data>: arbitrary data that will be passed to the connection function
3037 void connect_signals_full(BuilderConnectFunc func, void* user_data) {
3038 gtk_builder_connect_signals_full(&this, func, user_data);
3041 // Gets the object named @name. Note that this function does not
3042 // increment the reference count of the returned object.
3043 // it could not be found in the object tree.
3044 // RETURNS: the object named @name or %NULL if
3045 // <name>: name of object to get
3046 GObject2.Object* get_object(char* name) {
3047 return gtk_builder_get_object(&this, name);
3050 // Gets all objects that have been constructed by @builder. Note that
3051 // this function does not increment the reference counts of the returned
3052 // objects.
3053 // constructed by the #GtkBuilder instance. It should be freed by
3054 // g_slist_free()
3055 // RETURNS: a newly-allocated #GSList containing all the objects
3056 GLib2.SList* /*new container*/ get_objects() {
3057 return gtk_builder_get_objects(&this);
3060 // Gets the translation domain of @builder.
3061 // by the builder object and must not be modified or freed.
3062 // RETURNS: the translation domain. This string is owned
3063 char* get_translation_domain() {
3064 return gtk_builder_get_translation_domain(&this);
3067 // Looks up a type by name, using the virtual function that
3068 // #GtkBuilder has for that purpose. This is mainly used when
3069 // implementing the #GtkBuildable interface on a type.
3070 // if no type was found
3071 // RETURNS: the #GType found for @type_name or #G_TYPE_INVALID
3072 // <type_name>: type name to lookup
3073 Type get_type_from_name(char* type_name) {
3074 return gtk_builder_get_type_from_name(&this, type_name);
3077 // Sets the translation domain of @builder.
3078 // See #GtkBuilder:translation-domain.
3079 // <domain>: the translation domain or %NULL
3080 void set_translation_domain(char* domain=null) {
3081 gtk_builder_set_translation_domain(&this, domain);
3084 // This function demarshals a value from a string. This function
3085 // calls g_value_init() on the @value argument, so it need not be
3086 // initialised beforehand.
3087 // This function can handle char, uchar, boolean, int, uint, long,
3088 // ulong, enum, flags, float, double, string, #GdkColor and
3089 // #GtkAdjustment type values. Support for #GtkWidget type values is
3090 // still to come.
3091 // Upon errors %FALSE will be returned and @error will be assigned a
3092 // #GError from the #GTK_BUILDER_ERROR domain.
3093 // RETURNS: %TRUE on success
3094 // <pspec>: the #GParamSpec for the property
3095 // <string>: the string representation of the value
3096 // <value>: the #GValue to store the result in
3097 int value_from_string(GObject2.ParamSpec* pspec, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error=null) {
3098 return gtk_builder_value_from_string(&this, pspec, string_, value, error);
3101 // Like gtk_builder_value_from_string(), this function demarshals
3102 // a value from a string, but takes a #GType instead of #GParamSpec.
3103 // This function calls g_value_init() on the @value argument, so it
3104 // need not be initialised beforehand.
3105 // Upon errors %FALSE will be returned and @error will be assigned a
3106 // #GError from the #GTK_BUILDER_ERROR domain.
3107 // RETURNS: %TRUE on success
3108 // <type>: the #GType of the value
3109 // <string>: the string representation of the value
3110 // <value>: the #GValue to store the result in
3111 int value_from_string_type(Type type, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error=null) {
3112 return gtk_builder_value_from_string_type(&this, type, string_, value, error);
3116 struct BuilderClass {
3117 GObject2.ObjectClass parent_class;
3119 // RETURNS: the #GType found for @type_name or #G_TYPE_INVALID
3120 // <type_name>: type name to lookup
3121 extern (C) Type function (Builder* builder, char* type_name) get_type_from_name;
3122 extern (C) void function () _gtk_reserved1;
3123 extern (C) void function () _gtk_reserved2;
3124 extern (C) void function () _gtk_reserved3;
3125 extern (C) void function () _gtk_reserved4;
3126 extern (C) void function () _gtk_reserved5;
3127 extern (C) void function () _gtk_reserved6;
3128 extern (C) void function () _gtk_reserved7;
3129 extern (C) void function () _gtk_reserved8;
3133 // This is the signature of a function used to connect signals. It is used
3134 // by the gtk_builder_connect_signals() and gtk_builder_connect_signals_full()
3135 // methods. It is mainly intended for interpreted language bindings, but
3136 // could be useful where the programmer wants more control over the signal
3137 // connection process.
3138 // <builder>: a #GtkBuilder
3139 // <object>: object to connect a signal to
3140 // <signal_name>: name of the signal
3141 // <handler_name>: name of the handler
3142 // <connect_object>: a #GObject, if non-%NULL, use g_signal_connect_object()
3143 // <flags>: #GConnectFlags to use
3144 // <user_data>: user data
3145 extern (C) alias void function (Builder* builder, GObject2.Object* object, char* signal_name, char* handler_name, GObject2.Object* connect_object, GObject2.ConnectFlags flags, void* user_data) BuilderConnectFunc;
3147 enum BuilderError {
3148 INVALID_TYPE_FUNCTION = 0,
3149 UNHANDLED_TAG = 1,
3150 MISSING_ATTRIBUTE = 2,
3151 INVALID_ATTRIBUTE = 3,
3152 INVALID_TAG = 4,
3153 MISSING_PROPERTY_VALUE = 5,
3154 INVALID_VALUE = 6,
3155 VERSION_MISMATCH = 7,
3156 DUPLICATE_ID = 8
3158 struct BuilderPrivate {
3161 struct Button /* : Bin */ {
3162 alias bin this;
3163 alias bin super_;
3164 Bin bin;
3165 Gdk2.Window* event_window;
3166 char* label_text;
3167 uint activate_timeout;
3168 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3169 uint, "constructed", 1,
3170 uint, "in_button", 1,
3171 uint, "button_down", 1,
3172 uint, "relief", 2,
3173 uint, "use_underline", 1,
3174 uint, "use_stock", 1,
3175 uint, "depressed", 1,
3176 uint, "depress_on_activate", 1,
3177 uint, "focus_on_click", 1,
3178 uint, "__dummy32A", 22));
3180 static Button* new_() {
3181 return gtk_button_new();
3184 // Creates a new #GtkButton containing the image and text from a stock item.
3185 // Some stock ids have preprocessor macros like #GTK_STOCK_OK and
3186 // #GTK_STOCK_APPLY.
3187 // If @stock_id is unknown, then it will be treated as a mnemonic
3188 // label (as for gtk_button_new_with_mnemonic()).
3189 // RETURNS: a new #GtkButton
3190 // <stock_id>: the name of the stock item
3191 static Button* new_from_stock(char* stock_id) {
3192 return gtk_button_new_from_stock(stock_id);
3194 static Button* new_with_label(char* label) {
3195 return gtk_button_new_with_label(label);
3198 // Creates a new #GtkButton containing a label.
3199 // If characters in @label are preceded by an underscore, they are underlined.
3200 // If you need a literal underscore character in a label, use '__' (two
3201 // underscores). The first underlined character represents a keyboard
3202 // accelerator called a mnemonic.
3203 // Pressing Alt and that key activates the button.
3204 // RETURNS: a new #GtkButton
3205 // <label>: The text of the button, with an underscore in front of the mnemonic character
3206 static Button* new_with_mnemonic(char* label) {
3207 return gtk_button_new_with_mnemonic(label);
3209 void clicked() {
3210 gtk_button_clicked(&this);
3212 void enter() {
3213 gtk_button_enter(&this);
3216 // Gets the alignment of the child in the button.
3217 // <xalign>: return location for horizontal alignment
3218 // <yalign>: return location for vertical alignment
3219 void get_alignment(/*out*/ float* xalign, /*out*/ float* yalign) {
3220 gtk_button_get_alignment(&this, xalign, yalign);
3223 // Returns the button's event window if it is realized, %NULL otherwise.
3224 // This function should be rarely needed.
3225 // RETURNS: @button's event window.
3226 Gdk2.Window* get_event_window() {
3227 return gtk_button_get_event_window(&this);
3230 // Returns whether the button grabs focus when it is clicked with the mouse.
3231 // See gtk_button_set_focus_on_click().
3232 // the mouse.
3233 // RETURNS: %TRUE if the button grabs focus when it is clicked with
3234 int get_focus_on_click() {
3235 return gtk_button_get_focus_on_click(&this);
3238 // Gets the widget that is currenty set as the image of @button.
3239 // This may have been explicitly set by gtk_button_set_image()
3240 // or constructed by gtk_button_new_from_stock().
3241 // RETURNS: a #GtkWidget or %NULL in case there is no image
3242 Widget* get_image() {
3243 return gtk_button_get_image(&this);
3246 // Gets the position of the image relative to the text
3247 // inside the button.
3248 // RETURNS: the position
3249 PositionType get_image_position() {
3250 return gtk_button_get_image_position(&this);
3253 // Fetches the text from the label of the button, as set by
3254 // gtk_button_set_label(). If the label text has not
3255 // been set the return value will be %NULL. This will be the
3256 // case if you create an empty button with gtk_button_new() to
3257 // use as a container.
3258 // by the widget and must not be modified or freed.
3259 // RETURNS: The text of the label widget. This string is owned
3260 char* get_label() {
3261 return gtk_button_get_label(&this);
3263 ReliefStyle get_relief() {
3264 return gtk_button_get_relief(&this);
3267 // Returns whether the button label is a stock item.
3268 // select a stock item instead of being
3269 // used directly as the label text.
3270 // RETURNS: %TRUE if the button label is used to
3271 int get_use_stock() {
3272 return gtk_button_get_use_stock(&this);
3275 // Returns whether an embedded underline in the button label indicates a
3276 // mnemonic. See gtk_button_set_use_underline ().
3277 // indicates the mnemonic accelerator keys.
3278 // RETURNS: %TRUE if an embedded underline in the button label
3279 int get_use_underline() {
3280 return gtk_button_get_use_underline(&this);
3282 void leave() {
3283 gtk_button_leave(&this);
3285 void pressed() {
3286 gtk_button_pressed(&this);
3288 void released() {
3289 gtk_button_released(&this);
3292 // Sets the alignment of the child. This property has no effect unless
3293 // the child is a #GtkMisc or a #GtkAligment.
3294 // <xalign>: the horizontal position of the child, 0.0 is left aligned, 1.0 is right aligned
3295 // <yalign>: the vertical position of the child, 0.0 is top aligned, 1.0 is bottom aligned
3296 void set_alignment(float xalign, float yalign) {
3297 gtk_button_set_alignment(&this, xalign, yalign);
3300 // Sets whether the button will grab focus when it is clicked with the mouse.
3301 // Making mouse clicks not grab focus is useful in places like toolbars where
3302 // you don't want the keyboard focus removed from the main area of the
3303 // application.
3304 // <focus_on_click>: whether the button grabs focus when clicked with the mouse
3305 void set_focus_on_click(int focus_on_click) {
3306 gtk_button_set_focus_on_click(&this, focus_on_click);
3309 // Set the image of @button to the given widget. Note that
3310 // it depends on the #GtkSettings:gtk-button-images setting whether the
3311 // image will be displayed or not, you don't have to call
3312 // gtk_widget_show() on @image yourself.
3313 // <image>: a widget to set as the image for the button
3314 void set_image(Widget* image) {
3315 gtk_button_set_image(&this, image);
3318 // Sets the position of the image relative to the text
3319 // inside the button.
3320 // <position>: the position
3321 void set_image_position(PositionType position) {
3322 gtk_button_set_image_position(&this, position);
3325 // Sets the text of the label of the button to @str. This text is
3326 // also used to select the stock item if gtk_button_set_use_stock()
3327 // is used.
3328 // This will also clear any previously set labels.
3329 // <label>: a string
3330 void set_label(char* label) {
3331 gtk_button_set_label(&this, label);
3333 void set_relief(ReliefStyle newstyle) {
3334 gtk_button_set_relief(&this, newstyle);
3337 // If %TRUE, the label set on the button is used as a
3338 // stock id to select the stock item for the button.
3339 // <use_stock>: %TRUE if the button should use a stock item
3340 void set_use_stock(int use_stock) {
3341 gtk_button_set_use_stock(&this, use_stock);
3344 // If true, an underline in the text of the button label indicates
3345 // the next character should be used for the mnemonic accelerator key.
3346 // <use_underline>: %TRUE if underlines in the text indicate mnemonics
3347 void set_use_underline(int use_underline) {
3348 gtk_button_set_use_underline(&this, use_underline);
3351 // The ::activate signal on GtkButton is an action signal and
3352 // emitting it causes the button to animate press then release.
3353 // Applications should never connect to this signal, but use the
3354 // #GtkButton::clicked signal.
3355 extern (C) alias static void function (Button* this_, void* user_data=null) signal_activate;
3357 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3358 return super_.signal_connect!name(cb, data, cf);
3361 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3362 return signal_connect_data(&this, cast(char*)"activate",
3363 cast(GObject2.Callback)cb, data, null, cf);
3365 // Emitted when the button has been activated (pressed and released).
3366 extern (C) alias static void function (Button* this_, void* user_data=null) signal_clicked;
3367 ulong signal_connect(string name:"clicked", CB/*:signal_clicked*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3368 return signal_connect_data(&this, cast(char*)"clicked",
3369 cast(GObject2.Callback)cb, data, null, cf);
3371 // Emitted when the pointer enters the button.
3372 extern (C) alias static void function (Button* this_, void* user_data=null) signal_enter;
3373 ulong signal_connect(string name:"enter", CB/*:signal_enter*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3374 return signal_connect_data(&this, cast(char*)"enter",
3375 cast(GObject2.Callback)cb, data, null, cf);
3377 // Emitted when the pointer leaves the button.
3378 extern (C) alias static void function (Button* this_, void* user_data=null) signal_leave;
3379 ulong signal_connect(string name:"leave", CB/*:signal_leave*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3380 return signal_connect_data(&this, cast(char*)"leave",
3381 cast(GObject2.Callback)cb, data, null, cf);
3383 // Emitted when the button is pressed.
3384 extern (C) alias static void function (Button* this_, void* user_data=null) signal_pressed;
3385 ulong signal_connect(string name:"pressed", CB/*:signal_pressed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3386 return signal_connect_data(&this, cast(char*)"pressed",
3387 cast(GObject2.Callback)cb, data, null, cf);
3389 // Emitted when the button is released.
3390 extern (C) alias static void function (Button* this_, void* user_data=null) signal_released;
3391 ulong signal_connect(string name:"released", CB/*:signal_released*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3392 return signal_connect_data(&this, cast(char*)"released",
3393 cast(GObject2.Callback)cb, data, null, cf);
3397 enum ButtonAction {
3398 IGNORED = 0,
3399 SELECTS = 1,
3400 DRAGS = 2,
3401 EXPANDS = 4
3403 struct ButtonBox /* : Box */ {
3404 alias box this;
3405 alias box super_;
3406 Box box;
3407 int child_min_width, child_min_height, child_ipad_x, child_ipad_y;
3408 ButtonBoxStyle layout_style;
3410 void get_child_ipadding(int* ipad_x, int* ipad_y) {
3411 gtk_button_box_get_child_ipadding(&this, ipad_x, ipad_y);
3414 // Returns whether @child should appear in a secondary group of children.
3415 // RETURNS: whether @child should appear in a secondary group of children.
3416 // <child>: a child of @widget
3417 int get_child_secondary(Widget* child) {
3418 return gtk_button_box_get_child_secondary(&this, child);
3420 void get_child_size(int* min_width, int* min_height) {
3421 gtk_button_box_get_child_size(&this, min_width, min_height);
3423 ButtonBoxStyle get_layout() {
3424 return gtk_button_box_get_layout(&this);
3426 void set_child_ipadding(int ipad_x, int ipad_y) {
3427 gtk_button_box_set_child_ipadding(&this, ipad_x, ipad_y);
3430 // Sets whether @child should appear in a secondary group of children.
3431 // A typical use of a secondary child is the help button in a dialog.
3432 // This group appears after the other children if the style
3433 // is %GTK_BUTTONBOX_START, %GTK_BUTTONBOX_SPREAD or
3434 // %GTK_BUTTONBOX_EDGE, and before the other children if the style
3435 // is %GTK_BUTTONBOX_END. For horizontal button boxes, the definition
3436 // of before/after depends on direction of the widget (see
3437 // gtk_widget_set_direction()). If the style is %GTK_BUTTONBOX_START
3438 // or %GTK_BUTTONBOX_END, then the secondary children are aligned at
3439 // the other end of the button box from the main children. For the
3440 // other styles, they appear immediately next to the main children.
3441 // <child>: a child of @widget
3442 // <is_secondary>: if %TRUE, the @child appears in a secondary group of the button box.
3443 void set_child_secondary(Widget* child, int is_secondary) {
3444 gtk_button_box_set_child_secondary(&this, child, is_secondary);
3446 void set_child_size(int min_width, int min_height) {
3447 gtk_button_box_set_child_size(&this, min_width, min_height);
3449 void set_layout(ButtonBoxStyle layout_style) {
3450 gtk_button_box_set_layout(&this, layout_style);
3454 struct ButtonBoxClass {
3455 BoxClass parent_class;
3458 enum ButtonBoxStyle {
3459 DEFAULT_STYLE = 0,
3460 SPREAD = 1,
3461 EDGE = 2,
3462 START = 3,
3463 END = 4,
3464 CENTER = 5
3466 struct ButtonClass {
3467 BinClass parent_class;
3468 extern (C) void function (Button* button) pressed;
3469 extern (C) void function (Button* button) released;
3470 extern (C) void function (Button* button) clicked;
3471 extern (C) void function (Button* button) enter;
3472 extern (C) void function (Button* button) leave;
3473 extern (C) void function (Button* button) activate;
3474 extern (C) void function () _gtk_reserved1;
3475 extern (C) void function () _gtk_reserved2;
3476 extern (C) void function () _gtk_reserved3;
3477 extern (C) void function () _gtk_reserved4;
3481 // Prebuilt sets of buttons for the dialog. If
3482 // none of these choices are appropriate, simply use %GTK_BUTTONS_NONE
3483 // then call gtk_dialog_add_buttons().
3484 // <note>
3485 // Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
3486 // and %GTK_BUTTONS_OK_CANCEL are discouraged by the
3487 // <ulink url="http://library.gnome.org/devel/hig-book/stable/">GNOME HIG</ulink>.
3488 // </note>
3489 enum ButtonsType {
3490 NONE = 0,
3491 OK = 1,
3492 CLOSE = 2,
3493 CANCEL = 3,
3494 YES_NO = 4,
3495 OK_CANCEL = 5
3497 struct CList /* : Container */ {
3498 alias container this;
3499 alias container super_;
3500 Container container;
3501 ushort flags;
3502 void* reserved1, reserved2;
3503 uint freeze_count;
3504 Gdk2.Rectangle internal_allocation;
3505 int rows, row_height;
3506 GLib2.List* row_list, row_list_end;
3507 int columns;
3508 Gdk2.Rectangle column_title_area;
3509 Gdk2.Window* title_window;
3510 CListColumn* column;
3511 Gdk2.Window* clist_window;
3512 int clist_window_width, clist_window_height, hoffset, voffset;
3513 ShadowType shadow_type;
3514 SelectionMode selection_mode;
3515 GLib2.List* selection, selection_end, undo_selection_, undo_unselection;
3516 int undo_anchor;
3517 ubyte[5] button_actions;
3518 ubyte drag_button;
3519 CListCellInfo click_cell;
3520 Adjustment* hadjustment, vadjustment;
3521 Gdk2.GC* xor_gc, fg_gc, bg_gc;
3522 Gdk2.Cursor* cursor_drag;
3523 int x_drag, focus_row, focus_header_column, anchor;
3524 StateType anchor_state;
3525 int drag_pos, htimer, vtimer;
3526 SortType sort_type;
3527 CListCompareFunc compare;
3528 int sort_column, drag_highlight_row;
3529 CListDragPos drag_highlight_pos;
3531 static CList* new_(int columns) {
3532 return gtk_clist_new(columns);
3534 static CList* new_with_titles(int columns, char* titles) {
3535 return gtk_clist_new_with_titles(columns, titles);
3537 int append(char* text) {
3538 return gtk_clist_append(&this, text);
3540 void clear() {
3541 gtk_clist_clear(&this);
3543 void column_title_active(int column) {
3544 gtk_clist_column_title_active(&this, column);
3546 void column_title_passive(int column) {
3547 gtk_clist_column_title_passive(&this, column);
3549 void column_titles_active() {
3550 gtk_clist_column_titles_active(&this);
3552 void column_titles_hide() {
3553 gtk_clist_column_titles_hide(&this);
3555 void column_titles_passive() {
3556 gtk_clist_column_titles_passive(&this);
3558 void column_titles_show() {
3559 gtk_clist_column_titles_show(&this);
3561 int columns_autosize() {
3562 return gtk_clist_columns_autosize(&this);
3564 int find_row_from_data(void* data) {
3565 return gtk_clist_find_row_from_data(&this, data);
3567 void freeze() {
3568 gtk_clist_freeze(&this);
3570 // Unintrospectable method: get_cell_style() / gtk_clist_get_cell_style()
3571 Style* get_cell_style(int row, int column) {
3572 return gtk_clist_get_cell_style(&this, row, column);
3574 CellType get_cell_type(int row, int column) {
3575 return gtk_clist_get_cell_type(&this, row, column);
3577 char* /*new*/ get_column_title(int column) {
3578 return gtk_clist_get_column_title(&this, column);
3580 // Unintrospectable method: get_column_widget() / gtk_clist_get_column_widget()
3581 Widget* get_column_widget(int column) {
3582 return gtk_clist_get_column_widget(&this, column);
3584 // Unintrospectable method: get_hadjustment() / gtk_clist_get_hadjustment()
3585 Adjustment* get_hadjustment() {
3586 return gtk_clist_get_hadjustment(&this);
3588 int get_pixmap(int row, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
3589 return gtk_clist_get_pixmap(&this, row, column, pixmap, mask);
3591 int get_pixtext(int row, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
3592 return gtk_clist_get_pixtext(&this, row, column, text, spacing, pixmap, mask);
3594 // Unintrospectable method: get_row_data() / gtk_clist_get_row_data()
3595 void* get_row_data(int row) {
3596 return gtk_clist_get_row_data(&this, row);
3598 // Unintrospectable method: get_row_style() / gtk_clist_get_row_style()
3599 Style* get_row_style(int row) {
3600 return gtk_clist_get_row_style(&this, row);
3602 int get_selectable(int row) {
3603 return gtk_clist_get_selectable(&this, row);
3605 int get_selection_info(int x, int y, int* row, int* column) {
3606 return gtk_clist_get_selection_info(&this, x, y, row, column);
3608 int get_text(int row, int column, char** text) {
3609 return gtk_clist_get_text(&this, row, column, text);
3611 // Unintrospectable method: get_vadjustment() / gtk_clist_get_vadjustment()
3612 Adjustment* get_vadjustment() {
3613 return gtk_clist_get_vadjustment(&this);
3615 int insert(int row, char* text) {
3616 return gtk_clist_insert(&this, row, text);
3618 void moveto(int row, int column, float row_align, float col_align) {
3619 gtk_clist_moveto(&this, row, column, row_align, col_align);
3621 int optimal_column_width(int column) {
3622 return gtk_clist_optimal_column_width(&this, column);
3624 int prepend(char* text) {
3625 return gtk_clist_prepend(&this, text);
3627 void remove(int row) {
3628 gtk_clist_remove(&this, row);
3630 Visibility row_is_visible(int row) {
3631 return gtk_clist_row_is_visible(&this, row);
3633 void row_move(int source_row, int dest_row) {
3634 gtk_clist_row_move(&this, source_row, dest_row);
3636 void select_all() {
3637 gtk_clist_select_all(&this);
3639 void select_row(int row, int column) {
3640 gtk_clist_select_row(&this, row, column);
3642 void set_auto_sort(int auto_sort) {
3643 gtk_clist_set_auto_sort(&this, auto_sort);
3645 void set_background(int row, Gdk2.Color* color) {
3646 gtk_clist_set_background(&this, row, color);
3648 void set_button_actions(uint button, ubyte button_actions) {
3649 gtk_clist_set_button_actions(&this, button, button_actions);
3651 void set_cell_style(int row, int column, Style* style) {
3652 gtk_clist_set_cell_style(&this, row, column, style);
3654 void set_column_auto_resize(int column, int auto_resize) {
3655 gtk_clist_set_column_auto_resize(&this, column, auto_resize);
3657 void set_column_justification(int column, Justification justification) {
3658 gtk_clist_set_column_justification(&this, column, justification);
3660 void set_column_max_width(int column, int max_width) {
3661 gtk_clist_set_column_max_width(&this, column, max_width);
3663 void set_column_min_width(int column, int min_width) {
3664 gtk_clist_set_column_min_width(&this, column, min_width);
3666 void set_column_resizeable(int column, int resizeable) {
3667 gtk_clist_set_column_resizeable(&this, column, resizeable);
3669 void set_column_title(int column, char* title) {
3670 gtk_clist_set_column_title(&this, column, title);
3672 void set_column_visibility(int column, int visible) {
3673 gtk_clist_set_column_visibility(&this, column, visible);
3675 void set_column_widget(int column, Widget* widget) {
3676 gtk_clist_set_column_widget(&this, column, widget);
3678 void set_column_width(int column, int width) {
3679 gtk_clist_set_column_width(&this, column, width);
3681 // Unintrospectable method: set_compare_func() / gtk_clist_set_compare_func()
3682 void set_compare_func(CListCompareFunc cmp_func) {
3683 gtk_clist_set_compare_func(&this, cmp_func);
3685 void set_foreground(int row, Gdk2.Color* color) {
3686 gtk_clist_set_foreground(&this, row, color);
3688 void set_hadjustment(Adjustment* adjustment) {
3689 gtk_clist_set_hadjustment(&this, adjustment);
3691 void set_pixmap(int row, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
3692 gtk_clist_set_pixmap(&this, row, column, pixmap, mask);
3694 void set_pixtext(int row, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask) {
3695 gtk_clist_set_pixtext(&this, row, column, text, spacing, pixmap, mask);
3697 void set_reorderable(int reorderable) {
3698 gtk_clist_set_reorderable(&this, reorderable);
3700 void set_row_data(int row, void* data) {
3701 gtk_clist_set_row_data(&this, row, data);
3703 void set_row_data_full(int row, void* data, GLib2.DestroyNotify destroy) {
3704 gtk_clist_set_row_data_full(&this, row, data, destroy);
3706 void set_row_height(uint height) {
3707 gtk_clist_set_row_height(&this, height);
3709 void set_row_style(int row, Style* style) {
3710 gtk_clist_set_row_style(&this, row, style);
3712 void set_selectable(int row, int selectable) {
3713 gtk_clist_set_selectable(&this, row, selectable);
3715 void set_selection_mode(SelectionMode mode) {
3716 gtk_clist_set_selection_mode(&this, mode);
3718 void set_shadow_type(ShadowType type) {
3719 gtk_clist_set_shadow_type(&this, type);
3721 void set_shift(int row, int column, int vertical, int horizontal) {
3722 gtk_clist_set_shift(&this, row, column, vertical, horizontal);
3724 void set_sort_column(int column) {
3725 gtk_clist_set_sort_column(&this, column);
3727 void set_sort_type(SortType sort_type) {
3728 gtk_clist_set_sort_type(&this, sort_type);
3730 void set_text(int row, int column, char* text) {
3731 gtk_clist_set_text(&this, row, column, text);
3733 void set_use_drag_icons(int use_icons) {
3734 gtk_clist_set_use_drag_icons(&this, use_icons);
3736 void set_vadjustment(Adjustment* adjustment) {
3737 gtk_clist_set_vadjustment(&this, adjustment);
3739 void sort() {
3740 gtk_clist_sort(&this);
3742 void swap_rows(int row1, int row2) {
3743 gtk_clist_swap_rows(&this, row1, row2);
3745 void thaw() {
3746 gtk_clist_thaw(&this);
3748 void undo_selection() {
3749 gtk_clist_undo_selection(&this);
3751 void unselect_all() {
3752 gtk_clist_unselect_all(&this);
3754 void unselect_row(int row, int column) {
3755 gtk_clist_unselect_row(&this, row, column);
3757 extern (C) alias static void function (CList* this_, void* user_data=null) signal_abort_column_resize;
3759 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3760 return super_.signal_connect!name(cb, data, cf);
3763 ulong signal_connect(string name:"abort-column-resize", CB/*:signal_abort_column_resize*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3764 return signal_connect_data(&this, cast(char*)"abort-column-resize",
3765 cast(GObject2.Callback)cb, data, null, cf);
3767 extern (C) alias static void function (CList* this_, int object, void* user_data=null) signal_click_column;
3768 ulong signal_connect(string name:"click-column", CB/*:signal_click_column*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3769 return signal_connect_data(&this, cast(char*)"click-column",
3770 cast(GObject2.Callback)cb, data, null, cf);
3772 extern (C) alias static void function (CList* this_, void* user_data=null) signal_end_selection;
3773 ulong signal_connect(string name:"end-selection", CB/*:signal_end_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3774 return signal_connect_data(&this, cast(char*)"end-selection",
3775 cast(GObject2.Callback)cb, data, null, cf);
3777 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, c_int p1, void* user_data=null) signal_extend_selection;
3778 ulong signal_connect(string name:"extend-selection", CB/*:signal_extend_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3779 return signal_connect_data(&this, cast(char*)"extend-selection",
3780 cast(GObject2.Callback)cb, data, null, cf);
3782 extern (C) alias static void function (CList* this_, int object, int p0, void* user_data=null) signal_resize_column;
3783 ulong signal_connect(string name:"resize-column", CB/*:signal_resize_column*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3784 return signal_connect_data(&this, cast(char*)"resize-column",
3785 cast(GObject2.Callback)cb, data, null, cf);
3787 extern (C) alias static void function (CList* this_, int object, int p0, void* user_data=null) signal_row_move;
3788 ulong signal_connect(string name:"row-move", CB/*:signal_row_move*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3789 return signal_connect_data(&this, cast(char*)"row-move",
3790 cast(GObject2.Callback)cb, data, null, cf);
3792 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_horizontal;
3793 ulong signal_connect(string name:"scroll-horizontal", CB/*:signal_scroll_horizontal*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3794 return signal_connect_data(&this, cast(char*)"scroll-horizontal",
3795 cast(GObject2.Callback)cb, data, null, cf);
3797 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_vertical;
3798 ulong signal_connect(string name:"scroll-vertical", CB/*:signal_scroll_vertical*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3799 return signal_connect_data(&this, cast(char*)"scroll-vertical",
3800 cast(GObject2.Callback)cb, data, null, cf);
3802 extern (C) alias static void function (CList* this_, void* user_data=null) signal_select_all;
3803 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3804 return signal_connect_data(&this, cast(char*)"select-all",
3805 cast(GObject2.Callback)cb, data, null, cf);
3807 extern (C) alias static void function (CList* this_, int object, int p0, Gdk2.Event* p1, void* user_data=null) signal_select_row;
3808 ulong signal_connect(string name:"select-row", CB/*:signal_select_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3809 return signal_connect_data(&this, cast(char*)"select-row",
3810 cast(GObject2.Callback)cb, data, null, cf);
3812 extern (C) alias static void function (CList* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
3813 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3814 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
3815 cast(GObject2.Callback)cb, data, null, cf);
3817 extern (C) alias static void function (CList* this_, void* user_data=null) signal_start_selection;
3818 ulong signal_connect(string name:"start-selection", CB/*:signal_start_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3819 return signal_connect_data(&this, cast(char*)"start-selection",
3820 cast(GObject2.Callback)cb, data, null, cf);
3822 extern (C) alias static void function (CList* this_, void* user_data=null) signal_toggle_add_mode;
3823 ulong signal_connect(string name:"toggle-add-mode", CB/*:signal_toggle_add_mode*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3824 return signal_connect_data(&this, cast(char*)"toggle-add-mode",
3825 cast(GObject2.Callback)cb, data, null, cf);
3827 extern (C) alias static void function (CList* this_, void* user_data=null) signal_toggle_focus_row;
3828 ulong signal_connect(string name:"toggle-focus-row", CB/*:signal_toggle_focus_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3829 return signal_connect_data(&this, cast(char*)"toggle-focus-row",
3830 cast(GObject2.Callback)cb, data, null, cf);
3832 extern (C) alias static void function (CList* this_, void* user_data=null) signal_undo_selection;
3833 ulong signal_connect(string name:"undo-selection", CB/*:signal_undo_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3834 return signal_connect_data(&this, cast(char*)"undo-selection",
3835 cast(GObject2.Callback)cb, data, null, cf);
3837 extern (C) alias static void function (CList* this_, void* user_data=null) signal_unselect_all;
3838 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3839 return signal_connect_data(&this, cast(char*)"unselect-all",
3840 cast(GObject2.Callback)cb, data, null, cf);
3842 extern (C) alias static void function (CList* this_, int object, int p0, Gdk2.Event* p1, void* user_data=null) signal_unselect_row;
3843 ulong signal_connect(string name:"unselect-row", CB/*:signal_unselect_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3844 return signal_connect_data(&this, cast(char*)"unselect-row",
3845 cast(GObject2.Callback)cb, data, null, cf);
3849 struct CListCellInfo {
3850 int row, column;
3853 struct CListClass {
3854 ContainerClass parent_class;
3855 extern (C) void function (CList* clist, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
3856 extern (C) void function (CList* clist) refresh;
3857 extern (C) void function (CList* clist, int row, int column, Gdk2.Event* event) select_row;
3858 extern (C) void function (CList* clist, int row, int column, Gdk2.Event* event) unselect_row;
3859 extern (C) void function (CList* clist, int source_row, int dest_row) row_move;
3860 extern (C) void function (CList* clist, int column) click_column;
3861 extern (C) void function (CList* clist, int column, int width) resize_column;
3862 extern (C) void function (CList* clist) toggle_focus_row;
3863 extern (C) void function (CList* clist) select_all;
3864 extern (C) void function (CList* clist) unselect_all;
3865 extern (C) void function (CList* clist) undo_selection;
3866 extern (C) void function (CList* clist) start_selection;
3867 extern (C) void function (CList* clist) end_selection;
3868 extern (C) void function (CList* clist, ScrollType scroll_type, float position, int auto_start_selection) extend_selection;
3869 extern (C) void function (CList* clist, ScrollType scroll_type, float position) scroll_horizontal;
3870 extern (C) void function (CList* clist, ScrollType scroll_type, float position) scroll_vertical;
3871 extern (C) void function (CList* clist) toggle_add_mode;
3872 extern (C) void function (CList* clist) abort_column_resize;
3873 extern (C) void function (CList* clist, Gdk2.Event* event) resync_selection;
3874 // Unintrospectable functionp: selection_find() / ()
3875 extern (C) GLib2.List* function (CList* clist, int row_number, GLib2.List* row_list_element) selection_find;
3876 extern (C) void function (CList* clist, Gdk2.Rectangle* area, int row, CListRow* clist_row) draw_row;
3877 extern (C) void function (CList* clist, CListRow* target_row, int target_row_number, CListDragPos drag_pos) draw_drag_highlight;
3878 extern (C) void function (CList* clist) clear;
3879 extern (C) void function (CList* clist, int row) fake_unselect_all;
3880 extern (C) void function (CList* clist) sort_list;
3881 extern (C) int function (CList* clist, int row, char* text) insert_row;
3882 extern (C) void function (CList* clist, int row) remove_row;
3883 extern (C) void function (CList* clist, CListRow* clist_row, int column, CellType type, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask) set_cell_contents;
3884 extern (C) void function (CList* clist, CListRow* clist_row, int column, Requisition* requisition) cell_size_request;
3887 struct CListColumn {
3888 char* title;
3889 Gdk2.Rectangle area;
3890 Widget* button;
3891 Gdk2.Window* window;
3892 int width, min_width, max_width;
3893 Justification justification;
3894 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3895 uint, "visible", 1,
3896 uint, "width_set", 1,
3897 uint, "resizeable", 1,
3898 uint, "auto_resize", 1,
3899 uint, "button_passive", 1,
3900 uint, "__dummy32A", 27));
3903 extern (C) alias int function (CList* clist, const(void)* ptr1, const(void)* ptr2) CListCompareFunc;
3905 struct CListDestInfo {
3906 CListCellInfo cell;
3907 CListDragPos insert_pos;
3910 enum CListDragPos {
3911 NONE = 0,
3912 BEFORE = 1,
3913 INTO = 2,
3914 AFTER = 3
3916 struct CListRow {
3917 Cell* cell;
3918 StateType state;
3919 Gdk2.Color foreground, background;
3920 Style* style;
3921 void* data;
3922 GLib2.DestroyNotify destroy;
3923 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3924 uint, "fg_set", 1,
3925 uint, "bg_set", 1,
3926 uint, "selectable", 1,
3927 uint, "__dummy32A", 29));
3930 struct CTree /* : CList */ {
3931 alias clist this;
3932 alias clist super_;
3933 CList clist;
3934 Gdk2.GC* lines_gc;
3935 int tree_indent, tree_spacing, tree_column;
3936 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3937 uint, "line_style", 2,
3938 uint, "expander_style", 2,
3939 uint, "show_stub", 1,
3940 uint, "__dummy32A", 27));
3941 CTreeCompareDragFunc drag_compare;
3943 static CTree* new_(int columns, int tree_column) {
3944 return gtk_ctree_new(columns, tree_column);
3946 static CTree* new_with_titles(int columns, int tree_column, char* titles) {
3947 return gtk_ctree_new_with_titles(columns, tree_column, titles);
3949 void collapse(CTreeNode* node) {
3950 gtk_ctree_collapse(&this, node);
3952 void collapse_recursive(CTreeNode* node) {
3953 gtk_ctree_collapse_recursive(&this, node);
3955 void collapse_to_depth(CTreeNode* node, int depth) {
3956 gtk_ctree_collapse_to_depth(&this, node, depth);
3958 void expand(CTreeNode* node) {
3959 gtk_ctree_expand(&this, node);
3961 void expand_recursive(CTreeNode* node) {
3962 gtk_ctree_expand_recursive(&this, node);
3964 void expand_to_depth(CTreeNode* node, int depth) {
3965 gtk_ctree_expand_to_depth(&this, node, depth);
3967 // Unintrospectable method: export_to_gnode() / gtk_ctree_export_to_gnode()
3968 GLib2.Node* export_to_gnode(GLib2.Node* parent, GLib2.Node* sibling, CTreeNode* node, CTreeGNodeFunc func, void* data) {
3969 return gtk_ctree_export_to_gnode(&this, parent, sibling, node, func, data);
3971 int find(CTreeNode* node, CTreeNode* child) {
3972 return gtk_ctree_find(&this, node, child);
3974 // Unintrospectable method: find_all_by_row_data() / gtk_ctree_find_all_by_row_data()
3975 GLib2.List* find_all_by_row_data(CTreeNode* node, void* data) {
3976 return gtk_ctree_find_all_by_row_data(&this, node, data);
3978 // Unintrospectable method: find_all_by_row_data_custom() / gtk_ctree_find_all_by_row_data_custom()
3979 GLib2.List* find_all_by_row_data_custom(CTreeNode* node, void* data, GLib2.CompareFunc func) {
3980 return gtk_ctree_find_all_by_row_data_custom(&this, node, data, func);
3982 // Unintrospectable method: find_by_row_data() / gtk_ctree_find_by_row_data()
3983 CTreeNode* find_by_row_data(CTreeNode* node, void* data) {
3984 return gtk_ctree_find_by_row_data(&this, node, data);
3986 // Unintrospectable method: find_by_row_data_custom() / gtk_ctree_find_by_row_data_custom()
3987 CTreeNode* find_by_row_data_custom(CTreeNode* node, void* data, GLib2.CompareFunc func) {
3988 return gtk_ctree_find_by_row_data_custom(&this, node, data, func);
3990 // Unintrospectable method: find_node_ptr() / gtk_ctree_find_node_ptr()
3991 CTreeNode* find_node_ptr(CTreeRow* ctree_row) {
3992 return gtk_ctree_find_node_ptr(&this, ctree_row);
3994 int get_node_info(CTreeNode* node, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap_closed, Gdk2.Bitmap** mask_closed, Gdk2.Pixmap** pixmap_opened, Gdk2.Bitmap** mask_opened, int* is_leaf, int* expanded) {
3995 return gtk_ctree_get_node_info(&this, node, text, spacing, pixmap_closed, mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
3997 // Unintrospectable method: insert_gnode() / gtk_ctree_insert_gnode()
3998 CTreeNode* insert_gnode(CTreeNode* parent, CTreeNode* sibling, GLib2.Node* gnode, CTreeGNodeFunc func, void* data) {
3999 return gtk_ctree_insert_gnode(&this, parent, sibling, gnode, func, data);
4001 // Unintrospectable method: insert_node() / gtk_ctree_insert_node()
4002 CTreeNode* insert_node(CTreeNode* parent, CTreeNode* sibling, char* text, ubyte spacing, Gdk2.Pixmap* pixmap_closed, Gdk2.Bitmap* mask_closed, Gdk2.Pixmap* pixmap_opened, Gdk2.Bitmap* mask_opened, int is_leaf, int expanded) {
4003 return gtk_ctree_insert_node(&this, parent, sibling, text, spacing, pixmap_closed, mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
4005 int is_ancestor(CTreeNode* node, CTreeNode* child) {
4006 return gtk_ctree_is_ancestor(&this, node, child);
4008 int is_hot_spot(int x, int y) {
4009 return gtk_ctree_is_hot_spot(&this, x, y);
4011 int is_viewable(CTreeNode* node) {
4012 return gtk_ctree_is_viewable(&this, node);
4014 // Unintrospectable method: last() / gtk_ctree_last()
4015 CTreeNode* last(CTreeNode* node) {
4016 return gtk_ctree_last(&this, node);
4018 void move(CTreeNode* node, CTreeNode* new_parent=null, CTreeNode* new_sibling=null) {
4019 gtk_ctree_move(&this, node, new_parent, new_sibling);
4021 // Unintrospectable method: node_get_cell_style() / gtk_ctree_node_get_cell_style()
4022 Style* node_get_cell_style(CTreeNode* node, int column) {
4023 return gtk_ctree_node_get_cell_style(&this, node, column);
4025 CellType node_get_cell_type(CTreeNode* node, int column) {
4026 return gtk_ctree_node_get_cell_type(&this, node, column);
4028 int node_get_pixmap(CTreeNode* node, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
4029 return gtk_ctree_node_get_pixmap(&this, node, column, pixmap, mask);
4031 int node_get_pixtext(CTreeNode* node, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
4032 return gtk_ctree_node_get_pixtext(&this, node, column, text, spacing, pixmap, mask);
4034 // Unintrospectable method: node_get_row_data() / gtk_ctree_node_get_row_data()
4035 void* node_get_row_data(CTreeNode* node) {
4036 return gtk_ctree_node_get_row_data(&this, node);
4038 // Unintrospectable method: node_get_row_style() / gtk_ctree_node_get_row_style()
4039 Style* node_get_row_style(CTreeNode* node) {
4040 return gtk_ctree_node_get_row_style(&this, node);
4042 int node_get_selectable(CTreeNode* node) {
4043 return gtk_ctree_node_get_selectable(&this, node);
4045 int node_get_text(CTreeNode* node, int column, char** text) {
4046 return gtk_ctree_node_get_text(&this, node, column, text);
4048 Visibility node_is_visible(CTreeNode* node) {
4049 return gtk_ctree_node_is_visible(&this, node);
4051 void node_moveto(CTreeNode* node, int column, float row_align, float col_align) {
4052 gtk_ctree_node_moveto(&this, node, column, row_align, col_align);
4054 // Unintrospectable method: node_nth() / gtk_ctree_node_nth()
4055 CTreeNode* node_nth(uint row) {
4056 return gtk_ctree_node_nth(&this, row);
4058 void node_set_background(CTreeNode* node, Gdk2.Color* color) {
4059 gtk_ctree_node_set_background(&this, node, color);
4061 void node_set_cell_style(CTreeNode* node, int column, Style* style) {
4062 gtk_ctree_node_set_cell_style(&this, node, column, style);
4064 void node_set_foreground(CTreeNode* node, Gdk2.Color* color) {
4065 gtk_ctree_node_set_foreground(&this, node, color);
4067 void node_set_pixmap(CTreeNode* node, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
4068 gtk_ctree_node_set_pixmap(&this, node, column, pixmap, mask);
4070 void node_set_pixtext(CTreeNode* node, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
4071 gtk_ctree_node_set_pixtext(&this, node, column, text, spacing, pixmap, mask);
4073 void node_set_row_data(CTreeNode* node, void* data) {
4074 gtk_ctree_node_set_row_data(&this, node, data);
4076 void node_set_row_data_full(CTreeNode* node, void* data, GLib2.DestroyNotify destroy) {
4077 gtk_ctree_node_set_row_data_full(&this, node, data, destroy);
4079 void node_set_row_style(CTreeNode* node, Style* style) {
4080 gtk_ctree_node_set_row_style(&this, node, style);
4082 void node_set_selectable(CTreeNode* node, int selectable) {
4083 gtk_ctree_node_set_selectable(&this, node, selectable);
4085 void node_set_shift(CTreeNode* node, int column, int vertical, int horizontal) {
4086 gtk_ctree_node_set_shift(&this, node, column, vertical, horizontal);
4088 void node_set_text(CTreeNode* node, int column, char* text) {
4089 gtk_ctree_node_set_text(&this, node, column, text);
4091 // Unintrospectable method: post_recursive() / gtk_ctree_post_recursive()
4092 void post_recursive(CTreeNode* node, CTreeFunc func, void* data) {
4093 gtk_ctree_post_recursive(&this, node, func, data);
4095 // Unintrospectable method: post_recursive_to_depth() / gtk_ctree_post_recursive_to_depth()
4096 void post_recursive_to_depth(CTreeNode* node, int depth, CTreeFunc func, void* data) {
4097 gtk_ctree_post_recursive_to_depth(&this, node, depth, func, data);
4099 // Unintrospectable method: pre_recursive() / gtk_ctree_pre_recursive()
4100 void pre_recursive(CTreeNode* node, CTreeFunc func, void* data) {
4101 gtk_ctree_pre_recursive(&this, node, func, data);
4103 // Unintrospectable method: pre_recursive_to_depth() / gtk_ctree_pre_recursive_to_depth()
4104 void pre_recursive_to_depth(CTreeNode* node, int depth, CTreeFunc func, void* data) {
4105 gtk_ctree_pre_recursive_to_depth(&this, node, depth, func, data);
4107 void real_select_recursive(CTreeNode* node, int state) {
4108 gtk_ctree_real_select_recursive(&this, node, state);
4110 void remove_node(CTreeNode* node) {
4111 gtk_ctree_remove_node(&this, node);
4113 void select(CTreeNode* node) {
4114 gtk_ctree_select(&this, node);
4116 void select_recursive(CTreeNode* node) {
4117 gtk_ctree_select_recursive(&this, node);
4119 // Unintrospectable method: set_drag_compare_func() / gtk_ctree_set_drag_compare_func()
4120 void set_drag_compare_func(CTreeCompareDragFunc cmp_func) {
4121 gtk_ctree_set_drag_compare_func(&this, cmp_func);
4123 void set_expander_style(CTreeExpanderStyle expander_style) {
4124 gtk_ctree_set_expander_style(&this, expander_style);
4126 void set_indent(int indent) {
4127 gtk_ctree_set_indent(&this, indent);
4129 void set_line_style(CTreeLineStyle line_style) {
4130 gtk_ctree_set_line_style(&this, line_style);
4132 void set_node_info(CTreeNode* node, char* text, ubyte spacing, Gdk2.Pixmap* pixmap_closed, Gdk2.Bitmap* mask_closed, Gdk2.Pixmap* pixmap_opened, Gdk2.Bitmap* mask_opened, int is_leaf, int expanded) {
4133 gtk_ctree_set_node_info(&this, node, text, spacing, pixmap_closed, mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
4135 void set_show_stub(int show_stub) {
4136 gtk_ctree_set_show_stub(&this, show_stub);
4138 void set_spacing(int spacing) {
4139 gtk_ctree_set_spacing(&this, spacing);
4141 void sort_node(CTreeNode* node) {
4142 gtk_ctree_sort_node(&this, node);
4144 void sort_recursive(CTreeNode* node) {
4145 gtk_ctree_sort_recursive(&this, node);
4147 void toggle_expansion(CTreeNode* node) {
4148 gtk_ctree_toggle_expansion(&this, node);
4150 void toggle_expansion_recursive(CTreeNode* node) {
4151 gtk_ctree_toggle_expansion_recursive(&this, node);
4153 void unselect(CTreeNode* node) {
4154 gtk_ctree_unselect(&this, node);
4156 void unselect_recursive(CTreeNode* node) {
4157 gtk_ctree_unselect_recursive(&this, node);
4159 extern (C) alias static void function (CTree* this_, CTreeExpansionType* object, void* user_data=null) signal_change_focus_row_expansion;
4161 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4162 return super_.signal_connect!name(cb, data, cf);
4165 ulong signal_connect(string name:"change-focus-row-expansion", CB/*:signal_change_focus_row_expansion*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4166 return signal_connect_data(&this, cast(char*)"change-focus-row-expansion",
4167 cast(GObject2.Callback)cb, data, null, cf);
4169 // Unintrospectable glib:signal: tree-collapse() / ()
4170 extern (C) alias static void function (CTree* this_, void* object, void* user_data=null) signal_tree_collapse;
4171 ulong signal_connect(string name:"tree-collapse", CB/*:signal_tree_collapse*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4172 return signal_connect_data(&this, cast(char*)"tree-collapse",
4173 cast(GObject2.Callback)cb, data, null, cf);
4175 // Unintrospectable glib:signal: tree-expand() / ()
4176 extern (C) alias static void function (CTree* this_, void* object, void* user_data=null) signal_tree_expand;
4177 ulong signal_connect(string name:"tree-expand", CB/*:signal_tree_expand*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4178 return signal_connect_data(&this, cast(char*)"tree-expand",
4179 cast(GObject2.Callback)cb, data, null, cf);
4181 // Unintrospectable glib:signal: tree-move() / ()
4182 extern (C) alias static void function (CTree* this_, void* object, void* p0, void* p1, void* user_data=null) signal_tree_move;
4183 ulong signal_connect(string name:"tree-move", CB/*:signal_tree_move*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4184 return signal_connect_data(&this, cast(char*)"tree-move",
4185 cast(GObject2.Callback)cb, data, null, cf);
4187 // Unintrospectable glib:signal: tree-select-row() / ()
4188 extern (C) alias static void function (CTree* this_, void* object, int p0, void* user_data=null) signal_tree_select_row;
4189 ulong signal_connect(string name:"tree-select-row", CB/*:signal_tree_select_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4190 return signal_connect_data(&this, cast(char*)"tree-select-row",
4191 cast(GObject2.Callback)cb, data, null, cf);
4193 // Unintrospectable glib:signal: tree-unselect-row() / ()
4194 extern (C) alias static void function (CTree* this_, void* object, int p0, void* user_data=null) signal_tree_unselect_row;
4195 ulong signal_connect(string name:"tree-unselect-row", CB/*:signal_tree_unselect_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4196 return signal_connect_data(&this, cast(char*)"tree-unselect-row",
4197 cast(GObject2.Callback)cb, data, null, cf);
4201 struct CTreeClass {
4202 CListClass parent_class;
4203 extern (C) void function (CTree* ctree, CTreeNode* row, int column) tree_select_row;
4204 extern (C) void function (CTree* ctree, CTreeNode* row, int column) tree_unselect_row;
4205 extern (C) void function (CTree* ctree, CTreeNode* node) tree_expand;
4206 extern (C) void function (CTree* ctree, CTreeNode* node) tree_collapse;
4207 extern (C) void function (CTree* ctree, CTreeNode* node, CTreeNode* new_parent, CTreeNode* new_sibling) tree_move;
4208 extern (C) void function (CTree* ctree, CTreeExpansionType action) change_focus_row_expansion;
4211 extern (C) alias int function (CTree* ctree, CTreeNode* source_node, CTreeNode* new_parent, CTreeNode* new_sibling) CTreeCompareDragFunc;
4213 enum CTreeExpanderStyle {
4214 NONE = 0,
4215 SQUARE = 1,
4216 TRIANGLE = 2,
4217 CIRCULAR = 3
4219 enum CTreeExpansionType {
4220 EXPAND = 0,
4221 EXPAND_RECURSIVE = 1,
4222 COLLAPSE = 2,
4223 COLLAPSE_RECURSIVE = 3,
4224 TOGGLE = 4,
4225 TOGGLE_RECURSIVE = 5
4227 extern (C) alias void function (CTree* ctree, CTreeNode* node, void* data) CTreeFunc;
4229 extern (C) alias int function (CTree* ctree, uint depth, GLib2.Node* gnode, CTreeNode* cnode, void* data) CTreeGNodeFunc;
4231 enum CTreeLineStyle {
4232 NONE = 0,
4233 SOLID = 1,
4234 DOTTED = 2,
4235 TABBED = 3
4237 struct CTreeNode {
4238 GLib2.List list;
4241 enum CTreePos {
4242 BEFORE = 0,
4243 AS_CHILD = 1,
4244 AFTER = 2
4246 struct CTreeRow {
4247 CListRow row;
4248 CTreeNode* parent, sibling, children;
4249 Gdk2.Pixmap* pixmap_closed;
4250 Gdk2.Bitmap* mask_closed;
4251 Gdk2.Pixmap* pixmap_opened;
4252 Gdk2.Bitmap* mask_opened;
4253 ushort level;
4254 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4255 uint, "is_leaf", 1,
4256 uint, "expanded", 1,
4257 uint, "__dummy32A", 30));
4260 struct Calendar /* : Widget */ {
4261 alias widget this;
4262 alias widget super_;
4263 Widget widget;
4264 Style* header_style, label_style;
4265 int month, year, selected_day;
4266 int[6] day_month, day;
4267 int num_marked_dates;
4268 int[31] marked_date;
4269 CalendarDisplayOptions display_flags;
4270 Gdk2.Color[31] marked_date_color;
4271 Gdk2.GC* gc, xor_gc;
4272 int focus_row, focus_col, highlight_row, highlight_col;
4273 CalendarPrivate* priv;
4274 char[32] grow_space;
4275 extern (C) void function () _gtk_reserved1;
4276 extern (C) void function () _gtk_reserved2;
4277 extern (C) void function () _gtk_reserved3;
4278 extern (C) void function () _gtk_reserved4;
4281 // Creates a new calendar, with the current date being selected.
4282 // RETURNS: a newly #GtkCalendar widget
4283 static Calendar* new_() {
4284 return gtk_calendar_new();
4286 // Remove all visual markers.
4287 void clear_marks() {
4288 gtk_calendar_clear_marks(&this);
4291 // Sets display options (whether to display the heading and the month headings).
4292 // <flags>: the display options to set.
4293 void display_options(CalendarDisplayOptions flags) {
4294 gtk_calendar_display_options(&this, flags);
4297 // Does nothing. Previously locked the display of the calendar until
4298 // it was thawed with gtk_calendar_thaw().
4299 void freeze() {
4300 gtk_calendar_freeze(&this);
4303 // Obtains the selected date from a #GtkCalendar.
4304 // <year>: location to store the year as a decimal number (e.g. 2011), or %NULL
4305 // <month>: location to store the month number (between 0 and 11), or %NULL
4306 // <day>: location to store the day number (between 1 and 31), or %NULL
4307 void get_date(/*out*/ uint* year=null, /*out*/ uint* month=null, /*out*/ uint* day=null) {
4308 gtk_calendar_get_date(&this, year, month, day);
4311 // Queries the height of detail cells, in rows.
4312 // See #GtkCalendar:detail-width-chars.
4313 // RETURNS: The height of detail cells, in rows.
4314 int get_detail_height_rows() {
4315 return gtk_calendar_get_detail_height_rows(&this);
4318 // Queries the width of detail cells, in characters.
4319 // See #GtkCalendar:detail-width-chars.
4320 // RETURNS: The width of detail cells, in characters.
4321 int get_detail_width_chars() {
4322 return gtk_calendar_get_detail_width_chars(&this);
4325 // Returns the current display options of @calendar.
4326 // RETURNS: the display options.
4327 CalendarDisplayOptions get_display_options() {
4328 return gtk_calendar_get_display_options(&this);
4331 // Places a visual marker on a particular day.
4332 // Note that this function always returns %TRUE, and you should
4333 // ignore the return value. In GTK+ 3, this function will not
4334 // return a value.
4335 // RETURNS: %TRUE, always
4336 // <day>: the day number to mark between 1 and 31.
4337 int mark_day(uint day) {
4338 return gtk_calendar_mark_day(&this, day);
4341 // Selects a day from the current month.
4342 // <day>: the day number between 1 and 31, or 0 to unselect the currently selected day.
4343 void select_day(uint day) {
4344 gtk_calendar_select_day(&this, day);
4347 // Shifts the calendar to a different month.
4348 // Note that this function always returns %TRUE, and you should
4349 // ignore the return value. In GTK+ 3, this function will not
4350 // return a value.
4351 // RETURNS: %TRUE, always
4352 // <month>: a month number between 0 and 11.
4353 // <year>: the year the month is in.
4354 int select_month(uint month, uint year) {
4355 return gtk_calendar_select_month(&this, month, year);
4358 // Installs a function which provides Pango markup with detail information
4359 // for each day. Examples for such details are holidays or appointments. That
4360 // information is shown below each day when #GtkCalendar:show-details is set.
4361 // A tooltip containing with full detail information is provided, if the entire
4362 // text should not fit into the details area, or if #GtkCalendar:show-details
4363 // is not set.
4364 // The size of the details area can be restricted by setting the
4365 // #GtkCalendar:detail-width-chars and #GtkCalendar:detail-height-rows
4366 // properties.
4367 // <func>: a function providing details for each day.
4368 // <data>: data to pass to @func invokations.
4369 // <destroy>: a function for releasing @data.
4370 void set_detail_func(CalendarDetailFunc func, void* data, GLib2.DestroyNotify destroy) {
4371 gtk_calendar_set_detail_func(&this, func, data, destroy);
4374 // Updates the height of detail cells.
4375 // See #GtkCalendar:detail-height-rows.
4376 // <rows>: detail height in rows.
4377 void set_detail_height_rows(int rows) {
4378 gtk_calendar_set_detail_height_rows(&this, rows);
4381 // Updates the width of detail cells.
4382 // See #GtkCalendar:detail-width-chars.
4383 // <chars>: detail width in characters.
4384 void set_detail_width_chars(int chars) {
4385 gtk_calendar_set_detail_width_chars(&this, chars);
4388 // Sets display options (whether to display the heading and the month
4389 // headings).
4390 // <flags>: the display options to set
4391 void set_display_options(CalendarDisplayOptions flags) {
4392 gtk_calendar_set_display_options(&this, flags);
4395 // Does nothing. Previously defrosted a calendar; all the changes made
4396 // since the last gtk_calendar_freeze() were displayed.
4397 void thaw() {
4398 gtk_calendar_thaw(&this);
4401 // Removes the visual marker from a particular day.
4402 // Note that this function always returns %TRUE, and you should
4403 // ignore the return value. In GTK+ 3, this function will not
4404 // return a value.
4405 // RETURNS: %TRUE, always
4406 // <day>: the day number to unmark between 1 and 31.
4407 int unmark_day(uint day) {
4408 return gtk_calendar_unmark_day(&this, day);
4410 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_day_selected;
4412 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4413 return super_.signal_connect!name(cb, data, cf);
4416 ulong signal_connect(string name:"day-selected", CB/*:signal_day_selected*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4417 return signal_connect_data(&this, cast(char*)"day-selected",
4418 cast(GObject2.Callback)cb, data, null, cf);
4420 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_day_selected_double_click;
4421 ulong signal_connect(string name:"day-selected-double-click", CB/*:signal_day_selected_double_click*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4422 return signal_connect_data(&this, cast(char*)"day-selected-double-click",
4423 cast(GObject2.Callback)cb, data, null, cf);
4426 // Emitted when the user clicks a button to change the selected month on a
4427 // calendar.
4428 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_month_changed;
4429 ulong signal_connect(string name:"month-changed", CB/*:signal_month_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4430 return signal_connect_data(&this, cast(char*)"month-changed",
4431 cast(GObject2.Callback)cb, data, null, cf);
4433 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_next_month;
4434 ulong signal_connect(string name:"next-month", CB/*:signal_next_month*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4435 return signal_connect_data(&this, cast(char*)"next-month",
4436 cast(GObject2.Callback)cb, data, null, cf);
4438 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_next_year;
4439 ulong signal_connect(string name:"next-year", CB/*:signal_next_year*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4440 return signal_connect_data(&this, cast(char*)"next-year",
4441 cast(GObject2.Callback)cb, data, null, cf);
4443 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_prev_month;
4444 ulong signal_connect(string name:"prev-month", CB/*:signal_prev_month*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4445 return signal_connect_data(&this, cast(char*)"prev-month",
4446 cast(GObject2.Callback)cb, data, null, cf);
4448 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_prev_year;
4449 ulong signal_connect(string name:"prev-year", CB/*:signal_prev_year*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4450 return signal_connect_data(&this, cast(char*)"prev-year",
4451 cast(GObject2.Callback)cb, data, null, cf);
4455 struct CalendarClass {
4456 WidgetClass parent_class;
4457 extern (C) void function (Calendar* calendar) month_changed;
4458 extern (C) void function (Calendar* calendar) day_selected;
4459 extern (C) void function (Calendar* calendar) day_selected_double_click;
4460 extern (C) void function (Calendar* calendar) prev_month;
4461 extern (C) void function (Calendar* calendar) next_month;
4462 extern (C) void function (Calendar* calendar) prev_year;
4463 extern (C) void function (Calendar* calendar) next_year;
4467 // This kind of functions provide Pango markup with detail information for the
4468 // specified day. Examples for such details are holidays or appointments. The
4469 // function returns %NULL when no information is available.
4470 // for the specified day, or %NULL.
4471 // RETURNS: Newly allocated string with Pango markup with details
4472 // <calendar>: a #GtkCalendar.
4473 // <year>: the year for which details are needed.
4474 // <month>: the month for which details are needed.
4475 // <day>: the day of @month for which details are needed.
4476 // <user_data>: the data passed with gtk_calendar_set_detail_func().
4477 extern (C) alias char* /*new*/ function (Calendar* calendar, uint year, uint month, uint day, void* user_data) CalendarDetailFunc;
4479 // These options can be used to influence the display and behaviour of a #GtkCalendar.
4480 enum CalendarDisplayOptions {
4481 SHOW_HEADING = 1,
4482 SHOW_DAY_NAMES = 2,
4483 NO_MONTH_CHANGE = 4,
4484 SHOW_WEEK_NUMBERS = 8,
4485 WEEK_START_MONDAY = 16,
4486 SHOW_DETAILS = 32
4488 struct CalendarPrivate {
4492 // The type of the callback functions used for e.g. iterating over
4493 // the children of a container, see gtk_container_foreach().
4494 // <widget>: the widget to operate on
4495 // <data>: user-supplied data
4496 extern (C) alias void function (Widget* widget, void* data) Callback;
4498 extern (C) alias void function (Object* object, void* data, uint n_args, Arg* args) CallbackMarshal;
4500 struct Cell {
4501 CellType type;
4502 short vertical, horizontal;
4503 Style* style;
4505 union u {
4506 char* text;
4508 struct pm {
4509 Gdk2.Pixmap* pixmap;
4510 Gdk2.Bitmap* mask;
4514 struct pt {
4515 char* text;
4516 ubyte spacing;
4517 Gdk2.Pixmap* pixmap;
4518 Gdk2.Bitmap* mask;
4521 Widget* widget;
4525 struct CellEditable {
4526 // Emits the #GtkCellEditable::editing-done signal.
4527 void editing_done() {
4528 gtk_cell_editable_editing_done(&this);
4530 // Emits the #GtkCellEditable::remove-widget signal.
4531 void remove_widget() {
4532 gtk_cell_editable_remove_widget(&this);
4535 // Begins editing on a @cell_editable. @event is the #GdkEvent that began
4536 // the editing process. It may be %NULL, in the instance that editing was
4537 // initiated through programatic means.
4538 // <event>: A #GdkEvent, or %NULL
4539 void start_editing(Gdk2.Event* event=null) {
4540 gtk_cell_editable_start_editing(&this, event);
4543 // This signal is a sign for the cell renderer to update its
4544 // value from the @cell_editable.
4545 // Implementations of #GtkCellEditable are responsible for
4546 // emitting this signal when they are done editing, e.g.
4547 // #GtkEntry is emitting it when the user presses Enter.
4548 // gtk_cell_editable_editing_done() is a convenience method
4549 // for emitting GtkCellEditable::editing-done.
4550 extern (C) alias static void function (CellEditable* this_, void* user_data=null) signal_editing_done;
4552 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4553 return super_.signal_connect!name(cb, data, cf);
4556 ulong signal_connect(string name:"editing-done", CB/*:signal_editing_done*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4557 return signal_connect_data(&this, cast(char*)"editing-done",
4558 cast(GObject2.Callback)cb, data, null, cf);
4561 // This signal is meant to indicate that the cell is finished
4562 // editing, and the widget may now be destroyed.
4563 // Implementations of #GtkCellEditable are responsible for
4564 // emitting this signal when they are done editing. It must
4565 // be emitted after the #GtkCellEditable::editing-done signal,
4566 // to give the cell renderer a chance to update the cell's value
4567 // before the widget is removed.
4568 // gtk_cell_editable_remove_widget() is a convenience method
4569 // for emitting GtkCellEditable::remove-widget.
4570 extern (C) alias static void function (CellEditable* this_, void* user_data=null) signal_remove_widget;
4571 ulong signal_connect(string name:"remove-widget", CB/*:signal_remove_widget*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4572 return signal_connect_data(&this, cast(char*)"remove-widget",
4573 cast(GObject2.Callback)cb, data, null, cf);
4577 struct CellEditableIface {
4578 GObject2.TypeInterface g_iface;
4579 extern (C) void function (CellEditable* cell_editable) editing_done;
4580 extern (C) void function (CellEditable* cell_editable) remove_widget;
4581 // <event>: A #GdkEvent, or %NULL
4582 extern (C) void function (CellEditable* cell_editable, Gdk2.Event* event=null) start_editing;
4585 struct CellLayout {
4587 // Adds an attribute mapping to the list in @cell_layout. The @column is the
4588 // column of the model to get a value from, and the @attribute is the
4589 // parameter on @cell to be set from the value. So for example if column 2
4590 // of the model contains strings, you could have the "text" attribute of a
4591 // #GtkCellRendererText get its values from column 2.
4592 // <cell>: A #GtkCellRenderer.
4593 // <attribute>: An attribute on the renderer.
4594 // <column>: The column position on the model to get the attribute from.
4595 void add_attribute(CellRenderer* cell, char* attribute, int column) {
4596 gtk_cell_layout_add_attribute(&this, cell, attribute, column);
4599 // Unsets all the mappings on all renderers on @cell_layout and
4600 // removes all renderers from @cell_layout.
4601 void clear() {
4602 gtk_cell_layout_clear(&this);
4605 // Clears all existing attributes previously set with
4606 // gtk_cell_layout_set_attributes().
4607 // <cell>: A #GtkCellRenderer to clear the attribute mapping on.
4608 void clear_attributes(CellRenderer* cell) {
4609 gtk_cell_layout_clear_attributes(&this, cell);
4612 // Returns the cell renderers which have been added to @cell_layout.
4613 // renderers has been newly allocated and should be freed with
4614 // g_list_free() when no longer needed.
4615 // RETURNS: a list of cell renderers. The list, but not the
4616 GLib2.List* /*new container*/ get_cells() {
4617 return gtk_cell_layout_get_cells(&this);
4620 // Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the
4621 // divided evenly between cells for which @expand is %TRUE.
4622 // Note that reusing the same cell renderer is not supported.
4623 // <cell>: A #GtkCellRenderer.
4624 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4625 void pack_end(CellRenderer* cell, int expand) {
4626 gtk_cell_layout_pack_end(&this, cell, expand);
4629 // Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE,
4630 // then the @cell is allocated no more space than it needs. Any unused space
4631 // is divided evenly between cells for which @expand is %TRUE.
4632 // Note that reusing the same cell renderer is not supported.
4633 // <cell>: A #GtkCellRenderer.
4634 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4635 void pack_start(CellRenderer* cell, int expand) {
4636 gtk_cell_layout_pack_start(&this, cell, expand);
4639 // Re-inserts @cell at @position. Note that @cell has already to be packed
4640 // into @cell_layout for this to function properly.
4641 // <cell>: A #GtkCellRenderer to reorder.
4642 // <position>: New position to insert @cell at.
4643 void reorder(CellRenderer* cell, int position) {
4644 gtk_cell_layout_reorder(&this, cell, position);
4647 // Unintrospectable method: set_attributes() / gtk_cell_layout_set_attributes()
4648 // Sets the attributes in list as the attributes of @cell_layout. The
4649 // attributes should be in attribute/column order, as in
4650 // gtk_cell_layout_add_attribute(). All existing attributes are removed, and
4651 // replaced with the new attributes.
4652 // <cell>: A #GtkCellRenderer.
4653 /+ Not available -- variadic methods unsupported - use the C function directly.
4654 alias gtk_cell_layout_set_attributes set_attributes; // Variadic
4657 // Sets the #GtkCellLayoutDataFunc to use for @cell_layout. This function
4658 // is used instead of the standard attributes mapping for setting the
4659 // column value, and should set the value of @cell_layout's cell renderer(s)
4660 // as appropriate. @func may be %NULL to remove and older one.
4661 // <cell>: A #GtkCellRenderer.
4662 // <func>: The #GtkCellLayoutDataFunc to use.
4663 // <func_data>: The user data for @func.
4664 // <destroy>: The destroy notification for @func_data.
4665 void set_cell_data_func(CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy) {
4666 gtk_cell_layout_set_cell_data_func(&this, cell, func, func_data, destroy);
4670 extern (C) alias void function (CellLayout* cell_layout, CellRenderer* cell, TreeModel* tree_model, TreeIter* iter, void* data) CellLayoutDataFunc;
4672 struct CellLayoutIface {
4673 GObject2.TypeInterface g_iface;
4675 // <cell>: A #GtkCellRenderer.
4676 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4677 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int expand) pack_start;
4679 // <cell>: A #GtkCellRenderer.
4680 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4681 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int expand) pack_end;
4682 extern (C) void function (CellLayout* cell_layout) clear;
4684 // <cell>: A #GtkCellRenderer.
4685 // <attribute>: An attribute on the renderer.
4686 // <column>: The column position on the model to get the attribute from.
4687 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, char* attribute, int column) add_attribute;
4689 // <cell>: A #GtkCellRenderer.
4690 // <func>: The #GtkCellLayoutDataFunc to use.
4691 // <func_data>: The user data for @func.
4692 // <destroy>: The destroy notification for @func_data.
4693 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy) set_cell_data_func;
4694 // <cell>: A #GtkCellRenderer to clear the attribute mapping on.
4695 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell) clear_attributes;
4697 // <cell>: A #GtkCellRenderer to reorder.
4698 // <position>: New position to insert @cell at.
4699 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int position) reorder;
4700 // RETURNS: a list of cell renderers. The list, but not the
4701 extern (C) GLib2.List* /*new container*/ function (CellLayout* cell_layout) get_cells;
4704 struct CellPixText {
4705 CellType type;
4706 short vertical, horizontal;
4707 Style* style;
4708 char* text;
4709 ubyte spacing;
4710 Gdk2.Pixmap* pixmap;
4711 Gdk2.Bitmap* mask;
4714 struct CellPixmap {
4715 CellType type;
4716 short vertical, horizontal;
4717 Style* style;
4718 Gdk2.Pixmap* pixmap;
4719 Gdk2.Bitmap* mask;
4722 struct CellRenderer /* : Object */ {
4723 alias parent this;
4724 alias parent super_;
4725 alias parent object;
4726 Object parent;
4727 float xalign, yalign;
4728 int width, height;
4729 ushort xpad, ypad;
4730 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4731 uint, "mode", 2,
4732 uint, "visible", 1,
4733 uint, "is_expander", 1,
4734 uint, "is_expanded", 1,
4735 uint, "cell_background_set", 1,
4736 uint, "sensitive", 1,
4737 uint, "editing", 1,
4738 uint, "__dummy32A", 24));
4741 // Passes an activate event to the cell renderer for possible processing.
4742 // Some cell renderers may use events; for example, #GtkCellRendererToggle
4743 // toggles when it gets a mouse click.
4744 // RETURNS: %TRUE if the event was consumed/handled
4745 // <event>: a #GdkEvent
4746 // <widget>: widget that received the event
4747 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
4748 // <background_area>: background area as passed to gtk_cell_renderer_render()
4749 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
4750 // <flags>: render flags
4751 int activate(Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) {
4752 return gtk_cell_renderer_activate(&this, event, widget, path, background_area, cell_area, flags);
4755 // Causes the cell renderer to emit the #GtkCellRenderer::editing-canceled
4756 // signal.
4757 // This function is for use only by implementations of cell renderers that
4758 // need to notify the client program that an editing process was canceled
4759 // and the changes were not committed.
4760 void editing_canceled() {
4761 gtk_cell_renderer_editing_canceled(&this);
4764 // Fills in @xalign and @yalign with the appropriate values of @cell.
4765 // <xalign>: location to fill in with the x alignment of the cell, or %NULL
4766 // <yalign>: location to fill in with the y alignment of the cell, or %NULL
4767 void get_alignment(/*out*/ float* xalign=null, /*out*/ float* yalign=null) {
4768 gtk_cell_renderer_get_alignment(&this, xalign, yalign);
4771 // Fills in @width and @height with the appropriate size of @cell.
4772 // <width>: location to fill in with the fixed width of the cell, or %NULL
4773 // <height>: location to fill in with the fixed height of the cell, or %NULL
4774 void get_fixed_size(/*out*/ int* width=null, /*out*/ int* height=null) {
4775 gtk_cell_renderer_get_fixed_size(&this, width, height);
4778 // Fills in @xpad and @ypad with the appropriate values of @cell.
4779 // <xpad>: location to fill in with the x padding of the cell, or %NULL
4780 // <ypad>: location to fill in with the y padding of the cell, or %NULL
4781 void get_padding(/*out*/ int* xpad=null, /*out*/ int* ypad=null) {
4782 gtk_cell_renderer_get_padding(&this, xpad, ypad);
4785 // Returns the cell renderer's sensitivity.
4786 // RETURNS: %TRUE if the cell renderer is sensitive
4787 int get_sensitive() {
4788 return gtk_cell_renderer_get_sensitive(&this);
4791 // Obtains the width and height needed to render the cell. Used by view
4792 // widgets to determine the appropriate size for the cell_area passed to
4793 // gtk_cell_renderer_render(). If @cell_area is not %NULL, fills in the
4794 // x and y offsets (if set) of the cell relative to this location.
4795 // Please note that the values set in @width and @height, as well as those
4796 // in @x_offset and @y_offset are inclusive of the xpad and ypad properties.
4797 // <widget>: the widget the renderer is rendering to
4798 // <cell_area>: The area a cell will be allocated, or %NULL
4799 // <x_offset>: location to return x offset of cell relative to @cell_area, or %NULL
4800 // <y_offset>: location to return y offset of cell relative to @cell_area, or %NULL
4801 // <width>: location to return width needed to render a cell, or %NULL
4802 // <height>: location to return height needed to render a cell, or %NULL
4803 void get_size(Widget* widget, Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) {
4804 gtk_cell_renderer_get_size(&this, widget, cell_area, x_offset, y_offset, width, height);
4807 // Returns the cell renderer's visibility.
4808 // RETURNS: %TRUE if the cell renderer is visible
4809 int get_visible() {
4810 return gtk_cell_renderer_get_visible(&this);
4813 // Invokes the virtual render function of the #GtkCellRenderer. The three
4814 // passed-in rectangles are areas of @window. Most renderers will draw within
4815 // should be honored with respect to @cell_area. @background_area includes the
4816 // blank space around the cell, and also the area containing the tree expander;
4817 // so the @background_area rectangles for all cells tile to cover the entire
4818 // <window>: a #GdkDrawable to draw to
4819 // <widget>: the widget owning @window
4820 // <background_area>: entire cell area (including tree expanders and maybe padding on the sides)
4821 // <cell_area>: area normally rendered by a cell renderer
4822 // <expose_area>: area that actually needs updating
4823 // <flags>: flags that affect rendering
4824 void render(Gdk2.Window* window, Widget* widget, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, Gdk2.Rectangle* expose_area, CellRendererState flags) {
4825 gtk_cell_renderer_render(&this, window, widget, background_area, cell_area, expose_area, flags);
4828 // Sets the renderer's alignment within its available space.
4829 // <xalign>: the x alignment of the cell renderer
4830 // <yalign>: the y alignment of the cell renderer
4831 void set_alignment(float xalign, float yalign) {
4832 gtk_cell_renderer_set_alignment(&this, xalign, yalign);
4835 // Sets the renderer size to be explicit, independent of the properties set.
4836 // <width>: the width of the cell renderer, or -1
4837 // <height>: the height of the cell renderer, or -1
4838 void set_fixed_size(int width, int height) {
4839 gtk_cell_renderer_set_fixed_size(&this, width, height);
4842 // Sets the renderer's padding.
4843 // <xpad>: the x padding of the cell renderer
4844 // <ypad>: the y padding of the cell renderer
4845 void set_padding(int xpad, int ypad) {
4846 gtk_cell_renderer_set_padding(&this, xpad, ypad);
4849 // Sets the cell renderer's sensitivity.
4850 // <sensitive>: the sensitivity of the cell
4851 void set_sensitive(int sensitive) {
4852 gtk_cell_renderer_set_sensitive(&this, sensitive);
4855 // Sets the cell renderer's visibility.
4856 // <visible>: the visibility of the cell
4857 void set_visible(int visible) {
4858 gtk_cell_renderer_set_visible(&this, visible);
4861 // Passes an activate event to the cell renderer for possible processing.
4862 // RETURNS: A new #GtkCellEditable, or %NULL
4863 // <event>: a #GdkEvent
4864 // <widget>: widget that received the event
4865 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
4866 // <background_area>: background area as passed to gtk_cell_renderer_render()
4867 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
4868 // <flags>: render flags
4869 CellEditable* start_editing(Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) {
4870 return gtk_cell_renderer_start_editing(&this, event, widget, path, background_area, cell_area, flags);
4873 // Informs the cell renderer that the editing is stopped.
4874 // If @canceled is %TRUE, the cell renderer will emit the
4875 // #GtkCellRenderer::editing-canceled signal.
4876 // This function should be called by cell renderer implementations
4877 // in response to the #GtkCellEditable::editing-done signal of
4878 // #GtkCellEditable.
4879 // <canceled>: %TRUE if the editing has been canceled
4880 void stop_editing(int canceled) {
4881 gtk_cell_renderer_stop_editing(&this, canceled);
4884 // This signal gets emitted when the user cancels the process of editing a
4885 // cell. For example, an editable cell renderer could be written to cancel
4886 // editing when the user presses Escape.
4887 extern (C) alias static void function (CellRenderer* this_, void* user_data=null) signal_editing_canceled;
4889 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4890 return super_.signal_connect!name(cb, data, cf);
4893 ulong signal_connect(string name:"editing-canceled", CB/*:signal_editing_canceled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4894 return signal_connect_data(&this, cast(char*)"editing-canceled",
4895 cast(GObject2.Callback)cb, data, null, cf);
4898 // This signal gets emitted when a cell starts to be edited.
4899 // The intended use of this signal is to do special setup
4900 // on @editable, e.g. adding a #GtkEntryCompletion or setting
4901 // up additional columns in a #GtkComboBox.
4902 // Note that GTK+ doesn't guarantee that cell renderers will
4903 // continue to use the same kind of widget for editing in future
4904 // releases, therefore you should check the type of @editable
4905 // before doing any specific setup, as in the following example:
4906 // |[
4907 // static void
4908 // text_editing_started (GtkCellRenderer *cell,
4909 // GtkCellEditable *editable,
4910 // const gchar *path,
4911 // gpointer data)
4912 // {
4913 // if (GTK_IS_ENTRY (editable))
4914 // {
4915 // GtkEntry *entry = GTK_ENTRY (editable);
4916 // /&ast; ... create a GtkEntryCompletion &ast;/
4917 // gtk_entry_set_completion (entry, completion);
4918 // }
4919 // }
4920 // ]|
4921 // <editable>: the #GtkCellEditable
4922 // <path>: the path identifying the edited cell
4923 extern (C) alias static void function (CellRenderer* this_, CellEditable* editable, char* path, void* user_data=null) signal_editing_started;
4924 ulong signal_connect(string name:"editing-started", CB/*:signal_editing_started*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4925 return signal_connect_data(&this, cast(char*)"editing-started",
4926 cast(GObject2.Callback)cb, data, null, cf);
4930 struct CellRendererAccel /* : CellRendererText */ {
4931 alias parent this;
4932 alias parent super_;
4933 alias parent cellrenderertext;
4934 CellRendererText parent;
4935 private uint accel_key;
4936 private Gdk2.ModifierType accel_mods;
4937 private uint keycode;
4938 private CellRendererAccelMode accel_mode;
4939 private Widget* edit_widget, grab_widget, sizing_label;
4942 // Creates a new #GtkCellRendererAccel.
4943 // RETURNS: the new cell renderer
4944 static CellRendererAccel* new_() {
4945 return gtk_cell_renderer_accel_new();
4948 // Gets emitted when the user has removed the accelerator.
4949 // <path_string>: the path identifying the row of the edited cell
4950 extern (C) alias static void function (CellRendererAccel* this_, char* path_string, void* user_data=null) signal_accel_cleared;
4952 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4953 return super_.signal_connect!name(cb, data, cf);
4956 ulong signal_connect(string name:"accel-cleared", CB/*:signal_accel_cleared*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4957 return signal_connect_data(&this, cast(char*)"accel-cleared",
4958 cast(GObject2.Callback)cb, data, null, cf);
4961 // Gets emitted when the user has selected a new accelerator.
4962 // <path_string>: the path identifying the row of the edited cell
4963 // <accel_key>: the new accelerator keyval
4964 // <accel_mods>: the new acclerator modifier mask
4965 // <hardware_keycode>: the keycode of the new accelerator
4966 extern (C) alias static void function (CellRendererAccel* this_, char* path_string, c_uint accel_key, Gdk2.ModifierType* accel_mods, c_uint hardware_keycode, void* user_data=null) signal_accel_edited;
4967 ulong signal_connect(string name:"accel-edited", CB/*:signal_accel_edited*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4968 return signal_connect_data(&this, cast(char*)"accel-edited",
4969 cast(GObject2.Callback)cb, data, null, cf);
4973 struct CellRendererAccelClass {
4974 CellRendererTextClass parent_class;
4975 extern (C) void function (CellRendererAccel* accel, char* path_string, uint accel_key, Gdk2.ModifierType accel_mods, uint hardware_keycode) accel_edited;
4976 extern (C) void function (CellRendererAccel* accel, char* path_string) accel_cleared;
4977 extern (C) void function () _gtk_reserved0;
4978 extern (C) void function () _gtk_reserved1;
4979 extern (C) void function () _gtk_reserved2;
4980 extern (C) void function () _gtk_reserved3;
4981 extern (C) void function () _gtk_reserved4;
4984 enum CellRendererAccelMode {
4985 GTK = 0,
4986 OTHER = 1
4988 struct CellRendererClass {
4989 ObjectClass parent_class;
4991 // <widget>: the widget the renderer is rendering to
4992 // <cell_area>: The area a cell will be allocated, or %NULL
4993 // <x_offset>: location to return x offset of cell relative to @cell_area, or %NULL
4994 // <y_offset>: location to return y offset of cell relative to @cell_area, or %NULL
4995 // <width>: location to return width needed to render a cell, or %NULL
4996 // <height>: location to return height needed to render a cell, or %NULL
4997 extern (C) void function (CellRenderer* cell, Widget* widget, Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) get_size;
4999 // <window>: a #GdkDrawable to draw to
5000 // <widget>: the widget owning @window
5001 // <background_area>: entire cell area (including tree expanders and maybe padding on the sides)
5002 // <cell_area>: area normally rendered by a cell renderer
5003 // <expose_area>: area that actually needs updating
5004 // <flags>: flags that affect rendering
5005 extern (C) void function (CellRenderer* cell, Gdk2.Drawable* window, Widget* widget, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, Gdk2.Rectangle* expose_area, CellRendererState flags) render;
5007 // RETURNS: %TRUE if the event was consumed/handled
5008 // <event>: a #GdkEvent
5009 // <widget>: widget that received the event
5010 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5011 // <background_area>: background area as passed to gtk_cell_renderer_render()
5012 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5013 // <flags>: render flags
5014 extern (C) int function (CellRenderer* cell, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) activate;
5016 // RETURNS: A new #GtkCellEditable, or %NULL
5017 // <event>: a #GdkEvent
5018 // <widget>: widget that received the event
5019 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5020 // <background_area>: background area as passed to gtk_cell_renderer_render()
5021 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5022 // <flags>: render flags
5023 extern (C) CellEditable* function (CellRenderer* cell, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) start_editing;
5024 extern (C) void function (CellRenderer* cell) editing_canceled;
5025 extern (C) void function (CellRenderer* cell, CellEditable* editable, char* path) editing_started;
5026 extern (C) void function () _gtk_reserved1;
5027 extern (C) void function () _gtk_reserved2;
5030 struct CellRendererCombo /* : CellRendererText */ {
5031 alias parent this;
5032 alias parent super_;
5033 alias parent cellrenderertext;
5034 CellRendererText parent;
5035 TreeModel* model;
5036 int text_column;
5037 int has_entry;
5038 private uint focus_out_id;
5041 // Creates a new #GtkCellRendererCombo.
5042 // Adjust how text is drawn using object properties.
5043 // Object properties can be set globally (with g_object_set()).
5044 // Also, with #GtkTreeViewColumn, you can bind a property to a value
5045 // in a #GtkTreeModel. For example, you can bind the "text" property
5046 // on the cell renderer to a string value in the model, thus rendering
5047 // a different string in each row of the #GtkTreeView.
5048 // RETURNS: the new cell renderer
5049 static CellRendererCombo* new_() {
5050 return gtk_cell_renderer_combo_new();
5053 // This signal is emitted each time after the user selected an item in
5054 // the combo box, either by using the mouse or the arrow keys. Contrary
5055 // to GtkComboBox, GtkCellRendererCombo::changed is not emitted for
5056 // changes made to a selected item in the entry. The argument @new_iter
5057 // corresponds to the newly selected item in the combo box and it is relative
5058 // to the GtkTreeModel set via the model property on GtkCellRendererCombo.
5059 // Note that as soon as you change the model displayed in the tree view,
5060 // the tree view will immediately cease the editing operating. This
5061 // means that you most probably want to refrain from changing the model
5062 // until the combo cell renderer emits the edited or editing_canceled signal.
5063 // <path_string>: a string of the path identifying the edited cell (relative to the tree view model)
5064 // <new_iter>: the new iter selected in the combo box (relative to the combo box model)
5065 extern (C) alias static void function (CellRendererCombo* this_, char* path_string, TreeIter* new_iter, void* user_data=null) signal_changed;
5067 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5068 return super_.signal_connect!name(cb, data, cf);
5071 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5072 return signal_connect_data(&this, cast(char*)"changed",
5073 cast(GObject2.Callback)cb, data, null, cf);
5077 struct CellRendererComboClass {
5078 CellRendererTextClass parent;
5081 enum CellRendererMode {
5082 INERT = 0,
5083 ACTIVATABLE = 1,
5084 EDITABLE = 2
5086 struct CellRendererPixbuf /* : CellRenderer */ {
5087 alias parent this;
5088 alias parent super_;
5089 alias parent cellrenderer;
5090 CellRenderer parent;
5091 private GdkPixbuf2.Pixbuf* pixbuf, pixbuf_expander_open, pixbuf_expander_closed;
5094 // Creates a new #GtkCellRendererPixbuf. Adjust rendering
5095 // parameters using object properties. Object properties can be set
5096 // globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
5097 // can bind a property to a value in a #GtkTreeModel. For example, you
5098 // can bind the "pixbuf" property on the cell renderer to a pixbuf value
5099 // in the model, thus rendering a different image in each row of the
5100 // #GtkTreeView.
5101 // RETURNS: the new cell renderer
5102 static CellRendererPixbuf* new_() {
5103 return gtk_cell_renderer_pixbuf_new();
5107 struct CellRendererPixbufClass {
5108 CellRendererClass parent_class;
5109 extern (C) void function () _gtk_reserved1;
5110 extern (C) void function () _gtk_reserved2;
5111 extern (C) void function () _gtk_reserved3;
5112 extern (C) void function () _gtk_reserved4;
5115 struct CellRendererProgress /* : CellRenderer */ {
5116 alias parent_instance this;
5117 alias parent_instance super_;
5118 alias parent_instance cellrenderer;
5119 CellRenderer parent_instance;
5120 private CellRendererProgressPrivate* priv;
5123 // Creates a new #GtkCellRendererProgress.
5124 // RETURNS: the new cell renderer
5125 static CellRendererProgress* new_() {
5126 return gtk_cell_renderer_progress_new();
5130 struct CellRendererProgressClass {
5131 CellRendererClass parent_class;
5132 extern (C) void function () _gtk_reserved1;
5133 extern (C) void function () _gtk_reserved2;
5134 extern (C) void function () _gtk_reserved3;
5135 extern (C) void function () _gtk_reserved4;
5138 struct CellRendererProgressPrivate {
5141 struct CellRendererSpin /* : CellRendererText */ {
5142 alias parent this;
5143 alias parent super_;
5144 alias parent cellrenderertext;
5145 CellRendererText parent;
5148 // Creates a new #GtkCellRendererSpin.
5149 // RETURNS: a new #GtkCellRendererSpin
5150 static CellRendererSpin* new_() {
5151 return gtk_cell_renderer_spin_new();
5155 struct CellRendererSpinClass {
5156 CellRendererTextClass parent;
5159 struct CellRendererSpinPrivate {
5163 // GtkCellRendererSpinner renders a spinning animation in a cell, very
5164 // similar to #GtkSpinner. It can often be used as an alternative
5165 // to a #GtkCellRendererProgress for displaying indefinite activity,
5166 // instead of actual progress.
5167 // To start the animation in a cell, set the #GtkCellRendererSpinner:active
5168 // property to %TRUE and increment the #GtkCellRendererSpinner:pulse property
5169 // at regular intervals. The usual way to set the cell renderer properties
5170 // for each cell is to bind them to columns in your tree model using e.g.
5171 // gtk_tree_view_column_add_attribute().
5172 struct CellRendererSpinner /* : CellRenderer */ {
5173 alias parent this;
5174 alias parent super_;
5175 alias parent cellrenderer;
5176 CellRenderer parent;
5177 CellRendererSpinnerPrivate* priv;
5180 // Returns a new cell renderer which will show a spinner to indicate
5181 // activity.
5182 // RETURNS: a new #GtkCellRenderer
5183 static CellRendererSpinner* new_() {
5184 return gtk_cell_renderer_spinner_new();
5188 struct CellRendererSpinnerClass {
5189 CellRendererClass parent_class;
5190 extern (C) void function () _gtk_reserved1;
5191 extern (C) void function () _gtk_reserved2;
5192 extern (C) void function () _gtk_reserved3;
5193 extern (C) void function () _gtk_reserved4;
5196 struct CellRendererSpinnerPrivate {
5199 enum CellRendererState {
5200 SELECTED = 1,
5201 PRELIT = 2,
5202 INSENSITIVE = 4,
5203 SORTED = 8,
5204 FOCUSED = 16
5206 struct CellRendererText /* : CellRenderer */ {
5207 alias parent this;
5208 alias parent super_;
5209 alias parent cellrenderer;
5210 CellRenderer parent;
5211 private char* text;
5212 private Pango.FontDescription* font;
5213 private double font_scale;
5214 private Pango.Color foreground, background;
5215 private Pango.AttrList* extra_attrs;
5216 private Pango.Underline underline_style;
5217 private int rise, fixed_height_rows;
5218 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5219 uint, "strikethrough", 1,
5220 uint, "editable", 1,
5221 uint, "scale_set", 1,
5222 uint, "foreground_set", 1,
5223 uint, "background_set", 1,
5224 uint, "underline_set", 1,
5225 uint, "rise_set", 1,
5226 uint, "strikethrough_set", 1,
5227 uint, "editable_set", 1,
5228 uint, "calc_fixed_height", 1,
5229 uint, "__dummy32A", 22));
5232 // Creates a new #GtkCellRendererText. Adjust how text is drawn using
5233 // object properties. Object properties can be
5234 // set globally (with g_object_set()). Also, with #GtkTreeViewColumn,
5235 // you can bind a property to a value in a #GtkTreeModel. For example,
5236 // you can bind the "text" property on the cell renderer to a string
5237 // value in the model, thus rendering a different string in each row
5238 // of the #GtkTreeView
5239 // RETURNS: the new cell renderer
5240 static CellRendererText* new_() {
5241 return gtk_cell_renderer_text_new();
5244 // Sets the height of a renderer to explicitly be determined by the "font" and
5245 // "y_pad" property set on it. Further changes in these properties do not
5246 // affect the height, so they must be accompanied by a subsequent call to this
5247 // function. Using this function is unflexible, and should really only be used
5248 // if calculating the size of a cell is too slow (ie, a massive number of cells
5249 // displayed). If @number_of_rows is -1, then the fixed height is unset, and
5250 // the height is determined by the properties again.
5251 // <number_of_rows>: Number of rows of text each cell renderer is allocated, or -1
5252 void set_fixed_height_from_font(int number_of_rows) {
5253 gtk_cell_renderer_text_set_fixed_height_from_font(&this, number_of_rows);
5256 // This signal is emitted after @renderer has been edited.
5257 // It is the responsibility of the application to update the model
5258 // and store @new_text at the position indicated by @path.
5259 // <path>: the path identifying the edited cell
5260 // <new_text>: the new text
5261 extern (C) alias static void function (CellRendererText* this_, char* path, char* new_text, void* user_data=null) signal_edited;
5263 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5264 return super_.signal_connect!name(cb, data, cf);
5267 ulong signal_connect(string name:"edited", CB/*:signal_edited*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5268 return signal_connect_data(&this, cast(char*)"edited",
5269 cast(GObject2.Callback)cb, data, null, cf);
5273 struct CellRendererTextClass {
5274 CellRendererClass parent_class;
5275 extern (C) void function (CellRendererText* cell_renderer_text, char* path, char* new_text) edited;
5276 extern (C) void function () _gtk_reserved1;
5277 extern (C) void function () _gtk_reserved2;
5278 extern (C) void function () _gtk_reserved3;
5279 extern (C) void function () _gtk_reserved4;
5282 struct CellRendererToggle /* : CellRenderer */ {
5283 alias parent this;
5284 alias parent super_;
5285 alias parent cellrenderer;
5286 CellRenderer parent;
5287 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5288 uint, "active", 1,
5289 uint, "activatable", 1,
5290 uint, "radio", 1,
5291 uint, "__dummy32A", 29));
5294 // Creates a new #GtkCellRendererToggle. Adjust rendering
5295 // parameters using object properties. Object properties can be set
5296 // globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
5297 // can bind a property to a value in a #GtkTreeModel. For example, you
5298 // can bind the "active" property on the cell renderer to a boolean value
5299 // in the model, thus causing the check button to reflect the state of
5300 // the model.
5301 // RETURNS: the new cell renderer
5302 static CellRendererToggle* new_() {
5303 return gtk_cell_renderer_toggle_new();
5306 // Returns whether the cell renderer is activatable. See
5307 // gtk_cell_renderer_toggle_set_activatable().
5308 // RETURNS: %TRUE if the cell renderer is activatable.
5309 int get_activatable() {
5310 return gtk_cell_renderer_toggle_get_activatable(&this);
5313 // Returns whether the cell renderer is active. See
5314 // gtk_cell_renderer_toggle_set_active().
5315 // RETURNS: %TRUE if the cell renderer is active.
5316 int get_active() {
5317 return gtk_cell_renderer_toggle_get_active(&this);
5320 // Returns whether we're rendering radio toggles rather than checkboxes.
5321 // RETURNS: %TRUE if we're rendering radio toggles rather than checkboxes
5322 int get_radio() {
5323 return gtk_cell_renderer_toggle_get_radio(&this);
5326 // Makes the cell renderer activatable.
5327 // <setting>: the value to set.
5328 void set_activatable(int setting) {
5329 gtk_cell_renderer_toggle_set_activatable(&this, setting);
5332 // Activates or deactivates a cell renderer.
5333 // <setting>: the value to set.
5334 void set_active(int setting) {
5335 gtk_cell_renderer_toggle_set_active(&this, setting);
5338 // If @radio is %TRUE, the cell renderer renders a radio toggle
5339 // (i.e. a toggle in a group of mutually-exclusive toggles).
5340 // If %FALSE, it renders a check toggle (a standalone boolean option).
5341 // This can be set globally for the cell renderer, or changed just
5342 // before rendering each cell in the model (for #GtkTreeView, you set
5343 // up a per-row setting using #GtkTreeViewColumn to associate model
5344 // columns with cell renderer properties).
5345 // <radio>: %TRUE to make the toggle look like a radio button
5346 void set_radio(int radio) {
5347 gtk_cell_renderer_toggle_set_radio(&this, radio);
5350 // The ::toggled signal is emitted when the cell is toggled.
5351 // <path>: string representation of #GtkTreePath describing the event location
5352 extern (C) alias static void function (CellRendererToggle* this_, char* path, void* user_data=null) signal_toggled;
5354 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5355 return super_.signal_connect!name(cb, data, cf);
5358 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5359 return signal_connect_data(&this, cast(char*)"toggled",
5360 cast(GObject2.Callback)cb, data, null, cf);
5364 struct CellRendererToggleClass {
5365 CellRendererClass parent_class;
5366 extern (C) void function (CellRendererToggle* cell_renderer_toggle, char* path) toggled;
5367 extern (C) void function () _gtk_reserved1;
5368 extern (C) void function () _gtk_reserved2;
5369 extern (C) void function () _gtk_reserved3;
5370 extern (C) void function () _gtk_reserved4;
5373 struct CellText {
5374 CellType type;
5375 short vertical, horizontal;
5376 Style* style;
5377 char* text;
5380 enum CellType {
5381 EMPTY = 0,
5382 TEXT = 1,
5383 PIXMAP = 2,
5384 PIXTEXT = 3,
5385 WIDGET = 4
5387 struct CellView /* : Widget */ {
5388 alias parent_instance this;
5389 alias parent_instance super_;
5390 alias parent_instance widget;
5391 Widget parent_instance;
5392 private CellViewPrivate* priv;
5395 // Creates a new #GtkCellView widget.
5396 // RETURNS: A newly created #GtkCellView widget.
5397 static CellView* new_() {
5398 return gtk_cell_view_new();
5401 // Creates a new #GtkCellView widget, adds a #GtkCellRendererText
5402 // to it, and makes it show @markup. The text can be
5403 // marked up with the <link linkend="PangoMarkupFormat">Pango text
5404 // markup language</link>.
5405 // RETURNS: A newly created #GtkCellView widget.
5406 // <markup>: the text to display in the cell view
5407 static CellView* new_with_markup(char* markup) {
5408 return gtk_cell_view_new_with_markup(markup);
5411 // Creates a new #GtkCellView widget, adds a #GtkCellRendererPixbuf
5412 // to it, and makes its show @pixbuf.
5413 // RETURNS: A newly created #GtkCellView widget.
5414 // <pixbuf>: the image to display in the cell view
5415 static CellView* new_with_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) {
5416 return gtk_cell_view_new_with_pixbuf(pixbuf);
5419 // Creates a new #GtkCellView widget, adds a #GtkCellRendererText
5420 // to it, and makes its show @text.
5421 // RETURNS: A newly created #GtkCellView widget.
5422 // <text>: the text to display in the cell view
5423 static CellView* new_with_text(char* text) {
5424 return gtk_cell_view_new_with_text(text);
5427 // Unintrospectable method: get_cell_renderers() / gtk_cell_view_get_cell_renderers()
5428 // Returns the cell renderers which have been added to @cell_view.
5429 // renderers has been newly allocated and should be freed with
5430 // g_list_free() when no longer needed.
5431 // RETURNS: a list of cell renderers. The list, but not the
5432 GLib2.List* get_cell_renderers() {
5433 return gtk_cell_view_get_cell_renderers(&this);
5436 // Returns a #GtkTreePath referring to the currently
5437 // displayed row. If no row is currently displayed,
5438 // %NULL is returned.
5439 // RETURNS: the currently displayed row or %NULL
5440 TreePath* /*new*/ get_displayed_row() {
5441 return gtk_cell_view_get_displayed_row(&this);
5444 // Returns the model for @cell_view. If no model is used %NULL is
5445 // returned.
5446 // RETURNS: a #GtkTreeModel used or %NULL
5447 TreeModel* get_model() {
5448 return gtk_cell_view_get_model(&this);
5451 // Sets @requisition to the size needed by @cell_view to display
5452 // the model row pointed to by @path.
5453 // RETURNS: %TRUE
5454 // <path>: a #GtkTreePath
5455 // <requisition>: return location for the size
5456 int get_size_of_row(TreePath* path, /*out*/ Requisition* requisition) {
5457 return gtk_cell_view_get_size_of_row(&this, path, requisition);
5460 // Sets the background color of @view.
5461 // <color>: the new background color
5462 void set_background_color(Gdk2.Color* color) {
5463 gtk_cell_view_set_background_color(&this, color);
5466 // Sets the row of the model that is currently displayed
5467 // by the #GtkCellView. If the path is unset, then the
5468 // contents of the cellview "stick" at their last value;
5469 // this is not normally a desired result, but may be
5470 // a needed intermediate state if say, the model for
5471 // the #GtkCellView becomes temporarily empty.
5472 // <path>: a #GtkTreePath or %NULL to unset.
5473 void set_displayed_row(TreePath* path=null) {
5474 gtk_cell_view_set_displayed_row(&this, path);
5477 // Sets the model for @cell_view. If @cell_view already has a model
5478 // set, it will remove it before setting the new model. If @model is
5479 // %NULL, then it will unset the old model.
5480 // <model>: a #GtkTreeModel
5481 void set_model(TreeModel* model=null) {
5482 gtk_cell_view_set_model(&this, model);
5486 struct CellViewClass {
5487 WidgetClass parent_class;
5490 struct CellViewPrivate {
5493 struct CellWidget {
5494 CellType type;
5495 short vertical, horizontal;
5496 Style* style;
5497 Widget* widget;
5500 struct CheckButton /* : ToggleButton */ {
5501 alias toggle_button this;
5502 alias toggle_button super_;
5503 alias toggle_button togglebutton;
5504 ToggleButton toggle_button;
5506 static CheckButton* new_() {
5507 return gtk_check_button_new();
5509 static CheckButton* new_with_label(char* label) {
5510 return gtk_check_button_new_with_label(label);
5513 // Creates a new #GtkCheckButton containing a label. The label
5514 // will be created using gtk_label_new_with_mnemonic(), so underscores
5515 // in @label indicate the mnemonic for the check button.
5516 // RETURNS: a new #GtkCheckButton
5517 // <label>: The text of the button, with an underscore in front of the mnemonic character
5518 static CheckButton* new_with_mnemonic(char* label) {
5519 return gtk_check_button_new_with_mnemonic(label);
5523 struct CheckButtonClass {
5524 ToggleButtonClass parent_class;
5525 extern (C) void function (CheckButton* check_button, Gdk2.Rectangle* area) draw_indicator;
5526 extern (C) void function () _gtk_reserved1;
5527 extern (C) void function () _gtk_reserved2;
5528 extern (C) void function () _gtk_reserved3;
5529 extern (C) void function () _gtk_reserved4;
5532 struct CheckMenuItem /* : MenuItem */ {
5533 alias menu_item this;
5534 alias menu_item super_;
5535 alias menu_item menuitem;
5536 MenuItem menu_item;
5537 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5538 uint, "active", 1,
5539 uint, "always_show_toggle", 1,
5540 uint, "inconsistent", 1,
5541 uint, "draw_as_radio", 1,
5542 uint, "__dummy32A", 28));
5544 static CheckMenuItem* new_() {
5545 return gtk_check_menu_item_new();
5547 static CheckMenuItem* new_with_label(char* label) {
5548 return gtk_check_menu_item_new_with_label(label);
5551 // Creates a new #GtkCheckMenuItem containing a label. The label
5552 // will be created using gtk_label_new_with_mnemonic(), so underscores
5553 // in @label indicate the mnemonic for the menu item.
5554 // RETURNS: a new #GtkCheckMenuItem
5555 // <label>: The text of the button, with an underscore in front of the mnemonic character
5556 static CheckMenuItem* new_with_mnemonic(char* label) {
5557 return gtk_check_menu_item_new_with_mnemonic(label);
5560 // Returns whether the check menu item is active. See
5561 // gtk_check_menu_item_set_active ().
5562 // RETURNS: %TRUE if the menu item is checked.
5563 int get_active() {
5564 return gtk_check_menu_item_get_active(&this);
5567 // Returns whether @check_menu_item looks like a #GtkRadioMenuItem
5568 // RETURNS: Whether @check_menu_item looks like a #GtkRadioMenuItem
5569 int get_draw_as_radio() {
5570 return gtk_check_menu_item_get_draw_as_radio(&this);
5573 // Retrieves the value set by gtk_check_menu_item_set_inconsistent().
5574 // RETURNS: %TRUE if inconsistent
5575 int get_inconsistent() {
5576 return gtk_check_menu_item_get_inconsistent(&this);
5578 void set_active(int is_active) {
5579 gtk_check_menu_item_set_active(&this, is_active);
5582 // Sets whether @check_menu_item is drawn like a #GtkRadioMenuItem
5583 // <draw_as_radio>: whether @check_menu_item is drawn like a #GtkRadioMenuItem
5584 void set_draw_as_radio(int draw_as_radio) {
5585 gtk_check_menu_item_set_draw_as_radio(&this, draw_as_radio);
5588 // If the user has selected a range of elements (such as some text or
5589 // spreadsheet cells) that are affected by a boolean setting, and the
5590 // current values in that range are inconsistent, you may want to
5591 // display the check in an "in between" state. This function turns on
5592 // "in between" display. Normally you would turn off the inconsistent
5593 // state again if the user explicitly selects a setting. This has to be
5594 // done manually, gtk_check_menu_item_set_inconsistent() only affects
5595 // visual appearance, it doesn't affect the semantics of the widget.
5596 // <setting>: %TRUE to display an "inconsistent" third state check
5597 void set_inconsistent(int setting) {
5598 gtk_check_menu_item_set_inconsistent(&this, setting);
5600 void set_show_toggle(int always) {
5601 gtk_check_menu_item_set_show_toggle(&this, always);
5603 void toggled() {
5604 gtk_check_menu_item_toggled(&this);
5606 extern (C) alias static void function (CheckMenuItem* this_, void* user_data=null) signal_toggled;
5608 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5609 return super_.signal_connect!name(cb, data, cf);
5612 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5613 return signal_connect_data(&this, cast(char*)"toggled",
5614 cast(GObject2.Callback)cb, data, null, cf);
5618 struct CheckMenuItemClass {
5619 MenuItemClass parent_class;
5620 extern (C) void function (CheckMenuItem* check_menu_item) toggled;
5621 extern (C) void function (CheckMenuItem* check_menu_item, Gdk2.Rectangle* area) draw_indicator;
5622 extern (C) void function () _gtk_reserved1;
5623 extern (C) void function () _gtk_reserved2;
5624 extern (C) void function () _gtk_reserved3;
5625 extern (C) void function () _gtk_reserved4;
5628 struct Clipboard /* : GObject.Object */ {
5629 alias method_parent this;
5630 alias method_parent super_;
5631 alias method_parent object;
5632 GObject2.Object method_parent;
5635 // Returns the clipboard object for the given selection.
5636 // See gtk_clipboard_get_for_display() for complete details.
5637 // already exists, a new one will be created. Once a clipboard
5638 // object has been created, it is persistent and, since it is
5639 // owned by GTK+, must not be freed or unreffed.
5640 // RETURNS: the appropriate clipboard object. If no clipboard
5641 // <selection>: a #GdkAtom which identifies the clipboard to use
5642 static Clipboard* get(Gdk2.Atom selection) {
5643 return gtk_clipboard_get(selection);
5646 // Returns the clipboard object for the given selection.
5647 // Cut/copy/paste menu items and keyboard shortcuts should use
5648 // the default clipboard, returned by passing %GDK_SELECTION_CLIPBOARD for @selection.
5649 // (%GDK_NONE is supported as a synonym for GDK_SELECTION_CLIPBOARD
5650 // for backwards compatibility reasons.)
5651 // The currently-selected object or text should be provided on the clipboard
5652 // identified by #GDK_SELECTION_PRIMARY. Cut/copy/paste menu items
5653 // conceptually copy the contents of the #GDK_SELECTION_PRIMARY clipboard
5654 // to the default clipboard, i.e. they copy the selection to what the
5655 // user sees as the clipboard.
5656 // (Passing #GDK_NONE is the same as using <literal>gdk_atom_intern
5657 // ("CLIPBOARD", FALSE)</literal>. See <ulink
5658 // url="http://www.freedesktop.org/Standards/clipboards-spec">
5659 // http://www.freedesktop.org/Standards/clipboards-spec</ulink>
5660 // for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY"
5661 // selections under the X window system. On Win32 the
5662 // #GDK_SELECTION_PRIMARY clipboard is essentially ignored.)
5663 // It's possible to have arbitrary named clipboards; if you do invent
5664 // new clipboards, you should prefix the selection name with an
5665 // underscore (because the ICCCM requires that nonstandard atoms are
5666 // underscore-prefixed), and namespace it as well. For example,
5667 // if your application called "Foo" has a special-purpose
5668 // clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
5669 // clipboard already exists, a new one will
5670 // be created. Once a clipboard object has
5671 // been created, it is persistent and, since
5672 // it is owned by GTK+, must not be freed or
5673 // unrefd.
5674 // RETURNS: the appropriate clipboard object. If no
5675 // <display>: the display for which the clipboard is to be retrieved or created
5676 // <selection>: a #GdkAtom which identifies the clipboard to use.
5677 static Clipboard* get_for_display(Gdk2.Display* display, Gdk2.Atom selection) {
5678 return gtk_clipboard_get_for_display(display, selection);
5681 // Clears the contents of the clipboard. Generally this should only
5682 // be called between the time you call gtk_clipboard_set_with_owner()
5683 // or gtk_clipboard_set_with_data(),
5684 // and when the @clear_func you supplied is called. Otherwise, the
5685 // clipboard may be owned by someone else.
5686 void clear() {
5687 gtk_clipboard_clear(&this);
5690 // Gets the #GdkDisplay associated with @clipboard
5691 // RETURNS: the #GdkDisplay associated with @clipboard
5692 Gdk2.Display* get_display() {
5693 return gtk_clipboard_get_display(&this);
5696 // If the clipboard contents callbacks were set with
5697 // gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
5698 // gtk_clipboard_clear() has not subsequently called, returns the owner set
5699 // by gtk_clipboard_set_with_owner().
5700 // RETURNS: the owner of the clipboard, if any; otherwise %NULL.
5701 GObject2.Object* get_owner() {
5702 return gtk_clipboard_get_owner(&this);
5705 // Unintrospectable method: request_contents() / gtk_clipboard_request_contents()
5706 // Requests the contents of clipboard as the given target.
5707 // When the results of the result are later received the supplied callback
5708 // will be called.
5709 // <target>: an atom representing the form into which the clipboard owner should convert the selection.
5710 // <callback>: A function to call when the results are received (or the retrieval fails). If the retrieval fails the length field of @selection_data will be negative.
5711 // <user_data>: user data to pass to @callback
5712 void request_contents(Gdk2.Atom target, ClipboardReceivedFunc callback, void* user_data) {
5713 gtk_clipboard_request_contents(&this, target, callback, user_data);
5716 // Unintrospectable method: request_image() / gtk_clipboard_request_image()
5717 // Requests the contents of the clipboard as image. When the image is
5718 // later received, it will be converted to a #GdkPixbuf, and
5719 // The @pixbuf parameter to @callback will contain the resulting
5720 // #GdkPixbuf if the request succeeded, or %NULL if it failed. This
5721 // could happen for various reasons, in particular if the clipboard
5722 // was empty or if the contents of the clipboard could not be
5723 // converted into an image.
5724 // <callback>: a function to call when the image is received, or the retrieval fails. (It will always be called one way or the other.)
5725 // <user_data>: user data to pass to @callback.
5726 void request_image(ClipboardImageReceivedFunc callback, void* user_data) {
5727 gtk_clipboard_request_image(&this, callback, user_data);
5730 // Unintrospectable method: request_rich_text() / gtk_clipboard_request_rich_text()
5731 // Requests the contents of the clipboard as rich text. When the rich
5732 // text is later received, @callback will be called.
5733 // The @text parameter to @callback will contain the resulting rich
5734 // text if the request succeeded, or %NULL if it failed. The @length
5735 // parameter will contain @text's length. This function can fail for
5736 // various reasons, in particular if the clipboard was empty or if the
5737 // contents of the clipboard could not be converted into rich text form.
5738 // <buffer>: a #GtkTextBuffer
5739 // <callback>: a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
5740 // <user_data>: user data to pass to @callback.
5741 void request_rich_text(TextBuffer* buffer, ClipboardRichTextReceivedFunc callback, void* user_data) {
5742 gtk_clipboard_request_rich_text(&this, buffer, callback, user_data);
5745 // Unintrospectable method: request_targets() / gtk_clipboard_request_targets()
5746 // Requests the contents of the clipboard as list of supported targets.
5747 // When the list is later received, @callback will be called.
5748 // The @targets parameter to @callback will contain the resulting targets if
5749 // the request succeeded, or %NULL if it failed.
5750 // <callback>: a function to call when the targets are received, or the retrieval fails. (It will always be called one way or the other.)
5751 // <user_data>: user data to pass to @callback.
5752 void request_targets(ClipboardTargetsReceivedFunc callback, void* user_data) {
5753 gtk_clipboard_request_targets(&this, callback, user_data);
5756 // Unintrospectable method: request_text() / gtk_clipboard_request_text()
5757 // Requests the contents of the clipboard as text. When the text is
5758 // later received, it will be converted to UTF-8 if necessary, and
5759 // The @text parameter to @callback will contain the resulting text if
5760 // the request succeeded, or %NULL if it failed. This could happen for
5761 // various reasons, in particular if the clipboard was empty or if the
5762 // contents of the clipboard could not be converted into text form.
5763 // <callback>: a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
5764 // <user_data>: user data to pass to @callback.
5765 void request_text(ClipboardTextReceivedFunc callback, void* user_data) {
5766 gtk_clipboard_request_text(&this, callback, user_data);
5769 // Unintrospectable method: request_uris() / gtk_clipboard_request_uris()
5770 // Requests the contents of the clipboard as URIs. When the URIs are
5771 // later received @callback will be called.
5772 // The @uris parameter to @callback will contain the resulting array of
5773 // URIs if the request succeeded, or %NULL if it failed. This could happen
5774 // for various reasons, in particular if the clipboard was empty or if the
5775 // contents of the clipboard could not be converted into URI form.
5776 // <callback>: a function to call when the URIs are received, or the retrieval fails. (It will always be called one way or the other.)
5777 // <user_data>: user data to pass to @callback.
5778 void request_uris(ClipboardURIReceivedFunc callback, void* user_data) {
5779 gtk_clipboard_request_uris(&this, callback, user_data);
5782 // Hints that the clipboard data should be stored somewhere when the
5783 // application exits or when gtk_clipboard_store () is called.
5784 // This value is reset when the clipboard owner changes.
5785 // Where the clipboard data is stored is platform dependent,
5786 // see gdk_display_store_clipboard () for more information.
5787 // <targets>: array containing information about which forms should be stored or %NULL to indicate that all forms should be stored.
5788 // <n_targets>: number of elements in @targets
5789 void set_can_store(TargetEntry* targets, int n_targets) {
5790 gtk_clipboard_set_can_store(&this, targets, n_targets);
5793 // Sets the contents of the clipboard to the given #GdkPixbuf.
5794 // GTK+ will take responsibility for responding for requests
5795 // for the image, and for converting the image into the
5796 // requested format.
5797 // <pixbuf>: a #GdkPixbuf
5798 void set_image(GdkPixbuf2.Pixbuf* pixbuf) {
5799 gtk_clipboard_set_image(&this, pixbuf);
5802 // Sets the contents of the clipboard to the given UTF-8 string. GTK+ will
5803 // make a copy of the text and take responsibility for responding
5804 // for requests for the text, and for converting the text into
5805 // the requested format.
5806 // <text>: a UTF-8 string.
5807 // <len>: length of @text, in bytes, or -1, in which case the length will be determined with <function>strlen()</function>.
5808 void set_text(char* text, int len) {
5809 gtk_clipboard_set_text(&this, text, len);
5812 // Unintrospectable method: set_with_data() / gtk_clipboard_set_with_data()
5813 // Virtually sets the contents of the specified clipboard by providing
5814 // a list of supported formats for the clipboard data and a function
5815 // to call to get the actual data when it is requested.
5816 // the clipboard data failed the provided callback functions
5817 // will be ignored.
5818 // RETURNS: %TRUE if setting the clipboard data succeeded. If setting
5819 // <targets>: array containing information about the available forms for the clipboard data
5820 // <n_targets>: number of elements in @targets
5821 // <get_func>: function to call to get the actual clipboard data
5822 // <clear_func>: when the clipboard contents are set again, this function will be called, and @get_func will not be subsequently called.
5823 // <user_data>: user data to pass to @get_func and @clear_func.
5824 int set_with_data(TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, void* user_data) {
5825 return gtk_clipboard_set_with_data(&this, targets, n_targets, get_func, clear_func, user_data);
5828 // Unintrospectable method: set_with_owner() / gtk_clipboard_set_with_owner()
5829 // Virtually sets the contents of the specified clipboard by providing
5830 // a list of supported formats for the clipboard data and a function
5831 // to call to get the actual data when it is requested.
5832 // The difference between this function and gtk_clipboard_set_with_data()
5833 // is that instead of an generic @user_data pointer, a #GObject is passed
5834 // in.
5835 // the clipboard data failed the provided callback functions
5836 // will be ignored.
5837 // RETURNS: %TRUE if setting the clipboard data succeeded. If setting
5838 // <targets>: array containing information about the available forms for the clipboard data
5839 // <n_targets>: number of elements in @targets
5840 // <get_func>: function to call to get the actual clipboard data
5841 // <clear_func>: when the clipboard contents are set again, this function will be called, and @get_func will not be subsequently called.
5842 // <owner>: an object that "owns" the data. This object will be passed to the callbacks when called.
5843 int set_with_owner(TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, GObject2.Object* owner) {
5844 return gtk_clipboard_set_with_owner(&this, targets, n_targets, get_func, clear_func, owner);
5847 // Stores the current clipboard data somewhere so that it will stay
5848 // around after the application has quit.
5849 void store() {
5850 gtk_clipboard_store(&this);
5853 // Requests the contents of the clipboard using the given target.
5854 // This function waits for the data to be received using the main
5855 // loop, so events, timeouts, etc, may be dispatched during the wait.
5856 // if retrieving the given target failed. If non-%NULL,
5857 // this value must be freed with gtk_selection_data_free()
5858 // when you are finished with it.
5859 // RETURNS: a newly-allocated #GtkSelectionData object or %NULL
5860 // <target>: an atom representing the form into which the clipboard owner should convert the selection.
5861 SelectionData* /*new*/ wait_for_contents(Gdk2.Atom target) {
5862 return gtk_clipboard_wait_for_contents(&this, target);
5865 // Requests the contents of the clipboard as image and converts
5866 // the result to a #GdkPixbuf. This function waits for
5867 // the data to be received using the main loop, so events,
5868 // timeouts, etc, may be dispatched during the wait.
5869 // be disposed with g_object_unref(), or %NULL if
5870 // retrieving the selection data failed. (This
5871 // could happen for various reasons, in particular
5872 // if the clipboard was empty or if the contents of
5873 // the clipboard could not be converted into an image.)
5874 // RETURNS: a newly-allocated #GdkPixbuf object which must
5875 GdkPixbuf2.Pixbuf* /*new*/ wait_for_image() {
5876 return gtk_clipboard_wait_for_image(&this);
5879 // Requests the contents of the clipboard as rich text. This function
5880 // waits for the data to be received using the main loop, so events,
5881 // timeouts, etc, may be dispatched during the wait.
5882 // newly-allocated binary block of data which must
5883 // be freed with g_free(), or %NULL if retrieving
5884 // the selection data failed. (This could happen
5885 // for various reasons, in particular if the
5886 // clipboard was empty or if the contents of the
5887 // clipboard could not be converted into text form.)
5888 // RETURNS: a
5889 // <buffer>: a #GtkTextBuffer
5890 // <format>: return location for the format of the returned data
5891 // <length>: return location for the length of the returned data
5892 ubyte* /*new*/ wait_for_rich_text(TextBuffer* buffer, Gdk2.Atom* format, /*out*/ size_t* length) {
5893 return gtk_clipboard_wait_for_rich_text(&this, buffer, format, length);
5896 // Returns a list of targets that are present on the clipboard, or %NULL
5897 // if there aren't any targets available. The returned list must be
5898 // freed with g_free().
5899 // This function waits for the data to be received using the main
5900 // loop, so events, timeouts, etc, may be dispatched during the wait.
5901 // otherwise %FALSE.
5902 // RETURNS: %TRUE if any targets are present on the clipboard,
5903 // <targets>: location to store an array of targets. The result stored here must be freed with g_free().
5904 // <n_targets>: location to store number of items in @targets.
5905 int wait_for_targets(/*out*/ Gdk2.Atom** targets, /*out*/ int* n_targets) {
5906 return gtk_clipboard_wait_for_targets(&this, targets, n_targets);
5909 // Requests the contents of the clipboard as text and converts
5910 // the result to UTF-8 if necessary. This function waits for
5911 // the data to be received using the main loop, so events,
5912 // timeouts, etc, may be dispatched during the wait.
5913 // be freed with g_free(), or %NULL if retrieving
5914 // the selection data failed. (This could happen
5915 // for various reasons, in particular if the
5916 // clipboard was empty or if the contents of the
5917 // clipboard could not be converted into text form.)
5918 // RETURNS: a newly-allocated UTF-8 string which must
5919 char* /*new*/ wait_for_text() {
5920 return gtk_clipboard_wait_for_text(&this);
5923 // Requests the contents of the clipboard as URIs. This function waits
5924 // for the data to be received using the main loop, so events,
5925 // timeouts, etc, may be dispatched during the wait.
5926 // %NULL-terminated array of strings which must
5927 // be freed with g_strfreev(), or %NULL if
5928 // retrieving the selection data failed. (This
5929 // could happen for various reasons, in particular
5930 // if the clipboard was empty or if the contents of
5931 // the clipboard could not be converted into URI form.)
5932 // RETURNS: a newly-allocated
5933 char** /*new*/ wait_for_uris() {
5934 return gtk_clipboard_wait_for_uris(&this);
5937 // Test to see if there is an image available to be pasted
5938 // This is done by requesting the TARGETS atom and checking
5939 // if it contains any of the supported image targets. This function
5940 // waits for the data to be received using the main loop, so events,
5941 // timeouts, etc, may be dispatched during the wait.
5942 // This function is a little faster than calling
5943 // gtk_clipboard_wait_for_image() since it doesn't need to retrieve
5944 // the actual image data.
5945 // RETURNS: %TRUE is there is an image available, %FALSE otherwise.
5946 int wait_is_image_available() {
5947 return gtk_clipboard_wait_is_image_available(&this);
5950 // Test to see if there is rich text available to be pasted
5951 // This is done by requesting the TARGETS atom and checking
5952 // if it contains any of the supported rich text targets. This function
5953 // waits for the data to be received using the main loop, so events,
5954 // timeouts, etc, may be dispatched during the wait.
5955 // This function is a little faster than calling
5956 // gtk_clipboard_wait_for_rich_text() since it doesn't need to retrieve
5957 // the actual text.
5958 // RETURNS: %TRUE is there is rich text available, %FALSE otherwise.
5959 // <buffer>: a #GtkTextBuffer
5960 int wait_is_rich_text_available(TextBuffer* buffer) {
5961 return gtk_clipboard_wait_is_rich_text_available(&this, buffer);
5964 // Checks if a clipboard supports pasting data of a given type. This
5965 // function can be used to determine if a "Paste" menu item should be
5966 // insensitive or not.
5967 // If you want to see if there's text available on the clipboard, use
5968 // gtk_clipboard_wait_is_text_available () instead.
5969 // RETURNS: %TRUE if the target is available, %FALSE otherwise.
5970 // <target>: A #GdkAtom indicating which target to look for.
5971 int wait_is_target_available(Gdk2.Atom target) {
5972 return gtk_clipboard_wait_is_target_available(&this, target);
5975 // Test to see if there is text available to be pasted
5976 // This is done by requesting the TARGETS atom and checking
5977 // if it contains any of the supported text targets. This function
5978 // waits for the data to be received using the main loop, so events,
5979 // timeouts, etc, may be dispatched during the wait.
5980 // This function is a little faster than calling
5981 // gtk_clipboard_wait_for_text() since it doesn't need to retrieve
5982 // the actual text.
5983 // RETURNS: %TRUE is there is text available, %FALSE otherwise.
5984 int wait_is_text_available() {
5985 return gtk_clipboard_wait_is_text_available(&this);
5988 // Test to see if there is a list of URIs available to be pasted
5989 // This is done by requesting the TARGETS atom and checking
5990 // if it contains the URI targets. This function
5991 // waits for the data to be received using the main loop, so events,
5992 // timeouts, etc, may be dispatched during the wait.
5993 // This function is a little faster than calling
5994 // gtk_clipboard_wait_for_uris() since it doesn't need to retrieve
5995 // the actual URI data.
5996 // RETURNS: %TRUE is there is an URI list available, %FALSE otherwise.
5997 int wait_is_uris_available() {
5998 return gtk_clipboard_wait_is_uris_available(&this);
6001 // The ::owner-change signal is emitted when GTK+ receives an
6002 // event that indicates that the ownership of the selection
6003 // associated with @clipboard has changed.
6004 // <event>: the @GdkEventOwnerChange event
6005 extern (C) alias static void function (Clipboard* this_, Gdk2.Event* event, void* user_data=null) signal_owner_change;
6007 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6008 return super_.signal_connect!name(cb, data, cf);
6011 ulong signal_connect(string name:"owner-change", CB/*:signal_owner_change*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6012 return signal_connect_data(&this, cast(char*)"owner-change",
6013 cast(GObject2.Callback)cb, data, null, cf);
6017 extern (C) alias void function (Clipboard* clipboard, void* user_data_or_owner) ClipboardClearFunc;
6019 extern (C) alias void function (Clipboard* clipboard, SelectionData* selection_data, uint info, void* user_data_or_owner) ClipboardGetFunc;
6021 extern (C) alias void function (Clipboard* clipboard, GdkPixbuf2.Pixbuf* pixbuf, void* data) ClipboardImageReceivedFunc;
6023 extern (C) alias void function (Clipboard* clipboard, SelectionData* selection_data, void* data) ClipboardReceivedFunc;
6025 extern (C) alias void function (Clipboard* clipboard, Gdk2.Atom format, ubyte* text, size_t length, void* data) ClipboardRichTextReceivedFunc;
6027 extern (C) alias void function (Clipboard* clipboard, Gdk2.Atom* atoms, int n_atoms, void* data) ClipboardTargetsReceivedFunc;
6029 extern (C) alias void function (Clipboard* clipboard, char* text, void* data) ClipboardTextReceivedFunc;
6031 extern (C) alias void function (Clipboard* clipboard, char** uris, void* data) ClipboardURIReceivedFunc;
6033 struct ColorButton /* : Button */ {
6034 alias button this;
6035 alias button super_;
6036 Button button;
6037 private ColorButtonPrivate* priv;
6040 // Creates a new color button. This returns a widget in the form of
6041 // a small button containing a swatch representing the current selected
6042 // color. When the button is clicked, a color-selection dialog will open,
6043 // allowing the user to select a color. The swatch will be updated to reflect
6044 // the new color when the user finishes.
6045 // RETURNS: a new color button.
6046 static ColorButton* new_() {
6047 return gtk_color_button_new();
6050 // Creates a new color button.
6051 // RETURNS: a new color button.
6052 // <color>: A #GdkColor to set the current color with.
6053 static ColorButton* new_with_color(Gdk2.Color* color) {
6054 return gtk_color_button_new_with_color(color);
6057 // Returns the current alpha value.
6058 // RETURNS: an integer between 0 and 65535.
6059 ushort get_alpha() {
6060 return gtk_color_button_get_alpha(&this);
6063 // Sets @color to be the current color in the #GtkColorButton widget.
6064 // <color>: a #GdkColor to fill in with the current color.
6065 void get_color(Gdk2.Color* color) {
6066 gtk_color_button_get_color(&this, color);
6069 // Gets the title of the color selection dialog.
6070 // RETURNS: An internal string, do not free the return value
6071 char* get_title() {
6072 return gtk_color_button_get_title(&this);
6075 // Does the color selection dialog use the alpha channel?
6076 // RETURNS: %TRUE if the color sample uses alpha channel, %FALSE if not.
6077 int get_use_alpha() {
6078 return gtk_color_button_get_use_alpha(&this);
6081 // Sets the current opacity to be @alpha.
6082 // <alpha>: an integer between 0 and 65535.
6083 void set_alpha(ushort alpha) {
6084 gtk_color_button_set_alpha(&this, alpha);
6087 // Sets the current color to be @color.
6088 // <color>: A #GdkColor to set the current color with.
6089 void set_color(Gdk2.Color* color) {
6090 gtk_color_button_set_color(&this, color);
6093 // Sets the title for the color selection dialog.
6094 // <title>: String containing new window title.
6095 void set_title(char* title) {
6096 gtk_color_button_set_title(&this, title);
6099 // Sets whether or not the color button should use the alpha channel.
6100 // <use_alpha>: %TRUE if color button should use alpha channel, %FALSE if not.
6101 void set_use_alpha(int use_alpha) {
6102 gtk_color_button_set_use_alpha(&this, use_alpha);
6105 // The ::color-set signal is emitted when the user selects a color.
6106 // When handling this signal, use gtk_color_button_get_color() and
6107 // gtk_color_button_get_alpha() to find out which color was just selected.
6108 // Note that this signal is only emitted when the <emphasis>user</emphasis>
6109 // changes the color. If you need to react to programmatic color changes
6110 // as well, use the notify::color signal.
6111 extern (C) alias static void function (ColorButton* this_, void* user_data=null) signal_color_set;
6113 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6114 return super_.signal_connect!name(cb, data, cf);
6117 ulong signal_connect(string name:"color-set", CB/*:signal_color_set*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6118 return signal_connect_data(&this, cast(char*)"color-set",
6119 cast(GObject2.Callback)cb, data, null, cf);
6123 struct ColorButtonClass {
6124 ButtonClass parent_class;
6125 extern (C) void function (ColorButton* cp) color_set;
6126 extern (C) void function () _gtk_reserved1;
6127 extern (C) void function () _gtk_reserved2;
6128 extern (C) void function () _gtk_reserved3;
6129 extern (C) void function () _gtk_reserved4;
6132 struct ColorButtonPrivate {
6135 struct ColorSelection /* : VBox */ {
6136 alias parent_instance this;
6137 alias parent_instance super_;
6138 alias parent_instance vbox;
6139 VBox parent_instance;
6140 void* private_data;
6143 // Creates a new GtkColorSelection.
6144 // RETURNS: a new #GtkColorSelection
6145 static ColorSelection* new_() {
6146 return gtk_color_selection_new();
6149 // Parses a color palette string; the string is a colon-separated
6150 // list of color names readable by gdk_color_parse().
6151 // RETURNS: %TRUE if a palette was successfully parsed.
6152 // <str>: a string encoding a color palette.
6153 // <colors>: return location for allocated array of #GdkColor.
6154 // <n_colors>: return location for length of array.
6155 static int palette_from_string(char* str, /*out*/ Gdk2.Color** colors, /*out*/ int* n_colors) {
6156 return gtk_color_selection_palette_from_string(str, colors, n_colors);
6159 // Encodes a palette as a string, useful for persistent storage.
6160 // RETURNS: allocated string encoding the palette.
6161 // <colors>: an array of colors.
6162 // <n_colors>: length of the array.
6163 static char* /*new*/ palette_to_string(Gdk2.Color* colors, int n_colors) {
6164 return gtk_color_selection_palette_to_string(colors, n_colors);
6167 // Unintrospectable function: set_change_palette_hook() / gtk_color_selection_set_change_palette_hook()
6168 // Installs a global function to be called whenever the user tries to
6169 // modify the palette in a color selection. This function should save
6170 // the new palette contents, and update the GtkSettings property
6171 // "gtk-color-palette" so all GtkColorSelection widgets will be modified.
6172 // Use gtk_color_selection_set_change_palette_with_screen_hook() instead.
6173 // RETURNS: the previous change palette hook (that was replaced).
6174 // <func>: a function to call when the custom palette needs saving.
6175 static ColorSelectionChangePaletteFunc set_change_palette_hook(ColorSelectionChangePaletteFunc func) {
6176 return gtk_color_selection_set_change_palette_hook(func);
6179 // Unintrospectable function: set_change_palette_with_screen_hook() / gtk_color_selection_set_change_palette_with_screen_hook()
6180 // Installs a global function to be called whenever the user tries to
6181 // modify the palette in a color selection. This function should save
6182 // the new palette contents, and update the GtkSettings property
6183 // "gtk-color-palette" so all GtkColorSelection widgets will be modified.
6184 // RETURNS: the previous change palette hook (that was replaced).
6185 // <func>: a function to call when the custom palette needs saving.
6186 static ColorSelectionChangePaletteWithScreenFunc set_change_palette_with_screen_hook(ColorSelectionChangePaletteWithScreenFunc func) {
6187 return gtk_color_selection_set_change_palette_with_screen_hook(func);
6190 // Sets @color to be the current color in the GtkColorSelection widget.
6191 // <color>: an array of 4 #gdouble to fill in with the current color.
6192 void get_color(double* color) {
6193 gtk_color_selection_get_color(&this, color);
6196 // Returns the current alpha value.
6197 // RETURNS: an integer between 0 and 65535.
6198 ushort get_current_alpha() {
6199 return gtk_color_selection_get_current_alpha(&this);
6202 // Sets @color to be the current color in the GtkColorSelection widget.
6203 // <color>: a #GdkColor to fill in with the current color.
6204 void get_current_color(/*out*/ Gdk2.Color* color) {
6205 gtk_color_selection_get_current_color(&this, color);
6208 // Determines whether the colorsel has an opacity control.
6209 // RETURNS: %TRUE if the @colorsel has an opacity control. %FALSE if it does't.
6210 int get_has_opacity_control() {
6211 return gtk_color_selection_get_has_opacity_control(&this);
6214 // Determines whether the color selector has a color palette.
6215 // RETURNS: %TRUE if the selector has a palette. %FALSE if it hasn't.
6216 int get_has_palette() {
6217 return gtk_color_selection_get_has_palette(&this);
6220 // Returns the previous alpha value.
6221 // RETURNS: an integer between 0 and 65535.
6222 ushort get_previous_alpha() {
6223 return gtk_color_selection_get_previous_alpha(&this);
6226 // Fills @color in with the original color value.
6227 // <color>: a #GdkColor to fill in with the original color value.
6228 void get_previous_color(/*out*/ Gdk2.Color* color) {
6229 gtk_color_selection_get_previous_color(&this, color);
6232 // Gets the current state of the @colorsel.
6233 // if the selection has stopped.
6234 // RETURNS: %TRUE if the user is currently dragging a color around, and %FALSE
6235 int is_adjusting() {
6236 return gtk_color_selection_is_adjusting(&this);
6239 // Sets the current color to be @color. The first time this is called, it will
6240 // also set the original color to be @color too.
6241 // <color>: an array of 4 doubles specifying the red, green, blue and opacity to set the current color to.
6242 void set_color(double* color) {
6243 gtk_color_selection_set_color(&this, color);
6246 // Sets the current opacity to be @alpha. The first time this is called, it will
6247 // also set the original opacity to be @alpha too.
6248 // <alpha>: an integer between 0 and 65535.
6249 void set_current_alpha(ushort alpha) {
6250 gtk_color_selection_set_current_alpha(&this, alpha);
6253 // Sets the current color to be @color. The first time this is called, it will
6254 // also set the original color to be @color too.
6255 // <color>: A #GdkColor to set the current color with.
6256 void set_current_color(Gdk2.Color* color) {
6257 gtk_color_selection_set_current_color(&this, color);
6260 // Sets the @colorsel to use or not use opacity.
6261 // <has_opacity>: %TRUE if @colorsel can set the opacity, %FALSE otherwise.
6262 void set_has_opacity_control(int has_opacity) {
6263 gtk_color_selection_set_has_opacity_control(&this, has_opacity);
6266 // Shows and hides the palette based upon the value of @has_palette.
6267 // <has_palette>: %TRUE if palette is to be visible, %FALSE otherwise.
6268 void set_has_palette(int has_palette) {
6269 gtk_color_selection_set_has_palette(&this, has_palette);
6272 // Sets the 'previous' alpha to be @alpha. This function should be called with
6273 // some hesitations, as it might seem confusing to have that alpha change.
6274 // <alpha>: an integer between 0 and 65535.
6275 void set_previous_alpha(ushort alpha) {
6276 gtk_color_selection_set_previous_alpha(&this, alpha);
6279 // Sets the 'previous' color to be @color. This function should be called with
6280 // some hesitations, as it might seem confusing to have that color change.
6281 // Calling gtk_color_selection_set_current_color() will also set this color the first
6282 // time it is called.
6283 // <color>: a #GdkColor to set the previous color with.
6284 void set_previous_color(Gdk2.Color* color) {
6285 gtk_color_selection_set_previous_color(&this, color);
6287 void set_update_policy(UpdateType policy) {
6288 gtk_color_selection_set_update_policy(&this, policy);
6290 extern (C) alias static void function (ColorSelection* this_, void* user_data=null) signal_color_changed;
6292 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6293 return super_.signal_connect!name(cb, data, cf);
6296 ulong signal_connect(string name:"color-changed", CB/*:signal_color_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6297 return signal_connect_data(&this, cast(char*)"color-changed",
6298 cast(GObject2.Callback)cb, data, null, cf);
6302 extern (C) alias void function (Gdk2.Color* colors, int n_colors) ColorSelectionChangePaletteFunc;
6304 extern (C) alias void function (Gdk2.Screen* screen, Gdk2.Color* colors, int n_colors) ColorSelectionChangePaletteWithScreenFunc;
6306 struct ColorSelectionClass {
6307 VBoxClass parent_class;
6308 extern (C) void function (ColorSelection* color_selection) color_changed;
6309 extern (C) void function () _gtk_reserved1;
6310 extern (C) void function () _gtk_reserved2;
6311 extern (C) void function () _gtk_reserved3;
6312 extern (C) void function () _gtk_reserved4;
6315 struct ColorSelectionDialog /* : Dialog */ {
6316 alias parent_instance this;
6317 alias parent_instance super_;
6318 alias parent_instance dialog;
6319 Dialog parent_instance;
6320 Widget* colorsel, ok_button, cancel_button, help_button;
6322 static ColorSelectionDialog* new_(char* title) {
6323 return gtk_color_selection_dialog_new(title);
6326 // Retrieves the #GtkColorSelection widget embedded in the dialog.
6327 // RETURNS: the embedded #GtkColorSelection
6328 Widget* get_color_selection() {
6329 return gtk_color_selection_dialog_get_color_selection(&this);
6333 struct ColorSelectionDialogClass {
6334 DialogClass parent_class;
6335 extern (C) void function () _gtk_reserved1;
6336 extern (C) void function () _gtk_reserved2;
6337 extern (C) void function () _gtk_reserved3;
6338 extern (C) void function () _gtk_reserved4;
6341 struct Combo /* : HBox */ {
6342 alias hbox this;
6343 alias hbox super_;
6344 HBox hbox;
6345 Widget* entry;
6346 private Widget* button, popup, popwin;
6347 Widget* list;
6348 private uint entry_change_id, list_change_id;
6349 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
6350 uint, "value_in_list", 1,
6351 uint, "ok_if_empty", 1,
6352 uint, "case_sensitive", 1,
6353 uint, "use_arrows", 1,
6354 uint, "use_arrows_always", 1,
6355 uint, "__dummy32A", 27));
6356 private ushort current_button;
6357 private uint activate_id;
6359 static Combo* new_() {
6360 return gtk_combo_new();
6362 void disable_activate() {
6363 gtk_combo_disable_activate(&this);
6365 void set_case_sensitive(int val) {
6366 gtk_combo_set_case_sensitive(&this, val);
6368 void set_item_string(Item* item, char* item_value) {
6369 gtk_combo_set_item_string(&this, item, item_value);
6371 void set_popdown_strings(GLib2.List* strings) {
6372 gtk_combo_set_popdown_strings(&this, strings);
6374 void set_use_arrows(int val) {
6375 gtk_combo_set_use_arrows(&this, val);
6377 void set_use_arrows_always(int val) {
6378 gtk_combo_set_use_arrows_always(&this, val);
6380 void set_value_in_list(int val, int ok_if_empty) {
6381 gtk_combo_set_value_in_list(&this, val, ok_if_empty);
6386 // A GtkComboBox is a widget that allows the user to choose from a list of
6387 // valid choices. The GtkComboBox displays the selected choice. When
6388 // activated, the GtkComboBox displays a popup which allows the user to
6389 // make a new choice. The style in which the selected value is displayed,
6390 // and the style of the popup is determined by the current theme. It may
6391 // be similar to a Windows-style combo box.
6392 // The GtkComboBox uses the model-view pattern; the list of valid choices
6393 // is specified in the form of a tree model, and the display of the choices
6394 // can be adapted to the data in the model by using cell renderers, as you
6395 // would in a tree view. This is possible since GtkComboBox implements the
6396 // #GtkCellLayout interface. The tree model holding the valid choices is
6397 // not restricted to a flat list, it can be a real tree, and the popup will
6398 // reflect the tree structure.
6399 // To allow the user to enter values not in the model, the 'has-entry'
6400 // property allows the GtkComboBox to contain a #GtkEntry. This entry
6401 // can be accessed by calling gtk_bin_get_child() on the combo box.
6402 // For a simple list of textual choices, the model-view API of GtkComboBox
6403 // can be a bit overwhelming. In this case, #GtkComboBoxText offers a
6404 // simple alternative. Both GtkComboBox and #GtkComboBoxText can contain
6405 // an entry.
6406 struct ComboBox /* : Bin */ {
6407 alias parent_instance this;
6408 alias parent_instance super_;
6409 alias parent_instance bin;
6410 Bin parent_instance;
6411 private ComboBoxPrivate* priv;
6414 // Creates a new empty #GtkComboBox.
6415 // RETURNS: A new #GtkComboBox.
6416 static ComboBox* new_() {
6417 return gtk_combo_box_new();
6420 // Convenience function which constructs a new text combo box, which is a
6421 // #GtkComboBox just displaying strings. If you use this function to create
6422 // a text combo box, you should only manipulate its data source with the
6423 // gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
6424 // gtk_combo_box_remove_text().
6425 // RETURNS: A new text combo box.
6426 static ComboBox* new_text() {
6427 return gtk_combo_box_new_text();
6430 // Creates a new empty #GtkComboBox with an entry.
6431 // RETURNS: A new #GtkComboBox.
6432 static ComboBox* new_with_entry() {
6433 return gtk_combo_box_new_with_entry();
6436 // Creates a new #GtkComboBox with the model initialized to @model.
6437 // RETURNS: A new #GtkComboBox.
6438 // <model>: A #GtkTreeModel.
6439 static ComboBox* new_with_model(TreeModel* model) {
6440 return gtk_combo_box_new_with_model(model);
6443 // Creates a new empty #GtkComboBox with an entry
6444 // and with the model initialized to @model.
6445 // RETURNS: A new #GtkComboBox
6446 static ComboBox* new_with_model_and_entry(TreeModel* model) {
6447 return gtk_combo_box_new_with_model_and_entry(model);
6450 // Appends @string to the list of strings stored in @combo_box. Note that
6451 // you can only use this function with combo boxes constructed with
6452 // gtk_combo_box_new_text().
6453 // <text>: A string
6454 void append_text(char* text) {
6455 gtk_combo_box_append_text(&this, text);
6458 // Returns the index of the currently active item, or -1 if there's no
6459 // active item. If the model is a non-flat treemodel, and the active item
6460 // is not an immediate child of the root of the tree, this function returns
6461 // <literal>gtk_tree_path_get_indices (path)[0]</literal>, where
6462 // <literal>path</literal> is the #GtkTreePath of the active item.
6463 // or -1 if there's no active item.
6464 // RETURNS: An integer which is the index of the currently active item,
6465 int get_active() {
6466 return gtk_combo_box_get_active(&this);
6469 // Sets @iter to point to the current active item, if it exists.
6470 // RETURNS: %TRUE, if @iter was set
6471 // <iter>: The uninitialized #GtkTreeIter
6472 int get_active_iter(/*out*/ TreeIter* iter) {
6473 return gtk_combo_box_get_active_iter(&this, iter);
6476 // Returns the currently active string in @combo_box or %NULL if none
6477 // is selected. Note that you can only use this function with combo
6478 // boxes constructed with gtk_combo_box_new_text() and with
6479 // #GtkComboBoxEntry<!-- -->s.
6480 // Must be freed with g_free().
6481 // gtk_combo_box_new_text() then you should now use #GtkComboBoxText and
6482 // gtk_combo_box_text_get_active_text() instead. Or if you used this with a
6483 // #GtkComboBoxEntry then you should now use #GtkComboBox with
6484 // #GtkComboBox:has-entry as %TRUE and use
6485 // gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combobox))).
6486 // RETURNS: a newly allocated string containing the currently active text.
6487 char* /*new*/ get_active_text() {
6488 return gtk_combo_box_get_active_text(&this);
6491 // Gets the current value of the :add-tearoffs property.
6492 // RETURNS: the current value of the :add-tearoffs property.
6493 int get_add_tearoffs() {
6494 return gtk_combo_box_get_add_tearoffs(&this);
6497 // Returns whether the combo box sets the dropdown button
6498 // sensitive or not when there are no items in the model.
6499 // is sensitive when the model is empty, %GTK_SENSITIVITY_OFF
6500 // if the button is always insensitive or
6501 // %GTK_SENSITIVITY_AUTO if it is only sensitive as long as
6502 // the model has one item to be selected.
6503 // RETURNS: %GTK_SENSITIVITY_ON if the dropdown button
6504 SensitivityType get_button_sensitivity() {
6505 return gtk_combo_box_get_button_sensitivity(&this);
6508 // Returns the column with column span information for @combo_box.
6509 // RETURNS: the column span column.
6510 int get_column_span_column() {
6511 return gtk_combo_box_get_column_span_column(&this);
6514 // Returns the column which @combo_box is using to get the strings
6515 // from to display in the internal entry.
6516 // RETURNS: A column in the data source model of @combo_box.
6517 int get_entry_text_column() {
6518 return gtk_combo_box_get_entry_text_column(&this);
6521 // Returns whether the combo box grabs focus when it is clicked
6522 // with the mouse. See gtk_combo_box_set_focus_on_click().
6523 // clicked with the mouse.
6524 // RETURNS: %TRUE if the combo box grabs focus when it is
6525 int get_focus_on_click() {
6526 return gtk_combo_box_get_focus_on_click(&this);
6529 // Returns whether the combo box has an entry.
6530 // RETURNS: whether there is an entry in @combo_box.
6531 int get_has_entry() {
6532 return gtk_combo_box_get_has_entry(&this);
6535 // Returns the #GtkTreeModel which is acting as data source for @combo_box.
6536 // during construction.
6537 // RETURNS: A #GtkTreeModel which was passed
6538 TreeModel* get_model() {
6539 return gtk_combo_box_get_model(&this);
6542 // Gets the accessible object corresponding to the combo box's popup.
6543 // This function is mostly intended for use by accessibility technologies;
6544 // applications should have little use for it.
6545 // to the combo box's popup.
6546 // RETURNS: the accessible object corresponding
6547 Atk.Object* get_popup_accessible() {
6548 return gtk_combo_box_get_popup_accessible(&this);
6551 // Unintrospectable method: get_row_separator_func() / gtk_combo_box_get_row_separator_func()
6552 // Returns the current row separator function.
6553 // RETURNS: the current row separator function.
6554 TreeViewRowSeparatorFunc get_row_separator_func() {
6555 return gtk_combo_box_get_row_separator_func(&this);
6558 // Returns the column with row span information for @combo_box.
6559 // RETURNS: the row span column.
6560 int get_row_span_column() {
6561 return gtk_combo_box_get_row_span_column(&this);
6564 // Gets the current title of the menu in tearoff mode. See
6565 // gtk_combo_box_set_add_tearoffs().
6566 // string which must not be freed.
6567 // RETURNS: the menu's title in tearoff mode. This is an internal copy of the
6568 char* get_title() {
6569 return gtk_combo_box_get_title(&this);
6572 // Returns the wrap width which is used to determine the number of columns
6573 // for the popup menu. If the wrap width is larger than 1, the combo box
6574 // is in table mode.
6575 // RETURNS: the wrap width.
6576 int get_wrap_width() {
6577 return gtk_combo_box_get_wrap_width(&this);
6580 // Inserts @string at @position in the list of strings stored in @combo_box.
6581 // Note that you can only use this function with combo boxes constructed
6582 // with gtk_combo_box_new_text().
6583 // <position>: An index to insert @text
6584 // <text>: A string
6585 void insert_text(int position, char* text) {
6586 gtk_combo_box_insert_text(&this, position, text);
6589 // Hides the menu or dropdown list of @combo_box.
6590 // This function is mostly intended for use by accessibility technologies;
6591 // applications should have little use for it.
6592 void popdown() {
6593 gtk_combo_box_popdown(&this);
6596 // Pops up the menu or dropdown list of @combo_box.
6597 // This function is mostly intended for use by accessibility technologies;
6598 // applications should have little use for it.
6599 void popup() {
6600 gtk_combo_box_popup(&this);
6603 // Prepends @string to the list of strings stored in @combo_box. Note that
6604 // you can only use this function with combo boxes constructed with
6605 // gtk_combo_box_new_text().
6606 // <text>: A string
6607 void prepend_text(char* text) {
6608 gtk_combo_box_prepend_text(&this, text);
6611 // Removes the string at @position from @combo_box. Note that you can only use
6612 // this function with combo boxes constructed with gtk_combo_box_new_text().
6613 // <position>: Index of the item to remove
6614 void remove_text(int position) {
6615 gtk_combo_box_remove_text(&this, position);
6618 // Sets the active item of @combo_box to be the item at @index.
6619 // <index_>: An index in the model passed during construction, or -1 to have no active item
6620 void set_active(int index_) {
6621 gtk_combo_box_set_active(&this, index_);
6624 // Sets the current active item to be the one referenced by @iter, or
6625 // unsets the active item if @iter is %NULL.
6626 // <iter>: The #GtkTreeIter, or %NULL
6627 void set_active_iter(TreeIter* iter=null) {
6628 gtk_combo_box_set_active_iter(&this, iter);
6631 // Sets whether the popup menu should have a tearoff
6632 // menu item.
6633 // <add_tearoffs>: %TRUE to add tearoff menu items
6634 void set_add_tearoffs(int add_tearoffs) {
6635 gtk_combo_box_set_add_tearoffs(&this, add_tearoffs);
6638 // Sets whether the dropdown button of the combo box should be
6639 // always sensitive (%GTK_SENSITIVITY_ON), never sensitive (%GTK_SENSITIVITY_OFF)
6640 // or only if there is at least one item to display (%GTK_SENSITIVITY_AUTO).
6641 // <sensitivity>: specify the sensitivity of the dropdown button
6642 void set_button_sensitivity(SensitivityType sensitivity) {
6643 gtk_combo_box_set_button_sensitivity(&this, sensitivity);
6646 // Sets the column with column span information for @combo_box to be
6647 // how many columns an item should span.
6648 // <column_span>: A column in the model passed during construction
6649 void set_column_span_column(int column_span) {
6650 gtk_combo_box_set_column_span_column(&this, column_span);
6653 // Sets the model column which @combo_box should use to get strings from
6654 // to be @text_column. The column @text_column in the model of @combo_box
6655 // must be of type %G_TYPE_STRING.
6656 // This is only relevant if @combo_box has been created with
6657 // #GtkComboBox:has-entry as %TRUE.
6658 // <text_column>: A column in @model to get the strings from for the internal entry
6659 void set_entry_text_column(int text_column) {
6660 gtk_combo_box_set_entry_text_column(&this, text_column);
6663 // Sets whether the combo box will grab focus when it is clicked with
6664 // the mouse. Making mouse clicks not grab focus is useful in places
6665 // like toolbars where you don't want the keyboard focus removed from
6666 // the main area of the application.
6667 // <focus_on_click>: whether the combo box grabs focus when clicked with the mouse
6668 void set_focus_on_click(int focus_on_click) {
6669 gtk_combo_box_set_focus_on_click(&this, focus_on_click);
6672 // Sets the model used by @combo_box to be @model. Will unset a previously set
6673 // model (if applicable). If model is %NULL, then it will unset the model.
6674 // Note that this function does not clear the cell renderers, you have to
6675 // call gtk_cell_layout_clear() yourself if you need to set up different
6676 // cell renderers for the new model.
6677 // <model>: A #GtkTreeModel
6678 void set_model(TreeModel* model=null) {
6679 gtk_combo_box_set_model(&this, model);
6682 // Sets the row separator function, which is used to determine
6683 // whether a row should be drawn as a separator. If the row separator
6684 // function is %NULL, no separators are drawn. This is the default value.
6685 // <func>: a #GtkTreeViewRowSeparatorFunc
6686 // <data>: user data to pass to @func, or %NULL
6687 // <destroy>: destroy notifier for @data, or %NULL
6688 void set_row_separator_func(TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
6689 gtk_combo_box_set_row_separator_func(&this, func, data, destroy);
6692 // Sets the column with row span information for @combo_box to be @row_span.
6693 // The row span column contains integers which indicate how many rows
6694 // an item should span.
6695 // <row_span>: A column in the model passed during construction.
6696 void set_row_span_column(int row_span) {
6697 gtk_combo_box_set_row_span_column(&this, row_span);
6700 // Sets the menu's title in tearoff mode.
6701 // <title>: a title for the menu in tearoff mode
6702 void set_title(char* title) {
6703 gtk_combo_box_set_title(&this, title);
6706 // Sets the wrap width of @combo_box to be @width. The wrap width is basically
6707 // the preferred number of columns when you want the popup to be layed out
6708 // in a table.
6709 // <width>: Preferred number of columns
6710 void set_wrap_width(int width) {
6711 gtk_combo_box_set_wrap_width(&this, width);
6714 // The changed signal is emitted when the active
6715 // item is changed. The can be due to the user selecting
6716 // a different item from the list, or due to a
6717 // call to gtk_combo_box_set_active_iter().
6718 // It will also be emitted while typing into a GtkComboBoxEntry,
6719 // as well as when selecting an item from the GtkComboBoxEntry's list.
6720 extern (C) alias static void function (ComboBox* this_, void* user_data=null) signal_changed;
6722 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6723 return super_.signal_connect!name(cb, data, cf);
6726 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6727 return signal_connect_data(&this, cast(char*)"changed",
6728 cast(GObject2.Callback)cb, data, null, cf);
6731 // The ::move-active signal is a
6732 // <link linkend="keybinding-signals">keybinding signal</link>
6733 // which gets emitted to move the active selection.
6734 // <scroll_type>: a #GtkScrollType
6735 extern (C) alias static void function (ComboBox* this_, ScrollType* scroll_type, void* user_data=null) signal_move_active;
6736 ulong signal_connect(string name:"move-active", CB/*:signal_move_active*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6737 return signal_connect_data(&this, cast(char*)"move-active",
6738 cast(GObject2.Callback)cb, data, null, cf);
6741 // The ::popdown signal is a
6742 // <link linkend="keybinding-signals">keybinding signal</link>
6743 // which gets emitted to popdown the combo box list.
6744 // The default bindings for this signal are Alt+Up and Escape.
6745 extern (C) alias static c_int function (ComboBox* this_, void* user_data=null) signal_popdown;
6746 ulong signal_connect(string name:"popdown", CB/*:signal_popdown*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6747 return signal_connect_data(&this, cast(char*)"popdown",
6748 cast(GObject2.Callback)cb, data, null, cf);
6751 // The ::popup signal is a
6752 // <link linkend="keybinding-signals">keybinding signal</link>
6753 // which gets emitted to popup the combo box list.
6754 // The default binding for this signal is Alt+Down.
6755 extern (C) alias static void function (ComboBox* this_, void* user_data=null) signal_popup;
6756 ulong signal_connect(string name:"popup", CB/*:signal_popup*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6757 return signal_connect_data(&this, cast(char*)"popup",
6758 cast(GObject2.Callback)cb, data, null, cf);
6762 struct ComboBoxClass {
6763 BinClass parent_class;
6764 extern (C) void function (ComboBox* combo_box) changed;
6765 // RETURNS: a newly allocated string containing the currently active text.
6766 extern (C) char* /*new*/ function (ComboBox* combo_box) get_active_text;
6767 extern (C) void function () _gtk_reserved0;
6768 extern (C) void function () _gtk_reserved1;
6769 extern (C) void function () _gtk_reserved2;
6772 struct ComboBoxEntry /* : ComboBox */ {
6773 alias parent_instance this;
6774 alias parent_instance super_;
6775 alias parent_instance combobox;
6776 ComboBox parent_instance;
6777 private ComboBoxEntryPrivate* priv;
6780 // Creates a new #GtkComboBoxEntry which has a #GtkEntry as child. After
6781 // construction, you should set a model using gtk_combo_box_set_model() and a
6782 // text column using gtk_combo_box_entry_set_text_column().
6783 // RETURNS: A new #GtkComboBoxEntry.
6784 static ComboBoxEntry* new_() {
6785 return gtk_combo_box_entry_new();
6788 // Convenience function which constructs a new editable text combo box, which
6789 // is a #GtkComboBoxEntry just displaying strings. If you use this function to
6790 // create a text combo box, you should only manipulate its data source with
6791 // gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
6792 // gtk_combo_box_remove_text().
6793 // RETURNS: A new text #GtkComboBoxEntry.
6794 static ComboBoxEntry* new_text() {
6795 return gtk_combo_box_entry_new_text();
6798 // Creates a new #GtkComboBoxEntry which has a #GtkEntry as child and a list
6799 // of strings as popup. You can get the #GtkEntry from a #GtkComboBoxEntry
6800 // using GTK_ENTRY (GTK_BIN (combo_box_entry)->child). To add and remove
6801 // strings from the list, just modify @model using its data manipulation
6802 // API.
6803 // RETURNS: A new #GtkComboBoxEntry.
6804 // <model>: A #GtkTreeModel.
6805 // <text_column>: A column in @model to get the strings from.
6806 static ComboBoxEntry* new_with_model(TreeModel* model, int text_column) {
6807 return gtk_combo_box_entry_new_with_model(model, text_column);
6810 // Returns the column which @entry_box is using to get the strings from.
6811 // RETURNS: A column in the data source model of @entry_box.
6812 int get_text_column() {
6813 return gtk_combo_box_entry_get_text_column(&this);
6816 // Sets the model column which @entry_box should use to get strings from
6817 // to be @text_column.
6818 // <text_column>: A column in @model to get the strings from.
6819 void set_text_column(int text_column) {
6820 gtk_combo_box_entry_set_text_column(&this, text_column);
6824 struct ComboBoxEntryClass {
6825 ComboBoxClass parent_class;
6826 extern (C) void function () _gtk_reserved0;
6827 extern (C) void function () _gtk_reserved1;
6828 extern (C) void function () _gtk_reserved2;
6829 extern (C) void function () _gtk_reserved3;
6832 struct ComboBoxEntryPrivate {
6835 struct ComboBoxPrivate {
6839 // A GtkComboBoxText is a simple variant of #GtkComboBox that hides
6840 // the model-view complexity for simple text-only use cases.
6841 // To create a GtkComboBoxText, use gtk_combo_box_text_new() or
6842 // gtk_combo_box_text_new_with_entry().
6843 // You can add items to a GtkComboBoxText with
6844 // gtk_combo_box_text_append_text(), gtk_combo_box_text_insert_text()
6845 // or gtk_combo_box_text_prepend_text() and remove options with
6846 // gtk_combo_box_text_remove().
6847 // If the GtkComboBoxText contains an entry (via the 'has-entry' property),
6848 // its contents can be retrieved using gtk_combo_box_text_get_active_text().
6849 // The entry itself can be accessed by calling gtk_bin_get_child() on the
6850 // combo box.
6851 // <refsect2 id="GtkComboBoxText-BUILDER-UI">
6852 // <title>GtkComboBoxText as GtkBuildable</title>
6853 // <para>
6854 // The GtkComboBoxText implementation of the GtkBuildable interface
6855 // supports adding items directly using the &lt;items&gt element
6856 // and specifying &lt;item&gt; elements for each item. Each &lt;item&gt;
6857 // element supports the regular translation attributes "translatable",
6858 // "context" and "comments".
6859 // </para>
6860 // <example>
6861 // <title>A UI definition fragment specifying GtkComboBoxText items</title>
6862 // <programlisting><![CDATA[
6863 // <object class="GtkComboBoxText">
6864 // <items>
6865 // <item translatable="yes">Factory</item>
6866 // <item translatable="yes">Home</item>
6867 // <item translatable="yes">Subway</item>
6868 // </items>
6869 // </object>
6870 // ]]></programlisting>
6871 // </example>
6872 // </refsect2>
6873 struct ComboBoxText /* : ComboBox */ {
6874 alias parent_instance this;
6875 alias parent_instance super_;
6876 alias parent_instance combobox;
6877 ComboBox parent_instance;
6878 private ComboBoxTextPrivate* priv;
6881 // Creates a new #GtkComboBoxText, which is a #GtkComboBox just displaying
6882 // strings. See gtk_combo_box_entry_new_with_text().
6883 // RETURNS: A new #GtkComboBoxText
6884 static ComboBoxText* new_() {
6885 return gtk_combo_box_text_new();
6888 // Creates a new #GtkComboBoxText, which is a #GtkComboBox just displaying
6889 // strings. The combo box created by this function has an entry.
6890 // RETURNS: a new #GtkComboBoxText
6891 static ComboBoxText* new_with_entry() {
6892 return gtk_combo_box_text_new_with_entry();
6895 // Appends @string to the list of strings stored in @combo_box.
6896 // <text>: A string
6897 void append_text(char* text) {
6898 gtk_combo_box_text_append_text(&this, text);
6901 // Returns the currently active string in @combo_box, or %NULL
6902 // if none is selected. If @combo_box contains an entry, this
6903 // function will return its contents (which will not necessarily
6904 // be an item from the list).
6905 // active text. Must be freed with g_free().
6906 // RETURNS: a newly allocated string containing the currently
6907 char* /*new*/ get_active_text() {
6908 return gtk_combo_box_text_get_active_text(&this);
6911 // Inserts @string at @position in the list of strings stored in @combo_box.
6912 // <position>: An index to insert @text
6913 // <text>: A string
6914 void insert_text(int position, char* text) {
6915 gtk_combo_box_text_insert_text(&this, position, text);
6918 // Prepends @string to the list of strings stored in @combo_box.
6919 // <text>: A string
6920 void prepend_text(char* text) {
6921 gtk_combo_box_text_prepend_text(&this, text);
6924 // Removes the string at @position from @combo_box.
6925 // <position>: Index of the item to remove
6926 void remove(int position) {
6927 gtk_combo_box_text_remove(&this, position);
6931 struct ComboBoxTextClass {
6932 ComboBoxClass parent_class;
6933 extern (C) void function () _gtk_reserved1;
6934 extern (C) void function () _gtk_reserved2;
6935 extern (C) void function () _gtk_reserved3;
6936 extern (C) void function () _gtk_reserved4;
6939 struct ComboBoxTextPrivate {
6942 struct ComboClass {
6943 HBoxClass parent_class;
6944 extern (C) void function () _gtk_reserved1;
6945 extern (C) void function () _gtk_reserved2;
6946 extern (C) void function () _gtk_reserved3;
6947 extern (C) void function () _gtk_reserved4;
6950 struct Container /* : Widget */ {
6951 alias widget this;
6952 alias widget super_;
6953 Widget widget;
6954 Widget* focus_child;
6955 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
6956 uint, "border_width", 16,
6957 uint, "need_resize", 1,
6958 uint, "resize_mode", 2,
6959 uint, "reallocate_redraws", 1,
6960 uint, "has_focus_chain", 1,
6961 uint, "__dummy32A", 11));
6964 // Adds @widget to @container. Typically used for simple containers
6965 // such as #GtkWindow, #GtkFrame, or #GtkButton; for more complicated
6966 // layout containers such as #GtkBox or #GtkTable, this function will
6967 // pick default packing parameters that may not be correct. So
6968 // consider functions such as gtk_box_pack_start() and
6969 // gtk_table_attach() as an alternative to gtk_container_add() in
6970 // those cases. A widget may be added to only one container at a time;
6971 // you can't place the same widget inside two different containers.
6972 // <widget>: a widget to be placed inside @container
6973 void add(Widget* widget) {
6974 gtk_container_add(&this, widget);
6977 // Unintrospectable method: add_with_properties() / gtk_container_add_with_properties()
6978 // Adds @widget to @container, setting child properties at the same time.
6979 // See gtk_container_add() and gtk_container_child_set() for more details.
6980 // <widget>: a widget to be placed inside @container
6981 // <first_prop_name>: the name of the first child property to set
6982 /+ Not available -- variadic methods unsupported - use the C function directly.
6983 alias gtk_container_add_with_properties add_with_properties; // Variadic
6985 void check_resize() {
6986 gtk_container_check_resize(&this);
6989 // Unintrospectable method: child_get() / gtk_container_child_get()
6990 // Gets the values of one or more child properties for @child and @container.
6991 // <child>: a widget which is a child of @container
6992 // <first_prop_name>: the name of the first property to get
6993 /+ Not available -- variadic methods unsupported - use the C function directly.
6994 alias gtk_container_child_get child_get; // Variadic
6997 // Gets the value of a child property for @child and @container.
6998 // <child>: a widget which is a child of @container
6999 // <property_name>: the name of the property to get
7000 // <value>: a location to return the value
7001 void child_get_property(Widget* child, char* property_name, GObject2.Value* value) {
7002 gtk_container_child_get_property(&this, child, property_name, value);
7005 // Unintrospectable method: child_get_valist() / gtk_container_child_get_valist()
7006 // Gets the values of one or more child properties for @child and @container.
7007 // <child>: a widget which is a child of @container
7008 // <first_property_name>: the name of the first property to get
7009 // <var_args>: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
7010 void child_get_valist(Widget* child, char* first_property_name, va_list var_args) {
7011 gtk_container_child_get_valist(&this, child, first_property_name, var_args);
7014 // Unintrospectable method: child_set() / gtk_container_child_set()
7015 // Sets one or more child properties for @child and @container.
7016 // <child>: a widget which is a child of @container
7017 // <first_prop_name>: the name of the first property to set
7018 /+ Not available -- variadic methods unsupported - use the C function directly.
7019 alias gtk_container_child_set child_set; // Variadic
7022 // Sets a child property for @child and @container.
7023 // <child>: a widget which is a child of @container
7024 // <property_name>: the name of the property to set
7025 // <value>: the value to set the property to
7026 void child_set_property(Widget* child, char* property_name, GObject2.Value* value) {
7027 gtk_container_child_set_property(&this, child, property_name, value);
7030 // Unintrospectable method: child_set_valist() / gtk_container_child_set_valist()
7031 // Sets one or more child properties for @child and @container.
7032 // <child>: a widget which is a child of @container
7033 // <first_property_name>: the name of the first property to set
7034 // <var_args>: a %NULL-terminated list of property names and values, starting with @first_prop_name
7035 void child_set_valist(Widget* child, char* first_property_name, va_list var_args) {
7036 gtk_container_child_set_valist(&this, child, first_property_name, var_args);
7039 // Returns the type of the children supported by the container.
7040 // Note that this may return %G_TYPE_NONE to indicate that no more
7041 // children can be added, e.g. for a #GtkPaned which already has two
7042 // children.
7043 // RETURNS: a #GType.
7044 Type child_type() {
7045 return gtk_container_child_type(&this);
7048 // Unintrospectable method: forall() / gtk_container_forall()
7049 // Invokes @callback on each child of @container, including children
7050 // that are considered "internal" (implementation details of the
7051 // container). "Internal" children generally weren't added by the user
7052 // of the container, but were added by the container implementation
7053 // itself. Most applications should use gtk_container_foreach(),
7054 // rather than gtk_container_forall().
7055 // <callback>: a callback
7056 // <callback_data>: callback user data
7057 void forall(Callback callback, void* callback_data) {
7058 gtk_container_forall(&this, callback, callback_data);
7061 // Invokes @callback on each non-internal child of @container. See
7062 // gtk_container_forall() for details on what constitutes an
7063 // "internal" child. Most applications should use
7064 // gtk_container_foreach(), rather than gtk_container_forall().
7065 // <callback>: a callback
7066 // <callback_data>: callback user data
7067 void foreach_(Callback callback, void* callback_data) {
7068 gtk_container_foreach(&this, callback, callback_data);
7070 // Unintrospectable method: foreach_full() / gtk_container_foreach_full()
7071 void foreach_full(Callback callback, CallbackMarshal marshal, void* callback_data, GLib2.DestroyNotify notify) {
7072 gtk_container_foreach_full(&this, callback, marshal, callback_data, notify);
7075 // Retrieves the border width of the container. See
7076 // gtk_container_set_border_width().
7077 // RETURNS: the current border width
7078 uint get_border_width() {
7079 return gtk_container_get_border_width(&this);
7082 // Returns the container's non-internal children. See
7083 // gtk_container_forall() for details on what constitutes an "internal" child.
7084 // RETURNS: a newly-allocated list of the container's non-internal children.
7085 GLib2.List* /*new container*/ get_children() {
7086 return gtk_container_get_children(&this);
7089 // Retrieves the focus chain of the container, if one has been
7090 // set explicitly. If no focus chain has been explicitly
7091 // set, GTK+ computes the focus chain based on the positions
7092 // of the children. In that case, GTK+ stores %NULL in
7093 // has been set explicitly.
7094 // RETURNS: %TRUE if the focus chain of the container
7095 // <focusable_widgets>: location to store the focus chain of the container, or %NULL. You should free this list using g_list_free() when you are done with it, however no additional reference count is added to the individual widgets in the focus chain.
7096 int get_focus_chain(/*out*/ GLib2.List** focusable_widgets) {
7097 return gtk_container_get_focus_chain(&this, focusable_widgets);
7100 // Returns the current focus child widget inside @container. This is not the
7101 // currently focused widget. That can be obtained by calling
7102 // gtk_window_get_focus().
7103 // focus inside @container when the @conatiner is focussed,
7104 // or %NULL if none is set.
7105 // RETURNS: The child widget which will receive the
7106 Widget* get_focus_child() {
7107 return gtk_container_get_focus_child(&this);
7110 // Retrieves the horizontal focus adjustment for the container. See
7111 // gtk_container_set_focus_hadjustment ().
7112 // none has been set.
7113 // RETURNS: the horizontal focus adjustment, or %NULL if
7114 Adjustment* get_focus_hadjustment() {
7115 return gtk_container_get_focus_hadjustment(&this);
7118 // Retrieves the vertical focus adjustment for the container. See
7119 // gtk_container_set_focus_vadjustment().
7120 // none has been set.
7121 // RETURNS: the vertical focus adjustment, or %NULL if
7122 Adjustment* get_focus_vadjustment() {
7123 return gtk_container_get_focus_vadjustment(&this);
7126 // Returns the resize mode for the container. See
7127 // gtk_container_set_resize_mode ().
7128 // RETURNS: the current resize mode
7129 ResizeMode get_resize_mode() {
7130 return gtk_container_get_resize_mode(&this);
7133 // When a container receives an expose event, it must send synthetic
7134 // expose events to all children that don't have their own #GdkWindows.
7135 // This function provides a convenient way of doing this. A container,
7136 // when it receives an expose event, calls gtk_container_propagate_expose()
7137 // once for each child, passing in the event the container received.
7138 // gtk_container_propagate_expose() takes care of deciding whether
7139 // an expose event needs to be sent to the child, intersecting
7140 // the event's area with the child area, and sending the event.
7141 // In most cases, a container can simply either simply inherit the
7142 // #GtkWidget::expose implementation from #GtkContainer, or, do some drawing
7143 // and then chain to the ::expose implementation from #GtkContainer.
7144 // Note that the ::expose-event signal has been replaced by a ::draw
7145 // signal in GTK+ 3, and consequently, gtk_container_propagate_expose()
7146 // has been replaced by gtk_container_propagate_draw().
7147 // The <link linkend="http://library.gnome.org/devel/gtk3/3.0/gtk-migrating-2-to-3.html">GTK+ 3 migration guide</link>
7148 // for hints on how to port from ::expose-event to ::draw.
7149 // <child>: a child of @container
7150 // <event>: a expose event sent to container
7151 void propagate_expose(Widget* child, Gdk2.EventExpose* event) {
7152 gtk_container_propagate_expose(&this, child, event);
7155 // Removes @widget from @container. @widget must be inside @container.
7156 // Note that @container will own a reference to @widget, and that this
7157 // may be the last reference held; so removing a widget from its
7158 // container can destroy that widget. If you want to use @widget
7159 // again, you need to add a reference to it while it's not inside
7160 // a container, using g_object_ref(). If you don't want to use @widget
7161 // again it's usually more efficient to simply destroy it directly
7162 // using gtk_widget_destroy() since this will remove it from the
7163 // container and help break any circular reference count cycles.
7164 // <widget>: a current child of @container
7165 void remove(Widget* widget) {
7166 gtk_container_remove(&this, widget);
7168 void resize_children() {
7169 gtk_container_resize_children(&this);
7172 // Sets the border width of the container.
7173 // The border width of a container is the amount of space to leave
7174 // around the outside of the container. The only exception to this is
7175 // #GtkWindow; because toplevel windows can't leave space outside,
7176 // they leave the space inside. The border is added on all sides of
7177 // the container. To add space to only one side, one approach is to
7178 // create a #GtkAlignment widget, call gtk_widget_set_size_request()
7179 // to give it a size, and place it on the side of the container as
7180 // a spacer.
7181 // <border_width>: amount of blank space to leave <emphasis>outside</emphasis> the container. Valid values are in the range 0-65535 pixels.
7182 void set_border_width(uint border_width) {
7183 gtk_container_set_border_width(&this, border_width);
7186 // Sets a focus chain, overriding the one computed automatically by GTK+.
7187 // In principle each widget in the chain should be a descendant of the
7188 // container, but this is not enforced by this method, since it's allowed
7189 // to set the focus chain before you pack the widgets, or have a widget
7190 // in the chain that isn't always packed. The necessary checks are done
7191 // when the focus chain is actually traversed.
7192 // <focusable_widgets>: the new focus chain
7193 void set_focus_chain(GLib2.List* focusable_widgets) {
7194 gtk_container_set_focus_chain(&this, focusable_widgets);
7197 // Sets, or unsets if @child is %NULL, the focused child of @container.
7198 // This function emits the GtkContainer::set_focus_child signal of
7199 // default behaviour by overriding the class closure of this signal.
7200 // This is function is mostly meant to be used by widgets. Applications can use
7201 // gtk_widget_grab_focus() to manualy set the focus to a specific widget.
7202 // <child>: a #GtkWidget, or %NULL
7203 void set_focus_child(Widget* child=null) {
7204 gtk_container_set_focus_child(&this, child);
7207 // Hooks up an adjustment to focus handling in a container, so when a child
7208 // of the container is focused, the adjustment is scrolled to show that
7209 // widget. This function sets the horizontal alignment.
7210 // See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
7211 // the adjustment and gtk_container_set_focus_vadjustment() for setting
7212 // the vertical adjustment.
7213 // The adjustments have to be in pixel units and in the same coordinate
7214 // system as the allocation for immediate children of the container.
7215 // <adjustment>: an adjustment which should be adjusted when the focus is moved among the descendents of @container
7216 void set_focus_hadjustment(Adjustment* adjustment) {
7217 gtk_container_set_focus_hadjustment(&this, adjustment);
7220 // Hooks up an adjustment to focus handling in a container, so when a
7221 // child of the container is focused, the adjustment is scrolled to
7222 // show that widget. This function sets the vertical alignment. See
7223 // gtk_scrolled_window_get_vadjustment() for a typical way of obtaining
7224 // the adjustment and gtk_container_set_focus_hadjustment() for setting
7225 // the horizontal adjustment.
7226 // The adjustments have to be in pixel units and in the same coordinate
7227 // system as the allocation for immediate children of the container.
7228 // <adjustment>: an adjustment which should be adjusted when the focus is moved among the descendents of @container
7229 void set_focus_vadjustment(Adjustment* adjustment) {
7230 gtk_container_set_focus_vadjustment(&this, adjustment);
7233 // Sets the @reallocate_redraws flag of the container to the given value.
7234 // Containers requesting reallocation redraws get automatically
7235 // redrawn if any of their children changed allocation.
7236 // <needs_redraws>: the new value for the container's @reallocate_redraws flag
7237 void set_reallocate_redraws(int needs_redraws) {
7238 gtk_container_set_reallocate_redraws(&this, needs_redraws);
7241 // Sets the resize mode for the container.
7242 // The resize mode of a container determines whether a resize request
7243 // will be passed to the container's parent, queued for later execution
7244 // or executed immediately.
7245 // <resize_mode>: the new resize mode
7246 void set_resize_mode(ResizeMode resize_mode) {
7247 gtk_container_set_resize_mode(&this, resize_mode);
7249 // Removes a focus chain explicitly set with gtk_container_set_focus_chain().
7250 void unset_focus_chain() {
7251 gtk_container_unset_focus_chain(&this);
7253 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) signal_add;
7255 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7256 return super_.signal_connect!name(cb, data, cf);
7259 ulong signal_connect(string name:"add", CB/*:signal_add*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7260 return signal_connect_data(&this, cast(char*)"add",
7261 cast(GObject2.Callback)cb, data, null, cf);
7263 extern (C) alias static void function (Container* this_, void* user_data=null) signal_check_resize;
7264 ulong signal_connect(string name:"check-resize", CB/*:signal_check_resize*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7265 return signal_connect_data(&this, cast(char*)"check-resize",
7266 cast(GObject2.Callback)cb, data, null, cf);
7268 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) signal_remove;
7269 ulong signal_connect(string name:"remove", CB/*:signal_remove*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7270 return signal_connect_data(&this, cast(char*)"remove",
7271 cast(GObject2.Callback)cb, data, null, cf);
7273 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) signal_set_focus_child;
7274 ulong signal_connect(string name:"set-focus-child", CB/*:signal_set_focus_child*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7275 return signal_connect_data(&this, cast(char*)"set-focus-child",
7276 cast(GObject2.Callback)cb, data, null, cf);
7280 struct ContainerClass {
7281 WidgetClass parent_class;
7282 // <widget>: a widget to be placed inside @container
7283 extern (C) void function (Container* container, Widget* widget) add;
7284 // <widget>: a current child of @container
7285 extern (C) void function (Container* container, Widget* widget) remove;
7286 extern (C) void function (Container* container) check_resize;
7287 // Unintrospectable functionp: forall() / ()
7288 extern (C) void function (Container* container, int include_internals, Callback callback, void* callback_data) forall;
7289 extern (C) void function (Container* container, Widget* widget) set_focus_child;
7290 // RETURNS: a #GType.
7291 extern (C) Type function (Container* container) child_type;
7292 extern (C) char* /*new*/ function (Container* container, Widget* child) composite_name;
7293 extern (C) void function (Container* container, Widget* child, uint property_id, GObject2.Value* value, GObject2.ParamSpec* pspec) set_child_property;
7294 extern (C) void function (Container* container, Widget* child, uint property_id, GObject2.Value* value, GObject2.ParamSpec* pspec) get_child_property;
7295 extern (C) void function () _gtk_reserved1;
7296 extern (C) void function () _gtk_reserved2;
7297 extern (C) void function () _gtk_reserved3;
7298 extern (C) void function () _gtk_reserved4;
7301 // Finds a child property of a container class by name.
7302 // RETURNS: the #GParamSpec of the child property or %NULL if @class has no child property with that name.
7303 // <property_name>: the name of the child property to find
7304 GObject2.ParamSpec* find_child_property(char* property_name) {
7305 return gtk_container_class_find_child_property(&this, property_name);
7308 // Installs a child property on a container class.
7309 // <property_id>: the id for the property
7310 // <pspec>: the #GParamSpec for the property
7311 void install_child_property(uint property_id, GObject2.ParamSpec* pspec) {
7312 gtk_container_class_install_child_property(&this, property_id, pspec);
7315 // Returns all child properties of a container class.
7316 // RETURNS: a newly allocated %NULL-terminated array of #GParamSpec*. The array must be freed with g_free().
7317 // <n_properties>: location to return the number of child properties found
7318 GObject2.ParamSpec** /*new container*/ list_child_properties(/*out*/ uint* n_properties) {
7319 return gtk_container_class_list_child_properties(&this, n_properties);
7323 enum CornerType {
7324 TOP_LEFT = 0,
7325 BOTTOM_LEFT = 1,
7326 TOP_RIGHT = 2,
7327 BOTTOM_RIGHT = 3
7329 struct Curve /* : DrawingArea */ {
7330 alias graph this;
7331 alias graph super_;
7332 alias graph drawingarea;
7333 DrawingArea graph;
7334 int cursor_type;
7335 float min_x, max_x, min_y, max_y;
7336 Gdk2.Pixmap* pixmap;
7337 CurveType curve_type;
7338 int height, grab_point, last, num_points;
7339 Gdk2.Point* point;
7340 int num_ctlpoints;
7341 float* ctlpoint;
7343 static Curve* new_() {
7344 return gtk_curve_new();
7346 void get_vector(int veclen, float vector) {
7347 gtk_curve_get_vector(&this, veclen, vector);
7349 void reset() {
7350 gtk_curve_reset(&this);
7352 void set_curve_type(CurveType type) {
7353 gtk_curve_set_curve_type(&this, type);
7355 void set_gamma(float gamma_) {
7356 gtk_curve_set_gamma(&this, gamma_);
7358 void set_range(float min_x, float max_x, float min_y, float max_y) {
7359 gtk_curve_set_range(&this, min_x, max_x, min_y, max_y);
7361 void set_vector(int veclen, float vector) {
7362 gtk_curve_set_vector(&this, veclen, vector);
7364 extern (C) alias static void function (Curve* this_, void* user_data=null) signal_curve_type_changed;
7366 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7367 return super_.signal_connect!name(cb, data, cf);
7370 ulong signal_connect(string name:"curve-type-changed", CB/*:signal_curve_type_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7371 return signal_connect_data(&this, cast(char*)"curve-type-changed",
7372 cast(GObject2.Callback)cb, data, null, cf);
7376 struct CurveClass {
7377 DrawingAreaClass parent_class;
7378 extern (C) void function (Curve* curve) curve_type_changed;
7379 extern (C) void function () _gtk_reserved1;
7380 extern (C) void function () _gtk_reserved2;
7381 extern (C) void function () _gtk_reserved3;
7382 extern (C) void function () _gtk_reserved4;
7385 enum CurveType {
7386 LINEAR = 0,
7387 SPLINE = 1,
7388 FREE = 2
7390 enum DebugFlag {
7391 MISC = 1,
7392 PLUGSOCKET = 2,
7393 TEXT = 4,
7394 TREE = 8,
7395 UPDATES = 16,
7396 KEYBINDINGS = 32,
7397 MULTIHEAD = 64,
7398 MODULES = 128,
7399 GEOMETRY = 256,
7400 ICONTHEME = 512,
7401 PRINTING = 1024,
7402 BUILDER = 2048
7404 enum DeleteType {
7405 CHARS = 0,
7406 WORD_ENDS = 1,
7407 WORDS = 2,
7408 DISPLAY_LINES = 3,
7409 DISPLAY_LINE_ENDS = 4,
7410 PARAGRAPH_ENDS = 5,
7411 PARAGRAPHS = 6,
7412 WHITESPACE = 7
7414 enum DestDefaults {
7415 MOTION = 1,
7416 HIGHLIGHT = 2,
7417 DROP = 4,
7418 ALL = 7
7420 extern (C) alias void function (void* data) DestroyNotify;
7422 struct Dialog /* : Window */ {
7423 alias window this;
7424 alias window super_;
7425 Window window;
7426 Widget* vbox, action_area;
7427 private Widget* separator;
7429 static Dialog* new_() {
7430 return gtk_dialog_new();
7433 // Unintrospectable constructor: new_with_buttons() / gtk_dialog_new_with_buttons()
7434 // Creates a new #GtkDialog with title @title (or %NULL for the default
7435 // title; see gtk_window_set_title()) and transient parent @parent (or
7436 // %NULL for none; see gtk_window_set_transient_for()). The @flags
7437 // argument can be used to make the dialog modal (#GTK_DIALOG_MODAL)
7438 // and/or to have it destroyed along with its transient parent
7439 // (#GTK_DIALOG_DESTROY_WITH_PARENT). After @flags, button
7440 // text/response ID pairs should be listed, with a %NULL pointer ending
7441 // the list. Button text can be either a stock ID such as
7442 // #GTK_STOCK_OK, or some arbitrary text. A response ID can be
7443 // any positive number, or one of the values in the #GtkResponseType
7444 // enumeration. If the user clicks one of these dialog buttons,
7445 // #GtkDialog will emit the #GtkDialog::response signal with the corresponding
7446 // response ID. If a #GtkDialog receives the #GtkWidget::delete-event signal,
7447 // it will emit ::response with a response ID of #GTK_RESPONSE_DELETE_EVENT.
7448 // However, destroying a dialog does not emit the ::response signal;
7449 // so be careful relying on ::response when using the
7450 // #GTK_DIALOG_DESTROY_WITH_PARENT flag. Buttons are from left to right,
7451 // so the first button in the list will be the leftmost button in the dialog.
7452 // Here's a simple example:
7453 // |[
7454 // GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
7455 // main_app_window,
7456 // GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
7457 // GTK_STOCK_OK,
7458 // GTK_RESPONSE_ACCEPT,
7459 // GTK_STOCK_CANCEL,
7460 // GTK_RESPONSE_REJECT,
7461 // NULL);
7462 // ]|
7463 // RETURNS: a new #GtkDialog
7464 // <title>: Title of the dialog, or %NULL
7465 // <parent>: Transient parent of the dialog, or %NULL
7466 // <flags>: from #GtkDialogFlags
7467 // <first_button_text>: stock ID or text to go in first button, or %NULL
7468 alias gtk_dialog_new_with_buttons new_with_buttons; // Variadic
7470 // Adds an activatable widget to the action area of a #GtkDialog,
7471 // connecting a signal handler that will emit the #GtkDialog::response
7472 // signal on the dialog when the widget is activated. The widget is
7473 // appended to the end of the dialog's action area. If you want to add a
7474 // non-activatable widget, simply pack it into the @action_area field
7475 // of the #GtkDialog struct.
7476 // <child>: an activatable widget
7477 // <response_id>: response ID for @child
7478 void add_action_widget(Widget* child, int response_id) {
7479 gtk_dialog_add_action_widget(&this, child, response_id);
7482 // Adds a button with the given text (or a stock button, if @button_text is a
7483 // stock ID) and sets things up so that clicking the button will emit the
7484 // #GtkDialog::response signal with the given @response_id. The button is
7485 // appended to the end of the dialog's action area. The button widget is
7486 // returned, but usually you don't need it.
7487 // RETURNS: the button widget that was added
7488 // <button_text>: text of button, or stock ID
7489 // <response_id>: response ID for the button
7490 Widget* add_button(char* button_text, int response_id) {
7491 return gtk_dialog_add_button(&this, button_text, response_id);
7494 // Unintrospectable method: add_buttons() / gtk_dialog_add_buttons()
7495 // Adds more buttons, same as calling gtk_dialog_add_button()
7496 // repeatedly. The variable argument list should be %NULL-terminated
7497 // as with gtk_dialog_new_with_buttons(). Each button must have both
7498 // text and response ID.
7499 // <first_button_text>: button text or stock ID
7500 /+ Not available -- variadic methods unsupported - use the C function directly.
7501 alias gtk_dialog_add_buttons add_buttons; // Variadic
7504 // Returns the action area of @dialog.
7505 // RETURNS: the action area.
7506 Widget* get_action_area() {
7507 return gtk_dialog_get_action_area(&this);
7510 // Returns the content area of @dialog.
7511 // RETURNS: the content area #GtkVBox.
7512 Widget* get_content_area() {
7513 return gtk_dialog_get_content_area(&this);
7516 // Accessor for whether the dialog has a separator.
7517 // RETURNS: %TRUE if the dialog has a separator
7518 int get_has_separator() {
7519 return gtk_dialog_get_has_separator(&this);
7522 // Gets the response id of a widget in the action area
7523 // of a dialog.
7524 // if @widget doesn't have a response id set.
7525 // RETURNS: the response id of @widget, or %GTK_RESPONSE_NONE
7526 // <widget>: a widget in the action area of @dialog
7527 int get_response_for_widget(Widget* widget) {
7528 return gtk_dialog_get_response_for_widget(&this, widget);
7531 // Gets the widget button that uses the given response ID in the action area
7532 // of a dialog.
7533 // RETURNS: the @widget button that uses the given @response_id, or %NULL.
7534 // <response_id>: the response ID used by the @dialog widget
7535 Widget* get_widget_for_response(int response_id) {
7536 return gtk_dialog_get_widget_for_response(&this, response_id);
7539 // Emits the #GtkDialog::response signal with the given response ID.
7540 // Used to indicate that the user has responded to the dialog in some way;
7541 // typically either you or gtk_dialog_run() will be monitoring the
7542 // ::response signal and take appropriate action.
7543 // <response_id>: response ID
7544 void response(int response_id) {
7545 gtk_dialog_response(&this, response_id);
7548 // Blocks in a recursive main loop until the @dialog either emits the
7549 // #GtkDialog::response signal, or is destroyed. If the dialog is
7550 // destroyed during the call to gtk_dialog_run(), gtk_dialog_run() returns
7551 // #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the
7552 // ::response signal emission.
7553 // Before entering the recursive main loop, gtk_dialog_run() calls
7554 // gtk_widget_show() on the dialog for you. Note that you still
7555 // need to show any children of the dialog yourself.
7556 // During gtk_dialog_run(), the default behavior of #GtkWidget::delete-event
7557 // is disabled; if the dialog receives ::delete_event, it will not be
7558 // destroyed as windows usually are, and gtk_dialog_run() will return
7559 // #GTK_RESPONSE_DELETE_EVENT. Also, during gtk_dialog_run() the dialog
7560 // will be modal. You can force gtk_dialog_run() to return at any time by
7561 // calling gtk_dialog_response() to emit the ::response signal. Destroying
7562 // the dialog during gtk_dialog_run() is a very bad idea, because your
7563 // post-run code won't know whether the dialog was destroyed or not.
7564 // After gtk_dialog_run() returns, you are responsible for hiding or
7565 // destroying the dialog if you wish to do so.
7566 // Typical usage of this function might be:
7567 // |[
7568 // gint result = gtk_dialog_run (GTK_DIALOG (dialog));
7569 // switch (result)
7570 // {
7571 // case GTK_RESPONSE_ACCEPT:
7572 // do_application_specific_something ();
7573 // break;
7574 // default:
7575 // do_nothing_since_dialog_was_cancelled ();
7576 // break;
7577 // }
7578 // gtk_widget_destroy (dialog);
7579 // ]|
7580 // Note that even though the recursive main loop gives the effect of a
7581 // modal dialog (it prevents the user from interacting with other
7582 // windows in the same window group while the dialog is run), callbacks
7583 // such as timeouts, IO channel watches, DND drops, etc, <emphasis>will</emphasis>
7584 // be triggered during a gtk_dialog_run() call.
7585 // RETURNS: response ID
7586 int run() {
7587 return gtk_dialog_run(&this);
7590 // Unintrospectable method: set_alternative_button_order() / gtk_dialog_set_alternative_button_order()
7591 // Sets an alternative button order. If the
7592 // #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,
7593 // the dialog buttons are reordered according to the order of the
7594 // response ids passed to this function.
7595 // By default, GTK+ dialogs use the button order advocated by the Gnome
7596 // <ulink url="http://developer.gnome.org/projects/gup/hig/2.0/">Human
7597 // Interface Guidelines</ulink> with the affirmative button at the far
7598 // right, and the cancel button left of it. But the builtin GTK+ dialogs
7599 // and #GtkMessageDialog<!-- -->s do provide an alternative button order,
7600 // which is more suitable on some platforms, e.g. Windows.
7601 // Use this function after adding all the buttons to your dialog, as the
7602 // following example shows:
7603 // |[
7604 // cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
7605 // GTK_STOCK_CANCEL,
7606 // GTK_RESPONSE_CANCEL);
7607 // ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
7608 // GTK_STOCK_OK,
7609 // GTK_RESPONSE_OK);
7610 // gtk_widget_grab_default (ok_button);
7611 // help_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
7612 // GTK_STOCK_HELP,
7613 // GTK_RESPONSE_HELP);
7614 // gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
7615 // GTK_RESPONSE_OK,
7616 // GTK_RESPONSE_CANCEL,
7617 // GTK_RESPONSE_HELP,
7618 // -1);
7619 // ]|
7620 // <first_response_id>: a response id used by one @dialog's buttons
7621 /+ Not available -- variadic methods unsupported - use the C function directly.
7622 alias gtk_dialog_set_alternative_button_order set_alternative_button_order; // Variadic
7625 // Sets an alternative button order. If the
7626 // #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,
7627 // the dialog buttons are reordered according to the order of the
7628 // response ids in @new_order.
7629 // See gtk_dialog_set_alternative_button_order() for more information.
7630 // This function is for use by language bindings.
7631 // <n_params>: the number of response ids in @new_order
7632 // <new_order>: an array of response ids of
7633 void set_alternative_button_order_from_array(int n_params, int* new_order) {
7634 gtk_dialog_set_alternative_button_order_from_array(&this, n_params, new_order);
7637 // Sets the last widget in the dialog's action area with the given @response_id
7638 // as the default widget for the dialog. Pressing "Enter" normally activates
7639 // the default widget.
7640 // <response_id>: a response ID
7641 void set_default_response(int response_id) {
7642 gtk_dialog_set_default_response(&this, response_id);
7645 // Sets whether the dialog has a separator above the buttons.
7646 // <setting>: %TRUE to have a separator
7647 void set_has_separator(int setting) {
7648 gtk_dialog_set_has_separator(&this, setting);
7651 // Calls <literal>gtk_widget_set_sensitive (widget, @setting)</literal>
7652 // for each widget in the dialog's action area with the given @response_id.
7653 // A convenient way to sensitize/desensitize dialog buttons.
7654 // <response_id>: a response ID
7655 // <setting>: %TRUE for sensitive
7656 void set_response_sensitive(int response_id, int setting) {
7657 gtk_dialog_set_response_sensitive(&this, response_id, setting);
7660 // The ::close signal is a
7661 // <link linkend="keybinding-signals">keybinding signal</link>
7662 // which gets emitted when the user uses a keybinding to close
7663 // the dialog.
7664 // The default binding for this signal is the Escape key.
7665 extern (C) alias static void function (Dialog* this_, void* user_data=null) signal_close;
7667 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7668 return super_.signal_connect!name(cb, data, cf);
7671 ulong signal_connect(string name:"close", CB/*:signal_close*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7672 return signal_connect_data(&this, cast(char*)"close",
7673 cast(GObject2.Callback)cb, data, null, cf);
7676 // Emitted when an action widget is clicked, the dialog receives a
7677 // delete event, or the application programmer calls gtk_dialog_response().
7678 // On a delete event, the response ID is #GTK_RESPONSE_DELETE_EVENT.
7679 // Otherwise, it depends on which action widget was clicked.
7680 // <response_id>: the response ID
7681 extern (C) alias static void function (Dialog* this_, int response_id, void* user_data=null) signal_response;
7682 ulong signal_connect(string name:"response", CB/*:signal_response*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7683 return signal_connect_data(&this, cast(char*)"response",
7684 cast(GObject2.Callback)cb, data, null, cf);
7688 struct DialogClass {
7689 WindowClass parent_class;
7690 // <response_id>: response ID
7691 extern (C) void function (Dialog* dialog, int response_id) response;
7692 extern (C) void function (Dialog* dialog) close;
7693 extern (C) void function () _gtk_reserved1;
7694 extern (C) void function () _gtk_reserved2;
7695 extern (C) void function () _gtk_reserved3;
7696 extern (C) void function () _gtk_reserved4;
7699 enum DialogFlags {
7700 MODAL = 1,
7701 DESTROY_WITH_PARENT = 2,
7702 NO_SEPARATOR = 4
7704 enum DirectionType {
7705 TAB_FORWARD = 0,
7706 TAB_BACKWARD = 1,
7707 UP = 2,
7708 DOWN = 3,
7709 LEFT = 4,
7710 RIGHT = 5
7712 union DitherInfo {
7713 ushort[2] s;
7714 ubyte[4] c;
7717 enum DragResult {
7718 SUCCESS = 0,
7719 NO_TARGET = 1,
7720 USER_CANCELLED = 2,
7721 TIMEOUT_EXPIRED = 3,
7722 GRAB_BROKEN = 4,
7723 ERROR = 5
7725 struct DrawingArea /* : Widget */ {
7726 alias widget this;
7727 alias widget super_;
7728 Widget widget;
7729 void* draw_data;
7731 static DrawingArea* new_() {
7732 return gtk_drawing_area_new();
7734 void size(int width, int height) {
7735 gtk_drawing_area_size(&this, width, height);
7739 struct DrawingAreaClass {
7740 WidgetClass parent_class;
7741 extern (C) void function () _gtk_reserved1;
7742 extern (C) void function () _gtk_reserved2;
7743 extern (C) void function () _gtk_reserved3;
7744 extern (C) void function () _gtk_reserved4;
7747 struct Editable {
7749 // Copies the contents of the currently selected content in the editable and
7750 // puts it on the clipboard.
7751 void copy_clipboard() {
7752 gtk_editable_copy_clipboard(&this);
7755 // Removes the contents of the currently selected content in the editable and
7756 // puts it on the clipboard.
7757 void cut_clipboard() {
7758 gtk_editable_cut_clipboard(&this);
7761 // Deletes the currently selected text of the editable.
7762 // This call doesn't do anything if there is no selected text.
7763 void delete_selection() {
7764 gtk_editable_delete_selection(&this);
7767 // Deletes a sequence of characters. The characters that are deleted are
7768 // those characters at positions from @start_pos up to, but not including
7769 // are those from @start_pos to the end of the text.
7770 // Note that the positions are specified in characters, not bytes.
7771 // <start_pos>: start position
7772 // <end_pos>: end position
7773 void delete_text(int start_pos, int end_pos) {
7774 gtk_editable_delete_text(&this, start_pos, end_pos);
7777 // Retrieves a sequence of characters. The characters that are retrieved
7778 // are those characters at positions from @start_pos up to, but not
7779 // including @end_pos. If @end_pos is negative, then the the characters
7780 // retrieved are those characters from @start_pos to the end of the text.
7781 // Note that positions are specified in characters, not bytes.
7782 // string. This string is allocated by the #GtkEditable
7783 // implementation and should be freed by the caller.
7784 // RETURNS: a pointer to the contents of the widget as a
7785 // <start_pos>: start of text
7786 // <end_pos>: end of text
7787 char* /*new*/ get_chars(int start_pos, int end_pos) {
7788 return gtk_editable_get_chars(&this, start_pos, end_pos);
7791 // Retrieves whether @editable is editable. See
7792 // gtk_editable_set_editable().
7793 // RETURNS: %TRUE if @editable is editable.
7794 int get_editable() {
7795 return gtk_editable_get_editable(&this);
7798 // Retrieves the current position of the cursor relative to the start
7799 // of the content of the editable.
7800 // Note that this position is in characters, not in bytes.
7801 // RETURNS: the cursor position
7802 int get_position() {
7803 return gtk_editable_get_position(&this);
7806 // Retrieves the selection bound of the editable. start_pos will be filled
7807 // with the start of the selection and @end_pos with end. If no text was
7808 // selected both will be identical and %FALSE will be returned.
7809 // Note that positions are specified in characters, not bytes.
7810 // RETURNS: %TRUE if an area is selected, %FALSE otherwise
7811 // <start_pos>: location to store the starting position, or %NULL
7812 // <end_pos>: location to store the end position, or %NULL
7813 int get_selection_bounds(/*out*/ int* start_pos=null, /*out*/ int* end_pos=null) {
7814 return gtk_editable_get_selection_bounds(&this, start_pos, end_pos);
7817 // Inserts @new_text_length bytes of @new_text into the contents of the
7818 // widget, at position @position.
7819 // Note that the position is in characters, not in bytes.
7820 // The function updates @position to point after the newly inserted text.
7821 // <new_text>: the text to append
7822 // <new_text_length>: the length of the text in bytes, or -1
7823 // <position>: location of the position text will be inserted at
7824 void insert_text(char* new_text, int new_text_length, /*inout*/ int* position) {
7825 gtk_editable_insert_text(&this, new_text, new_text_length, position);
7828 // Pastes the content of the clipboard to the current position of the
7829 // cursor in the editable.
7830 void paste_clipboard() {
7831 gtk_editable_paste_clipboard(&this);
7834 // Selects a region of text. The characters that are selected are
7835 // those characters at positions from @start_pos up to, but not
7836 // including @end_pos. If @end_pos is negative, then the the
7837 // characters selected are those characters from @start_pos to
7838 // the end of the text.
7839 // Note that positions are specified in characters, not bytes.
7840 // <start_pos>: start of region
7841 // <end_pos>: end of region
7842 void select_region(int start_pos, int end_pos) {
7843 gtk_editable_select_region(&this, start_pos, end_pos);
7846 // Determines if the user can edit the text in the editable
7847 // widget or not.
7848 // <is_editable>: %TRUE if the user is allowed to edit the text in the widget
7849 void set_editable(int is_editable) {
7850 gtk_editable_set_editable(&this, is_editable);
7853 // Sets the cursor position in the editable to the given value.
7854 // The cursor is displayed before the character with the given (base 0)
7855 // index in the contents of the editable. The value must be less than or
7856 // equal to the number of characters in the editable. A value of -1
7857 // indicates that the position should be set after the last character
7858 // of the editable. Note that @position is in characters, not in bytes.
7859 // <position>: the position of the cursor
7860 void set_position(int position) {
7861 gtk_editable_set_position(&this, position);
7864 // The ::changed signal is emitted at the end of a single
7865 // user-visible operation on the contents of the #GtkEditable.
7866 // E.g., a paste operation that replaces the contents of the
7867 // selection will cause only one signal emission (even though it
7868 // is implemented by first deleting the selection, then inserting
7869 // the new content, and may cause multiple ::notify::text signals
7870 // to be emitted).
7871 extern (C) alias static void function (Editable* this_, void* user_data=null) signal_changed;
7873 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7874 return super_.signal_connect!name(cb, data, cf);
7877 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7878 return signal_connect_data(&this, cast(char*)"changed",
7879 cast(GObject2.Callback)cb, data, null, cf);
7882 // This signal is emitted when text is deleted from
7883 // the widget by the user. The default handler for
7884 // this signal will normally be responsible for deleting
7885 // the text, so by connecting to this signal and then
7886 // stopping the signal with g_signal_stop_emission(), it
7887 // is possible to modify the range of deleted text, or
7888 // prevent it from being deleted entirely. The @start_pos
7889 // and @end_pos parameters are interpreted as for
7890 // gtk_editable_delete_text().
7891 // <start_pos>: the starting position
7892 // <end_pos>: the end position
7893 extern (C) alias static void function (Editable* this_, int start_pos, int end_pos, void* user_data=null) signal_delete_text;
7894 ulong signal_connect(string name:"delete-text", CB/*:signal_delete_text*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7895 return signal_connect_data(&this, cast(char*)"delete-text",
7896 cast(GObject2.Callback)cb, data, null, cf);
7899 // This signal is emitted when text is inserted into
7900 // the widget by the user. The default handler for
7901 // this signal will normally be responsible for inserting
7902 // the text, so by connecting to this signal and then
7903 // stopping the signal with g_signal_stop_emission(), it
7904 // is possible to modify the inserted text, or prevent
7905 // it from being inserted entirely.
7906 // <new_text>: the new text to insert
7907 // <new_text_length>: the length of the new text, in bytes, or -1 if new_text is nul-terminated
7908 // <position>: the position, in characters, at which to insert the new text. this is an in-out parameter. After the signal emission is finished, it should point after the newly inserted text.
7909 extern (C) alias static void function (Editable* this_, char* new_text, int new_text_length, /*inout*/ int position, void* user_data=null) signal_insert_text;
7910 ulong signal_connect(string name:"insert-text", CB/*:signal_insert_text*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7911 return signal_connect_data(&this, cast(char*)"insert-text",
7912 cast(GObject2.Callback)cb, data, null, cf);
7916 struct EditableClass {
7917 GObject2.TypeInterface base_iface;
7918 extern (C) void function (Editable* editable, char* text, int length, int* position) insert_text;
7919 extern (C) void function (Editable* editable, int start_pos, int end_pos) delete_text;
7920 extern (C) void function (Editable* editable) changed;
7921 extern (C) void function (Editable* editable, char* text, int length, int* position) do_insert_text;
7922 extern (C) void function (Editable* editable, int start_pos, int end_pos) do_delete_text;
7923 extern (C) char* /*new*/ function (Editable* editable, int start_pos, int end_pos) get_chars;
7924 extern (C) void function (Editable* editable, int start_pos, int end_pos) set_selection_bounds;
7925 extern (C) int function (Editable* editable, int* start_pos, int* end_pos) get_selection_bounds;
7926 extern (C) void function (Editable* editable, int position) set_position;
7927 extern (C) int function (Editable* editable) get_position;
7930 struct Entry /* : Widget */ {
7931 alias widget this;
7932 alias widget super_;
7933 Widget widget;
7934 char* text;
7935 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
7936 uint, "editable", 1,
7937 uint, "visible", 1,
7938 uint, "overwrite_mode", 1,
7939 uint, "in_drag", 1,
7940 uint, "__dummy32A", 28));
7941 ushort text_length, text_max_length;
7942 private Gdk2.Window* text_area;
7943 private IMContext* im_context;
7944 private Widget* popup_menu;
7945 private int current_pos, selection_bound;
7946 private Pango.Layout* cached_layout;
7947 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
7948 uint, "cache_includes_preedit", 1,
7949 uint, "need_im_reset", 1,
7950 uint, "has_frame", 1,
7951 uint, "activates_default", 1,
7952 uint, "cursor_visible", 1,
7953 uint, "in_click", 1,
7954 uint, "is_cell_renderer", 1,
7955 uint, "editing_canceled", 1,
7956 uint, "mouse_cursor_obscured", 1,
7957 uint, "select_words", 1,
7958 uint, "select_lines", 1,
7959 uint, "resolved_dir", 4,
7960 uint, "truncate_multiline", 1,
7961 uint, "__dummy32B", 16));
7962 private uint button, blink_timeout, recompute_idle;
7963 private int scroll_offset, ascent, descent;
7964 private ushort x_text_size, x_n_bytes, preedit_length, preedit_cursor;
7965 private int dnd_position, drag_start_x, drag_start_y;
7966 private dchar invisible_char;
7967 private int width_chars;
7970 // Creates a new entry.
7971 // RETURNS: a new #GtkEntry.
7972 static Entry* new_() {
7973 return gtk_entry_new();
7976 // Creates a new entry with the specified text buffer.
7977 // RETURNS: a new #GtkEntry
7978 // <buffer>: The buffer to use for the new #GtkEntry.
7979 static Entry* new_with_buffer(EntryBuffer* buffer) {
7980 return gtk_entry_new_with_buffer(buffer);
7983 // Creates a new #GtkEntry widget with the given maximum length.
7984 // RETURNS: a new #GtkEntry
7985 // <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.
7986 static Entry* new_with_max_length(int max) {
7987 return gtk_entry_new_with_max_length(max);
7990 // Appends the given text to the contents of the widget.
7991 // <text>: the text to append
7992 void append_text(char* text) {
7993 gtk_entry_append_text(&this, text);
7996 // Retrieves the value set by gtk_entry_set_activates_default().
7997 // RETURNS: %TRUE if the entry will activate the default widget
7998 int get_activates_default() {
7999 return gtk_entry_get_activates_default(&this);
8002 // Gets the value set by gtk_entry_set_alignment().
8003 // RETURNS: the alignment
8004 float get_alignment() {
8005 return gtk_entry_get_alignment(&this);
8008 // Get the #GtkEntryBuffer object which holds the text for
8009 // this widget.
8010 // RETURNS: A #GtkEntryBuffer object.
8011 EntryBuffer* get_buffer() {
8012 return gtk_entry_get_buffer(&this);
8015 // Returns the auxiliary completion object currently in use by @entry.
8016 // in use by @entry.
8017 // RETURNS: The auxiliary completion object currently
8018 EntryCompletion* get_completion() {
8019 return gtk_entry_get_completion(&this);
8022 // Returns the index of the icon which is the source of the current
8023 // DND operation, or -1.
8024 // This function is meant to be used in a #GtkWidget::drag-data-get
8025 // callback.
8026 // DND operation, or -1.
8027 // RETURNS: index of the icon which is the source of the current
8028 int get_current_icon_drag_source() {
8029 return gtk_entry_get_current_icon_drag_source(&this);
8032 // Retrieves the horizontal cursor adjustment for the entry.
8033 // See gtk_entry_set_cursor_hadjustment().
8034 // if none has been set.
8035 // RETURNS: the horizontal cursor adjustment, or %NULL
8036 Adjustment* get_cursor_hadjustment() {
8037 return gtk_entry_get_cursor_hadjustment(&this);
8040 // Gets the value set by gtk_entry_set_has_frame().
8041 // RETURNS: whether the entry has a beveled frame
8042 int get_has_frame() {
8043 return gtk_entry_get_has_frame(&this);
8046 // Returns whether the icon is activatable.
8047 // RETURNS: %TRUE if the icon is activatable.
8048 // <icon_pos>: Icon position
8049 int get_icon_activatable(EntryIconPosition icon_pos) {
8050 return gtk_entry_get_icon_activatable(&this, icon_pos);
8053 // Finds the icon at the given position and return its index.
8054 // If @x, @y doesn't lie inside an icon, -1 is returned.
8055 // This function is intended for use in a #GtkWidget::query-tooltip
8056 // signal handler.
8057 // RETURNS: the index of the icon at the given position, or -1
8058 // <x>: the x coordinate of the position to find
8059 // <y>: the y coordinate of the position to find
8060 int get_icon_at_pos(int x, int y) {
8061 return gtk_entry_get_icon_at_pos(&this, x, y);
8064 // Retrieves the #GIcon used for the icon, or %NULL if there is
8065 // no icon or if the icon was set by some other method (e.g., by
8066 // stock, pixbuf, or icon name).
8067 // or if the icon is not a #GIcon
8068 // RETURNS: A #GIcon, or %NULL if no icon is set
8069 // <icon_pos>: Icon position
8070 Gio2.Icon* get_icon_gicon(EntryIconPosition icon_pos) {
8071 return gtk_entry_get_icon_gicon(&this, icon_pos);
8074 // Retrieves the icon name used for the icon, or %NULL if there is
8075 // no icon or if the icon was set by some other method (e.g., by
8076 // pixbuf, stock or gicon).
8077 // wasn't set from an icon name
8078 // RETURNS: An icon name, or %NULL if no icon is set or if the icon
8079 // <icon_pos>: Icon position
8080 char* get_icon_name(EntryIconPosition icon_pos) {
8081 return gtk_entry_get_icon_name(&this, icon_pos);
8084 // Retrieves the image used for the icon.
8085 // Unlike the other methods of setting and getting icon data, this
8086 // method will work regardless of whether the icon was set using a
8087 // #GdkPixbuf, a #GIcon, a stock item, or an icon name.
8088 // set for this position.
8089 // RETURNS: A #GdkPixbuf, or %NULL if no icon is
8090 // <icon_pos>: Icon position
8091 GdkPixbuf2.Pixbuf* get_icon_pixbuf(EntryIconPosition icon_pos) {
8092 return gtk_entry_get_icon_pixbuf(&this, icon_pos);
8095 // Returns whether the icon appears sensitive or insensitive.
8096 // RETURNS: %TRUE if the icon is sensitive.
8097 // <icon_pos>: Icon position
8098 int get_icon_sensitive(EntryIconPosition icon_pos) {
8099 return gtk_entry_get_icon_sensitive(&this, icon_pos);
8102 // Retrieves the stock id used for the icon, or %NULL if there is
8103 // no icon or if the icon was set by some other method (e.g., by
8104 // pixbuf, icon name or gicon).
8105 // wasn't set from a stock id
8106 // RETURNS: A stock id, or %NULL if no icon is set or if the icon
8107 // <icon_pos>: Icon position
8108 char* get_icon_stock(EntryIconPosition icon_pos) {
8109 return gtk_entry_get_icon_stock(&this, icon_pos);
8112 // Gets the type of representation being used by the icon
8113 // to store image data. If the icon has no image data,
8114 // the return value will be %GTK_IMAGE_EMPTY.
8115 // RETURNS: image representation being used
8116 // <icon_pos>: Icon position
8117 ImageType get_icon_storage_type(EntryIconPosition icon_pos) {
8118 return gtk_entry_get_icon_storage_type(&this, icon_pos);
8121 // Gets the contents of the tooltip on the icon at the specified
8122 // position in @entry.
8123 // with g_free() when done.
8124 // RETURNS: the tooltip text, or %NULL. Free the returned string
8125 // <icon_pos>: the icon position
8126 char* /*new*/ get_icon_tooltip_markup(EntryIconPosition icon_pos) {
8127 return gtk_entry_get_icon_tooltip_markup(&this, icon_pos);
8130 // Gets the contents of the tooltip on the icon at the specified
8131 // position in @entry.
8132 // with g_free() when done.
8133 // RETURNS: the tooltip text, or %NULL. Free the returned string
8134 // <icon_pos>: the icon position
8135 char* /*new*/ get_icon_tooltip_text(EntryIconPosition icon_pos) {
8136 return gtk_entry_get_icon_tooltip_text(&this, icon_pos);
8139 // Returns the #GdkWindow which contains the entry's icon at
8140 // entry in an expose-event callback because it enables the callback
8141 // to distinguish between the text window and entry's icon windows.
8142 // See also gtk_entry_get_text_window().
8143 // Note that GTK+ 3 does not have this function anymore; it has
8144 // been replaced by gtk_entry_get_icon_area().
8145 // RETURNS: the entry's icon window at @icon_pos.
8146 // <icon_pos>: Icon position
8147 Gdk2.Window* get_icon_window(EntryIconPosition icon_pos) {
8148 return gtk_entry_get_icon_window(&this, icon_pos);
8151 // This function returns the entry's #GtkEntry:inner-border property. See
8152 // gtk_entry_set_inner_border() for more information.
8153 // RETURNS: the entry's #GtkBorder, or %NULL if none was set.
8154 Border* get_inner_border() {
8155 return gtk_entry_get_inner_border(&this);
8158 // Retrieves the character displayed in place of the real characters
8159 // for entries with visibility set to false. See gtk_entry_set_invisible_char().
8160 // show invisible text at all.
8161 // RETURNS: the current invisible char, or 0, if the entry does not
8162 dchar get_invisible_char() {
8163 return gtk_entry_get_invisible_char(&this);
8166 // Gets the #PangoLayout used to display the entry.
8167 // The layout is useful to e.g. convert text positions to
8168 // pixel positions, in combination with gtk_entry_get_layout_offsets().
8169 // The returned layout is owned by the entry and must not be
8170 // modified or freed by the caller.
8171 // Keep in mind that the layout text may contain a preedit string, so
8172 // gtk_entry_layout_index_to_text_index() and
8173 // gtk_entry_text_index_to_layout_index() are needed to convert byte
8174 // indices in the layout to byte indices in the entry contents.
8175 // RETURNS: the #PangoLayout for this entry
8176 Pango.Layout* get_layout() {
8177 return gtk_entry_get_layout(&this);
8180 // Obtains the position of the #PangoLayout used to render text
8181 // in the entry, in widget coordinates. Useful if you want to line
8182 // up the text in an entry with some other text, e.g. when using the
8183 // entry to implement editable cells in a sheet widget.
8184 // Also useful to convert mouse events into coordinates inside the
8185 // #PangoLayout, e.g. to take some action if some part of the entry text
8186 // is clicked.
8187 // Note that as the user scrolls around in the entry the offsets will
8188 // change; you'll need to connect to the "notify::scroll-offset"
8189 // signal to track this. Remember when using the #PangoLayout
8190 // functions you need to convert to and from pixels using
8191 // PANGO_PIXELS() or #PANGO_SCALE.
8192 // Keep in mind that the layout text may contain a preedit string, so
8193 // gtk_entry_layout_index_to_text_index() and
8194 // gtk_entry_text_index_to_layout_index() are needed to convert byte
8195 // indices in the layout to byte indices in the entry contents.
8196 // <x>: location to store X offset of layout, or %NULL
8197 // <y>: location to store Y offset of layout, or %NULL
8198 void get_layout_offsets(/*out*/ int* x=null, /*out*/ int* y=null) {
8199 gtk_entry_get_layout_offsets(&this, x, y);
8202 // Retrieves the maximum allowed length of the text in
8203 // This is equivalent to:
8204 // <informalexample><programlisting>
8205 // gtk_entry_buffer_get_max_length (gtk_entry_get_buffer (entry));
8206 // </programlisting></informalexample>
8207 // in #GtkEntry, or 0 if there is no maximum.
8208 // RETURNS: the maximum allowed number of characters
8209 int get_max_length() {
8210 return gtk_entry_get_max_length(&this);
8213 // Gets the value set by gtk_entry_set_overwrite_mode().
8214 // RETURNS: whether the text is overwritten when typing.
8215 int get_overwrite_mode() {
8216 return gtk_entry_get_overwrite_mode(&this);
8219 // Returns the current fraction of the task that's been completed.
8220 // See gtk_entry_set_progress_fraction().
8221 // RETURNS: a fraction from 0.0 to 1.0
8222 double get_progress_fraction() {
8223 return gtk_entry_get_progress_fraction(&this);
8226 // Retrieves the pulse step set with gtk_entry_set_progress_pulse_step().
8227 // RETURNS: a fraction from 0.0 to 1.0
8228 double get_progress_pulse_step() {
8229 return gtk_entry_get_progress_pulse_step(&this);
8232 // Retrieves the contents of the entry widget.
8233 // See also gtk_editable_get_chars().
8234 // This is equivalent to:
8235 // <informalexample><programlisting>
8236 // gtk_entry_buffer_get_text (gtk_entry_get_buffer (entry));
8237 // </programlisting></informalexample>
8238 // string. This string points to internally allocated
8239 // storage in the widget and must not be freed, modified or
8240 // stored.
8241 // RETURNS: a pointer to the contents of the widget as a
8242 char* get_text() {
8243 return gtk_entry_get_text(&this);
8246 // Retrieves the current length of the text in
8247 // This is equivalent to:
8248 // <informalexample><programlisting>
8249 // gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry));
8250 // </programlisting></informalexample>
8251 // in #GtkEntry, or 0 if there are none.
8252 // RETURNS: the current number of characters
8253 ushort get_text_length() {
8254 return gtk_entry_get_text_length(&this);
8257 // Returns the #GdkWindow which contains the text. This function is
8258 // useful when drawing something to the entry in an expose-event
8259 // callback because it enables the callback to distinguish between
8260 // the text window and entry's icon windows.
8261 // See also gtk_entry_get_icon_window().
8262 // Note that GTK+ 3 does not have this function anymore; it has
8263 // been replaced by gtk_entry_get_text_area().
8264 // RETURNS: the entry's text window.
8265 Gdk2.Window* get_text_window() {
8266 return gtk_entry_get_text_window(&this);
8269 // Retrieves whether the text in @entry is visible. See
8270 // gtk_entry_set_visibility().
8271 // RETURNS: %TRUE if the text is currently visible
8272 int get_visibility() {
8273 return gtk_entry_get_visibility(&this);
8276 // Gets the value set by gtk_entry_set_width_chars().
8277 // RETURNS: number of chars to request space for, or negative if unset
8278 int get_width_chars() {
8279 return gtk_entry_get_width_chars(&this);
8282 // Allow the #GtkEntry input method to internally handle key press
8283 // and release events. If this function returns %TRUE, then no further
8284 // processing should be done for this key event. See
8285 // gtk_im_context_filter_keypress().
8286 // Note that you are expected to call this function from your handler
8287 // when overriding key event handling. This is needed in the case when
8288 // you need to insert your own key handling between the input method
8289 // and the default key event handling of the #GtkEntry.
8290 // See gtk_text_view_reset_im_context() for an example of use.
8291 // RETURNS: %TRUE if the input method handled the key event.
8292 // <event>: the key event
8293 int im_context_filter_keypress(Gdk2.EventKey* event) {
8294 return gtk_entry_im_context_filter_keypress(&this, event);
8297 // Converts from a position in the entry contents (returned
8298 // by gtk_entry_get_text()) to a position in the
8299 // entry's #PangoLayout (returned by gtk_entry_get_layout(),
8300 // with text retrieved via pango_layout_get_text()).
8301 // RETURNS: byte index into the entry contents
8302 // <layout_index>: byte index into the entry layout text
8303 int layout_index_to_text_index(int layout_index) {
8304 return gtk_entry_layout_index_to_text_index(&this, layout_index);
8307 // Prepends the given text to the contents of the widget.
8308 // <text>: the text to prepend
8309 void prepend_text(char* text) {
8310 gtk_entry_prepend_text(&this, text);
8313 // Indicates that some progress is made, but you don't know how much.
8314 // Causes the entry's progress indicator to enter "activity mode,"
8315 // where a block bounces back and forth. Each call to
8316 // gtk_entry_progress_pulse() causes the block to move by a little bit
8317 // (the amount of movement per pulse is determined by
8318 // gtk_entry_set_progress_pulse_step()).
8319 void progress_pulse() {
8320 gtk_entry_progress_pulse(&this);
8323 // Reset the input method context of the entry if needed.
8324 // This can be necessary in the case where modifying the buffer
8325 // would confuse on-going input method behavior.
8326 void reset_im_context() {
8327 gtk_entry_reset_im_context(&this);
8330 // Selects a region of text. The characters that are selected are
8331 // those characters at positions from @start_pos up to, but not
8332 // including @end_pos. If @end_pos is negative, then the the characters
8333 // selected will be those characters from @start_pos to the end of
8334 // the text.
8335 // <start>: the starting position
8336 // <end>: the end position
8337 void select_region(int start, int end) {
8338 gtk_entry_select_region(&this, start, end);
8341 // If @setting is %TRUE, pressing Enter in the @entry will activate the default
8342 // widget for the window containing the entry. This usually means that
8343 // the dialog box containing the entry will be closed, since the default
8344 // widget is usually one of the dialog buttons.
8345 // (For experts: if @setting is %TRUE, the entry calls
8346 // gtk_window_activate_default() on the window containing the entry, in
8347 // the default handler for the #GtkWidget::activate signal.)
8348 // <setting>: %TRUE to activate window's default widget on Enter keypress
8349 void set_activates_default(int setting) {
8350 gtk_entry_set_activates_default(&this, setting);
8353 // Sets the alignment for the contents of the entry. This controls
8354 // the horizontal positioning of the contents when the displayed
8355 // text is shorter than the width of the entry.
8356 // <xalign>: The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
8357 void set_alignment(float xalign) {
8358 gtk_entry_set_alignment(&this, xalign);
8361 // Set the #GtkEntryBuffer object which holds the text for
8362 // this widget.
8363 // <buffer>: a #GtkEntryBuffer
8364 void set_buffer(EntryBuffer* buffer) {
8365 gtk_entry_set_buffer(&this, buffer);
8368 // Sets @completion to be the auxiliary completion object to use with @entry.
8369 // All further configuration of the completion mechanism is done on
8370 // <completion>: The #GtkEntryCompletion or %NULL
8371 void set_completion(EntryCompletion* completion=null) {
8372 gtk_entry_set_completion(&this, completion);
8375 // Hooks up an adjustment to the cursor position in an entry, so that when
8376 // the cursor is moved, the adjustment is scrolled to show that position.
8377 // See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
8378 // the adjustment.
8379 // The adjustment has to be in pixel units and in the same coordinate system
8380 // as the entry.
8381 // <adjustment>: an adjustment which should be adjusted when the cursor is moved, or %NULL
8382 void set_cursor_hadjustment(Adjustment* adjustment) {
8383 gtk_entry_set_cursor_hadjustment(&this, adjustment);
8386 // Determines if the user can edit the text in the editable
8387 // widget or not.
8388 // <editable>: %TRUE if the user is allowed to edit the text in the widget
8389 void set_editable(int editable) {
8390 gtk_entry_set_editable(&this, editable);
8393 // Sets whether the entry has a beveled frame around it.
8394 // <setting>: new value
8395 void set_has_frame(int setting) {
8396 gtk_entry_set_has_frame(&this, setting);
8399 // Sets whether the icon is activatable.
8400 // <icon_pos>: Icon position
8401 // <activatable>: %TRUE if the icon should be activatable
8402 void set_icon_activatable(EntryIconPosition icon_pos, int activatable) {
8403 gtk_entry_set_icon_activatable(&this, icon_pos, activatable);
8406 // Sets up the icon at the given position so that GTK+ will start a drag
8407 // operation when the user clicks and drags the icon.
8408 // To handle the drag operation, you need to connect to the usual
8409 // #GtkWidget::drag-data-get (or possibly #GtkWidget::drag-data-delete)
8410 // signal, and use gtk_entry_get_current_icon_drag_source() in
8411 // your signal handler to find out if the drag was started from
8412 // an icon.
8413 // By default, GTK+ uses the icon as the drag icon. You can use the
8414 // #GtkWidget::drag-begin signal to set a different icon. Note that you
8415 // have to use g_signal_connect_after() to ensure that your signal handler
8416 // gets executed after the default handler.
8417 // <icon_pos>: icon position
8418 // <target_list>: the targets (data formats) in which the data can be provided
8419 // <actions>: a bitmask of the allowed drag actions
8420 void set_icon_drag_source(EntryIconPosition icon_pos, TargetList* target_list, Gdk2.DragAction actions) {
8421 gtk_entry_set_icon_drag_source(&this, icon_pos, target_list, actions);
8424 // Sets the icon shown in the entry at the specified position
8425 // from the current icon theme.
8426 // If the icon isn't known, a "broken image" icon will be displayed
8427 // instead.
8428 // If @icon is %NULL, no icon will be shown in the specified position.
8429 // <icon_pos>: The position at which to set the icon
8430 // <icon>: The icon to set, or %NULL
8431 void set_icon_from_gicon(EntryIconPosition icon_pos, Gio2.Icon* icon=null) {
8432 gtk_entry_set_icon_from_gicon(&this, icon_pos, icon);
8435 // Sets the icon shown in the entry at the specified position
8436 // from the current icon theme.
8437 // If the icon name isn't known, a "broken image" icon will be displayed
8438 // instead.
8439 // If @icon_name is %NULL, no icon will be shown in the specified position.
8440 // <icon_pos>: The position at which to set the icon
8441 // <icon_name>: An icon name, or %NULL
8442 void set_icon_from_icon_name(EntryIconPosition icon_pos, char* icon_name=null) {
8443 gtk_entry_set_icon_from_icon_name(&this, icon_pos, icon_name);
8446 // Sets the icon shown in the specified position using a pixbuf.
8447 // If @pixbuf is %NULL, no icon will be shown in the specified position.
8448 // <icon_pos>: Icon position
8449 // <pixbuf>: A #GdkPixbuf, or %NULL
8450 void set_icon_from_pixbuf(EntryIconPosition icon_pos, GdkPixbuf2.Pixbuf* pixbuf=null) {
8451 gtk_entry_set_icon_from_pixbuf(&this, icon_pos, pixbuf);
8454 // Sets the icon shown in the entry at the specified position from
8455 // a stock image.
8456 // If @stock_id is %NULL, no icon will be shown in the specified position.
8457 // <icon_pos>: Icon position
8458 // <stock_id>: The name of the stock item, or %NULL
8459 void set_icon_from_stock(EntryIconPosition icon_pos, char* stock_id=null) {
8460 gtk_entry_set_icon_from_stock(&this, icon_pos, stock_id);
8463 // Sets the sensitivity for the specified icon.
8464 // <icon_pos>: Icon position
8465 // <sensitive>: Specifies whether the icon should appear sensitive or insensitive
8466 void set_icon_sensitive(EntryIconPosition icon_pos, int sensitive) {
8467 gtk_entry_set_icon_sensitive(&this, icon_pos, sensitive);
8470 // Sets @tooltip as the contents of the tooltip for the icon at
8471 // the specified position. @tooltip is assumed to be marked up with
8472 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
8473 // Use %NULL for @tooltip to remove an existing tooltip.
8474 // See also gtk_widget_set_tooltip_markup() and
8475 // gtk_enty_set_icon_tooltip_text().
8476 // <icon_pos>: the icon position
8477 // <tooltip>: the contents of the tooltip for the icon, or %NULL
8478 void set_icon_tooltip_markup(EntryIconPosition icon_pos, char* tooltip=null) {
8479 gtk_entry_set_icon_tooltip_markup(&this, icon_pos, tooltip);
8482 // Sets @tooltip as the contents of the tooltip for the icon
8483 // at the specified position.
8484 // Use %NULL for @tooltip to remove an existing tooltip.
8485 // See also gtk_widget_set_tooltip_text() and
8486 // gtk_entry_set_icon_tooltip_markup().
8487 // <icon_pos>: the icon position
8488 // <tooltip>: the contents of the tooltip for the icon, or %NULL
8489 void set_icon_tooltip_text(EntryIconPosition icon_pos, char* tooltip=null) {
8490 gtk_entry_set_icon_tooltip_text(&this, icon_pos, tooltip);
8493 // Sets %entry's inner-border property to %border, or clears it if %NULL
8494 // is passed. The inner-border is the area around the entry's text, but
8495 // inside its frame.
8496 // If set, this property overrides the inner-border style property.
8497 // Overriding the style-provided border is useful when you want to do
8498 // in-place editing of some text in a canvas or list widget, where
8499 // pixel-exact positioning of the entry is important.
8500 // <border>: a #GtkBorder, or %NULL
8501 void set_inner_border(Border* border=null) {
8502 gtk_entry_set_inner_border(&this, border);
8505 // Sets the character to use in place of the actual text when
8506 // gtk_entry_set_visibility() has been called to set text visibility
8507 // to %FALSE. i.e. this is the character used in "password mode" to
8508 // show the user how many characters have been typed. By default, GTK+
8509 // picks the best invisible char available in the current font. If you
8510 // set the invisible char to 0, then the user will get no feedback
8511 // at all; there will be no text on the screen as they type.
8512 // <ch>: a Unicode character
8513 void set_invisible_char(dchar ch) {
8514 gtk_entry_set_invisible_char(&this, ch);
8517 // Sets the maximum allowed length of the contents of the widget. If
8518 // the current contents are longer than the given length, then they
8519 // will be truncated to fit.
8520 // This is equivalent to:
8521 // <informalexample><programlisting>
8522 // gtk_entry_buffer_set_max_length (gtk_entry_get_buffer (entry), max);
8523 // </programlisting></informalexample>
8524 // <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.
8525 void set_max_length(int max) {
8526 gtk_entry_set_max_length(&this, max);
8529 // Sets whether the text is overwritten when typing in the #GtkEntry.
8530 // <overwrite>: new value
8531 void set_overwrite_mode(int overwrite) {
8532 gtk_entry_set_overwrite_mode(&this, overwrite);
8535 // Sets the cursor position in an entry to the given value.
8536 // <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.
8537 void set_position(int position) {
8538 gtk_entry_set_position(&this, position);
8541 // Causes the entry's progress indicator to "fill in" the given
8542 // fraction of the bar. The fraction should be between 0.0 and 1.0,
8543 // inclusive.
8544 // <fraction>: fraction of the task that's been completed
8545 void set_progress_fraction(double fraction) {
8546 gtk_entry_set_progress_fraction(&this, fraction);
8549 // Sets the fraction of total entry width to move the progress
8550 // bouncing block for each call to gtk_entry_progress_pulse().
8551 // <fraction>: fraction between 0.0 and 1.0
8552 void set_progress_pulse_step(double fraction) {
8553 gtk_entry_set_progress_pulse_step(&this, fraction);
8556 // Sets the text in the widget to the given
8557 // value, replacing the current contents.
8558 // See gtk_entry_buffer_set_text().
8559 // <text>: the new text
8560 void set_text(char* text) {
8561 gtk_entry_set_text(&this, text);
8564 // Sets whether the contents of the entry are visible or not.
8565 // When visibility is set to %FALSE, characters are displayed
8566 // as the invisible char, and will also appear that way when
8567 // the text in the entry widget is copied elsewhere.
8568 // By default, GTK+ picks the best invisible character available
8569 // in the current font, but it can be changed with
8570 // gtk_entry_set_invisible_char().
8571 // <visible>: %TRUE if the contents of the entry are displayed as plaintext
8572 void set_visibility(int visible) {
8573 gtk_entry_set_visibility(&this, visible);
8576 // Changes the size request of the entry to be about the right size
8577 // for @n_chars characters. Note that it changes the size
8578 // <emphasis>request</emphasis>, the size can still be affected by
8579 // how you pack the widget into containers. If @n_chars is -1, the
8580 // size reverts to the default entry size.
8581 // <n_chars>: width in chars
8582 void set_width_chars(int n_chars) {
8583 gtk_entry_set_width_chars(&this, n_chars);
8586 // Converts from a position in the entry's #PangoLayout (returned by
8587 // gtk_entry_get_layout()) to a position in the entry contents
8588 // (returned by gtk_entry_get_text()).
8589 // RETURNS: byte index into the entry layout text
8590 // <text_index>: byte index into the entry contents
8591 int text_index_to_layout_index(int text_index) {
8592 return gtk_entry_text_index_to_layout_index(&this, text_index);
8595 // Unsets the invisible char previously set with
8596 // gtk_entry_set_invisible_char(). So that the
8597 // default invisible char is used again.
8598 void unset_invisible_char() {
8599 gtk_entry_unset_invisible_char(&this);
8602 // A <link linkend="keybinding-signals">keybinding signal</link>
8603 // which gets emitted when the user activates the entry.
8604 // Applications should not connect to it, but may emit it with
8605 // g_signal_emit_by_name() if they need to control activation
8606 // programmatically.
8607 // The default bindings for this signal are all forms of the Enter key.
8608 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_activate;
8610 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8611 return super_.signal_connect!name(cb, data, cf);
8614 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8615 return signal_connect_data(&this, cast(char*)"activate",
8616 cast(GObject2.Callback)cb, data, null, cf);
8619 // The ::backspace signal is a
8620 // <link linkend="keybinding-signals">keybinding signal</link>
8621 // which gets emitted when the user asks for it.
8622 // The default bindings for this signal are
8623 // Backspace and Shift-Backspace.
8624 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_backspace;
8625 ulong signal_connect(string name:"backspace", CB/*:signal_backspace*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8626 return signal_connect_data(&this, cast(char*)"backspace",
8627 cast(GObject2.Callback)cb, data, null, cf);
8630 // The ::copy-clipboard signal is a
8631 // <link linkend="keybinding-signals">keybinding signal</link>
8632 // which gets emitted to copy the selection to the clipboard.
8633 // The default bindings for this signal are
8634 // Ctrl-c and Ctrl-Insert.
8635 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_copy_clipboard;
8636 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8637 return signal_connect_data(&this, cast(char*)"copy-clipboard",
8638 cast(GObject2.Callback)cb, data, null, cf);
8641 // The ::cut-clipboard signal is a
8642 // <link linkend="keybinding-signals">keybinding signal</link>
8643 // which gets emitted to cut the selection to the clipboard.
8644 // The default bindings for this signal are
8645 // Ctrl-x and Shift-Delete.
8646 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_cut_clipboard;
8647 ulong signal_connect(string name:"cut-clipboard", CB/*:signal_cut_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8648 return signal_connect_data(&this, cast(char*)"cut-clipboard",
8649 cast(GObject2.Callback)cb, data, null, cf);
8652 // The ::delete-from-cursor signal is a
8653 // <link linkend="keybinding-signals">keybinding signal</link>
8654 // which gets emitted when the user initiates a text deletion.
8655 // If the @type is %GTK_DELETE_CHARS, GTK+ deletes the selection
8656 // if there is one, otherwise it deletes the requested number
8657 // of characters.
8658 // The default bindings for this signal are
8659 // Delete for deleting a character and Ctrl-Delete for
8660 // deleting a word.
8661 // <type>: the granularity of the deletion, as a #GtkDeleteType
8662 // <count>: the number of @type units to delete
8663 extern (C) alias static void function (Entry* this_, DeleteType* type, int count, void* user_data=null) signal_delete_from_cursor;
8664 ulong signal_connect(string name:"delete-from-cursor", CB/*:signal_delete_from_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8665 return signal_connect_data(&this, cast(char*)"delete-from-cursor",
8666 cast(GObject2.Callback)cb, data, null, cf);
8669 // The ::icon-press signal is emitted when an activatable icon
8670 // is clicked.
8671 // <icon_pos>: The position of the clicked icon
8672 // <event>: the button press event
8673 extern (C) alias static void function (Entry* this_, EntryIconPosition* icon_pos, Gdk2.Event* event, void* user_data=null) signal_icon_press;
8674 ulong signal_connect(string name:"icon-press", CB/*:signal_icon_press*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8675 return signal_connect_data(&this, cast(char*)"icon-press",
8676 cast(GObject2.Callback)cb, data, null, cf);
8679 // The ::icon-release signal is emitted on the button release from a
8680 // mouse click over an activatable icon.
8681 // <icon_pos>: The position of the clicked icon
8682 // <event>: the button release event
8683 extern (C) alias static void function (Entry* this_, EntryIconPosition* icon_pos, Gdk2.Event* event, void* user_data=null) signal_icon_release;
8684 ulong signal_connect(string name:"icon-release", CB/*:signal_icon_release*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8685 return signal_connect_data(&this, cast(char*)"icon-release",
8686 cast(GObject2.Callback)cb, data, null, cf);
8689 // The ::insert-at-cursor signal is a
8690 // <link linkend="keybinding-signals">keybinding signal</link>
8691 // which gets emitted when the user initiates the insertion of a
8692 // fixed string at the cursor.
8693 // This signal has no default bindings.
8694 // <string>: the string to insert
8695 extern (C) alias static void function (Entry* this_, char* string_, void* user_data=null) signal_insert_at_cursor;
8696 ulong signal_connect(string name:"insert-at-cursor", CB/*:signal_insert_at_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8697 return signal_connect_data(&this, cast(char*)"insert-at-cursor",
8698 cast(GObject2.Callback)cb, data, null, cf);
8701 // The ::move-cursor signal is a
8702 // <link linkend="keybinding-signals">keybinding signal</link>
8703 // which gets emitted when the user initiates a cursor movement.
8704 // If the cursor is not visible in @entry, this signal causes
8705 // the viewport to be moved instead.
8706 // Applications should not connect to it, but may emit it with
8707 // g_signal_emit_by_name() if they need to control the cursor
8708 // programmatically.
8709 // The default bindings for this signal come in two variants,
8710 // the variant with the Shift modifier extends the selection,
8711 // the variant without the Shift modifer does not.
8712 // There are too many key combinations to list them all here.
8713 // <itemizedlist>
8714 // <listitem>Arrow keys move by individual characters/lines</listitem>
8715 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
8716 // <listitem>Home/End keys move to the ends of the buffer</listitem>
8717 // </itemizedlist>
8718 // <step>: the granularity of the move, as a #GtkMovementStep
8719 // <count>: the number of @step units to move
8720 // <extend_selection>: %TRUE if the move should extend the selection
8721 extern (C) alias static void function (Entry* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) signal_move_cursor;
8722 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8723 return signal_connect_data(&this, cast(char*)"move-cursor",
8724 cast(GObject2.Callback)cb, data, null, cf);
8727 // The ::paste-clipboard signal is a
8728 // <link linkend="keybinding-signals">keybinding signal</link>
8729 // which gets emitted to paste the contents of the clipboard
8730 // into the text view.
8731 // The default bindings for this signal are
8732 // Ctrl-v and Shift-Insert.
8733 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_paste_clipboard;
8734 ulong signal_connect(string name:"paste-clipboard", CB/*:signal_paste_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8735 return signal_connect_data(&this, cast(char*)"paste-clipboard",
8736 cast(GObject2.Callback)cb, data, null, cf);
8739 // The ::populate-popup signal gets emitted before showing the
8740 // context menu of the entry.
8741 // If you need to add items to the context menu, connect
8742 // to this signal and append your menuitems to the @menu.
8743 // <menu>: the menu that is being populated
8744 extern (C) alias static void function (Entry* this_, Menu* menu, void* user_data=null) signal_populate_popup;
8745 ulong signal_connect(string name:"populate-popup", CB/*:signal_populate_popup*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8746 return signal_connect_data(&this, cast(char*)"populate-popup",
8747 cast(GObject2.Callback)cb, data, null, cf);
8750 // If an input method is used, the typed text will not immediately
8751 // be committed to the buffer. So if you are interested in the text,
8752 // connect to this signal.
8753 // <preedit>: the current preedit string
8754 extern (C) alias static void function (Entry* this_, char* preedit, void* user_data=null) signal_preedit_changed;
8755 ulong signal_connect(string name:"preedit-changed", CB/*:signal_preedit_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8756 return signal_connect_data(&this, cast(char*)"preedit-changed",
8757 cast(GObject2.Callback)cb, data, null, cf);
8760 // The ::toggle-overwrite signal is a
8761 // <link linkend="keybinding-signals">keybinding signal</link>
8762 // which gets emitted to toggle the overwrite mode of the entry.
8763 // The default bindings for this signal is Insert.
8764 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_toggle_overwrite;
8765 ulong signal_connect(string name:"toggle-overwrite", CB/*:signal_toggle_overwrite*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8766 return signal_connect_data(&this, cast(char*)"toggle-overwrite",
8767 cast(GObject2.Callback)cb, data, null, cf);
8772 // The #GtkEntryBuffer class contains the actual text displayed in a
8773 // #GtkEntry widget.
8774 // A single #GtkEntryBuffer object can be shared by multiple #GtkEntry
8775 // widgets which will then share the same text content, but not the cursor
8776 // position, visibility attributes, icon etc.
8777 // #GtkEntryBuffer may be derived from. Such a derived class might allow
8778 // text to be stored in an alternate location, such as non-pageable memory,
8779 // useful in the case of important passwords. Or a derived class could
8780 // integrate with an application's concept of undo/redo.
8781 struct EntryBuffer /* : GObject.Object */ {
8782 alias parent_instance this;
8783 alias parent_instance super_;
8784 alias parent_instance object;
8785 GObject2.Object parent_instance;
8786 private EntryBufferPrivate* priv;
8789 // Create a new GtkEntryBuffer object.
8790 // Optionally, specify initial text to set in the buffer.
8791 // RETURNS: A new GtkEntryBuffer object.
8792 // <initial_chars>: initial buffer text, or %NULL
8793 // <n_initial_chars>: number of characters in @initial_chars, or -1
8794 static EntryBuffer* /*new*/ new_(char* initial_chars, int n_initial_chars) {
8795 return gtk_entry_buffer_new(initial_chars, n_initial_chars);
8798 // Deletes a sequence of characters from the buffer. @n_chars characters are
8799 // deleted starting at @position. If @n_chars is negative, then all characters
8800 // until the end of the text are deleted.
8801 // If @position or @n_chars are out of bounds, then they are coerced to sane
8802 // values.
8803 // Note that the positions are specified in characters, not bytes.
8804 // RETURNS: The number of characters deleted.
8805 // <position>: position at which to delete text
8806 // <n_chars>: number of characters to delete
8807 uint delete_text(uint position, int n_chars) {
8808 return gtk_entry_buffer_delete_text(&this, position, n_chars);
8811 // Used when subclassing #GtkEntryBuffer
8812 // <position>: position at which text was deleted
8813 // <n_chars>: number of characters deleted
8814 void emit_deleted_text(uint position, uint n_chars) {
8815 gtk_entry_buffer_emit_deleted_text(&this, position, n_chars);
8818 // Used when subclassing #GtkEntryBuffer
8819 // <position>: position at which text was inserted
8820 // <chars>: text that was inserted
8821 // <n_chars>: number of characters inserted
8822 void emit_inserted_text(uint position, char* chars, uint n_chars) {
8823 gtk_entry_buffer_emit_inserted_text(&this, position, chars, n_chars);
8826 // Retrieves the length in bytes of the buffer.
8827 // See gtk_entry_buffer_get_length().
8828 // RETURNS: The byte length of the buffer.
8829 size_t get_bytes() {
8830 return gtk_entry_buffer_get_bytes(&this);
8833 // Retrieves the length in characters of the buffer.
8834 // RETURNS: The number of characters in the buffer.
8835 uint get_length() {
8836 return gtk_entry_buffer_get_length(&this);
8839 // Retrieves the maximum allowed length of the text in
8840 // in #GtkEntryBuffer, or 0 if there is no maximum.
8841 // RETURNS: the maximum allowed number of characters
8842 int get_max_length() {
8843 return gtk_entry_buffer_get_max_length(&this);
8846 // Retrieves the contents of the buffer.
8847 // The memory pointer returned by this call will not change
8848 // unless this object emits a signal, or is finalized.
8849 // string. This string points to internally allocated
8850 // storage in the buffer and must not be freed, modified or
8851 // stored.
8852 // RETURNS: a pointer to the contents of the widget as a
8853 char* get_text() {
8854 return gtk_entry_buffer_get_text(&this);
8857 // Inserts @n_chars characters of @chars into the contents of the
8858 // buffer, at position @position.
8859 // If @n_chars is negative, then characters from chars will be inserted
8860 // until a null-terminator is found. If @position or @n_chars are out of
8861 // bounds, or the maximum buffer text length is exceeded, then they are
8862 // coerced to sane values.
8863 // Note that the position and length are in characters, not in bytes.
8864 // RETURNS: The number of characters actually inserted.
8865 // <position>: the position at which to insert text.
8866 // <chars>: the text to insert into the buffer.
8867 // <n_chars>: the length of the text in characters, or -1
8868 uint insert_text(uint position, char* chars, int n_chars) {
8869 return gtk_entry_buffer_insert_text(&this, position, chars, n_chars);
8872 // Sets the maximum allowed length of the contents of the buffer. If
8873 // the current contents are longer than the given length, then they
8874 // will be truncated to fit.
8875 // <max_length>: the maximum length of the entry buffer, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.
8876 void set_max_length(int max_length) {
8877 gtk_entry_buffer_set_max_length(&this, max_length);
8880 // Sets the text in the buffer.
8881 // This is roughly equivalent to calling gtk_entry_buffer_delete_text()
8882 // and gtk_entry_buffer_insert_text().
8883 // Note that @n_chars is in characters, not in bytes.
8884 // <chars>: the new text
8885 // <n_chars>: the number of characters in @text, or -1
8886 void set_text(char* chars, int n_chars) {
8887 gtk_entry_buffer_set_text(&this, chars, n_chars);
8890 // This signal is emitted after text is deleted from the buffer.
8891 // <position>: the position the text was deleted at.
8892 // <n_chars>: The number of characters that were deleted.
8893 extern (C) alias static void function (EntryBuffer* this_, c_uint position, c_uint n_chars, void* user_data=null) signal_deleted_text;
8895 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8896 return super_.signal_connect!name(cb, data, cf);
8899 ulong signal_connect(string name:"deleted-text", CB/*:signal_deleted_text*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8900 return signal_connect_data(&this, cast(char*)"deleted-text",
8901 cast(GObject2.Callback)cb, data, null, cf);
8904 // This signal is emitted after text is inserted into the buffer.
8905 // <position>: the position the text was inserted at.
8906 // <chars>: The text that was inserted.
8907 // <n_chars>: The number of characters that were inserted.
8908 extern (C) alias static void function (EntryBuffer* this_, c_uint position, char* chars, c_uint n_chars, void* user_data=null) signal_inserted_text;
8909 ulong signal_connect(string name:"inserted-text", CB/*:signal_inserted_text*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8910 return signal_connect_data(&this, cast(char*)"inserted-text",
8911 cast(GObject2.Callback)cb, data, null, cf);
8915 struct EntryBufferClass {
8916 GObject2.ObjectClass parent_class;
8917 extern (C) void function (EntryBuffer* buffer, uint position, char* chars, uint n_chars) inserted_text;
8918 extern (C) void function (EntryBuffer* buffer, uint position, uint n_chars) deleted_text;
8919 extern (C) char* function (EntryBuffer* buffer, size_t* n_bytes) get_text;
8920 // RETURNS: The number of characters in the buffer.
8921 extern (C) uint function (EntryBuffer* buffer) get_length;
8923 // RETURNS: The number of characters actually inserted.
8924 // <position>: the position at which to insert text.
8925 // <chars>: the text to insert into the buffer.
8926 // <n_chars>: the length of the text in characters, or -1
8927 extern (C) uint function (EntryBuffer* buffer, uint position, char* chars, uint n_chars) insert_text;
8929 // RETURNS: The number of characters deleted.
8930 // <position>: position at which to delete text
8931 // <n_chars>: number of characters to delete
8932 extern (C) uint function (EntryBuffer* buffer, uint position, uint n_chars) delete_text;
8933 extern (C) void function () _gtk_reserved0;
8934 extern (C) void function () _gtk_reserved1;
8935 extern (C) void function () _gtk_reserved2;
8936 extern (C) void function () _gtk_reserved3;
8937 extern (C) void function () _gtk_reserved4;
8938 extern (C) void function () _gtk_reserved5;
8941 struct EntryBufferPrivate {
8944 struct EntryClass {
8945 WidgetClass parent_class;
8946 extern (C) void function (Entry* entry, Menu* menu) populate_popup;
8947 extern (C) void function (Entry* entry) activate;
8948 extern (C) void function (Entry* entry, MovementStep step, int count, int extend_selection) move_cursor;
8949 extern (C) void function (Entry* entry, char* str) insert_at_cursor;
8950 extern (C) void function (Entry* entry, DeleteType type, int count) delete_from_cursor;
8951 extern (C) void function (Entry* entry) backspace;
8952 extern (C) void function (Entry* entry) cut_clipboard;
8953 extern (C) void function (Entry* entry) copy_clipboard;
8954 extern (C) void function (Entry* entry) paste_clipboard;
8955 extern (C) void function (Entry* entry) toggle_overwrite;
8956 extern (C) void function (Entry* entry, int* x, int* y, int* width, int* height) get_text_area_size;
8957 extern (C) void function () _gtk_reserved1;
8958 extern (C) void function () _gtk_reserved2;
8961 struct EntryCompletion /* : GObject.Object */ {
8962 alias parent_instance this;
8963 alias parent_instance super_;
8964 alias parent_instance object;
8965 GObject2.Object parent_instance;
8966 private EntryCompletionPrivate* priv;
8969 // Creates a new #GtkEntryCompletion object.
8970 // RETURNS: A newly created #GtkEntryCompletion object.
8971 static EntryCompletion* /*new*/ new_() {
8972 return gtk_entry_completion_new();
8975 // Requests a completion operation, or in other words a refiltering of the
8976 // current list with completions, using the current key. The completion list
8977 // view will be updated accordingly.
8978 void complete() {
8979 gtk_entry_completion_complete(&this);
8982 // Deletes the action at @index_ from @completion's action list.
8983 // <index_>: The index of the item to Delete.
8984 void delete_action(int index_) {
8985 gtk_entry_completion_delete_action(&this, index_);
8988 // Get the original text entered by the user that triggered
8989 // the completion or %NULL if there's no completion ongoing.
8990 // RETURNS: the prefix for the current completion
8991 char* get_completion_prefix() {
8992 return gtk_entry_completion_get_completion_prefix(&this);
8995 // Gets the entry @completion has been attached to.
8996 // RETURNS: The entry @completion has been attached to.
8997 Widget* get_entry() {
8998 return gtk_entry_completion_get_entry(&this);
9001 // Returns whether the common prefix of the possible completions should
9002 // be automatically inserted in the entry.
9003 // RETURNS: %TRUE if inline completion is turned on
9004 int get_inline_completion() {
9005 return gtk_entry_completion_get_inline_completion(&this);
9008 // Returns %TRUE if inline-selection mode is turned on.
9009 // RETURNS: %TRUE if inline-selection mode is on
9010 int get_inline_selection() {
9011 return gtk_entry_completion_get_inline_selection(&this);
9014 // Returns the minimum key length as set for @completion.
9015 // RETURNS: The currently used minimum key length.
9016 int get_minimum_key_length() {
9017 return gtk_entry_completion_get_minimum_key_length(&this);
9020 // Returns the model the #GtkEntryCompletion is using as data source.
9021 // Returns %NULL if the model is unset.
9022 // is currently being used.
9023 // RETURNS: A #GtkTreeModel, or %NULL if none
9024 TreeModel* get_model() {
9025 return gtk_entry_completion_get_model(&this);
9028 // Returns whether the completions should be presented in a popup window.
9029 // RETURNS: %TRUE if popup completion is turned on
9030 int get_popup_completion() {
9031 return gtk_entry_completion_get_popup_completion(&this);
9034 // Returns whether the completion popup window will be resized to the
9035 // width of the entry.
9036 // the entry
9037 // RETURNS: %TRUE if the popup window will be resized to the width of
9038 int get_popup_set_width() {
9039 return gtk_entry_completion_get_popup_set_width(&this);
9042 // Returns whether the completion popup window will appear even if there is
9043 // only a single match.
9044 // number of matches.
9045 // RETURNS: %TRUE if the popup window will appear regardless of the
9046 int get_popup_single_match() {
9047 return gtk_entry_completion_get_popup_single_match(&this);
9050 // Returns the column in the model of @completion to get strings from.
9051 // RETURNS: the column containing the strings
9052 int get_text_column() {
9053 return gtk_entry_completion_get_text_column(&this);
9056 // Inserts an action in @completion's action item list at position @index_
9057 // with markup @markup.
9058 // <index_>: The index of the item to insert.
9059 // <markup>: Markup of the item to insert.
9060 void insert_action_markup(int index_, char* markup) {
9061 gtk_entry_completion_insert_action_markup(&this, index_, markup);
9064 // Inserts an action in @completion's action item list at position @index_
9065 // with text @text. If you want the action item to have markup, use
9066 // gtk_entry_completion_insert_action_markup().
9067 // <index_>: The index of the item to insert.
9068 // <text>: Text of the item to insert.
9069 void insert_action_text(int index_, char* text) {
9070 gtk_entry_completion_insert_action_text(&this, index_, text);
9072 // Requests a prefix insertion.
9073 void insert_prefix() {
9074 gtk_entry_completion_insert_prefix(&this);
9077 // Sets whether the common prefix of the possible completions should
9078 // be automatically inserted in the entry.
9079 // <inline_completion>: %TRUE to do inline completion
9080 void set_inline_completion(int inline_completion) {
9081 gtk_entry_completion_set_inline_completion(&this, inline_completion);
9084 // Sets whether it is possible to cycle through the possible completions
9085 // inside the entry.
9086 // <inline_selection>: %TRUE to do inline selection
9087 void set_inline_selection(int inline_selection) {
9088 gtk_entry_completion_set_inline_selection(&this, inline_selection);
9091 // Sets the match function for @completion to be @func. The match function
9092 // is used to determine if a row should or should not be in the completion
9093 // list.
9094 // <func>: The #GtkEntryCompletionMatchFunc to use.
9095 // <func_data>: The user data for @func.
9096 // <func_notify>: Destroy notifier for @func_data.
9097 void set_match_func(EntryCompletionMatchFunc func, void* func_data, GLib2.DestroyNotify func_notify) {
9098 gtk_entry_completion_set_match_func(&this, func, func_data, func_notify);
9101 // Requires the length of the search key for @completion to be at least
9102 // key takes a lot of time and will come up with meaningless results anyway
9103 // (ie, a too large dataset).
9104 // <length>: The minimum length of the key in order to start completing.
9105 void set_minimum_key_length(int length) {
9106 gtk_entry_completion_set_minimum_key_length(&this, length);
9109 // Sets the model for a #GtkEntryCompletion. If @completion already has
9110 // a model set, it will remove it before setting the new model.
9111 // If model is %NULL, then it will unset the model.
9112 // <model>: The #GtkTreeModel.
9113 void set_model(TreeModel* model=null) {
9114 gtk_entry_completion_set_model(&this, model);
9117 // Sets whether the completions should be presented in a popup window.
9118 // <popup_completion>: %TRUE to do popup completion
9119 void set_popup_completion(int popup_completion) {
9120 gtk_entry_completion_set_popup_completion(&this, popup_completion);
9123 // Sets whether the completion popup window will be resized to be the same
9124 // width as the entry.
9125 // <popup_set_width>: %TRUE to make the width of the popup the same as the entry
9126 void set_popup_set_width(int popup_set_width) {
9127 gtk_entry_completion_set_popup_set_width(&this, popup_set_width);
9130 // Sets whether the completion popup window will appear even if there is
9131 // only a single match. You may want to set this to %FALSE if you
9132 // are using <link linkend="GtkEntryCompletion--inline-completion">inline
9133 // completion</link>.
9134 // <popup_single_match>: %TRUE if the popup should appear even for a single match
9135 void set_popup_single_match(int popup_single_match) {
9136 gtk_entry_completion_set_popup_single_match(&this, popup_single_match);
9139 // completion list with just strings. This function will set up @completion
9140 // to have a list displaying all (and just) strings in the completion list,
9141 // and to get those strings from @column in the model of @completion.
9142 // This functions creates and adds a #GtkCellRendererText for the selected
9143 // column. If you need to set the text column, but don't want the cell
9144 // renderer, use g_object_set() to set the ::text_column property directly.
9145 // <column>: The column in the model of @completion to get strings from.
9146 void set_text_column(int column) {
9147 gtk_entry_completion_set_text_column(&this, column);
9150 // Gets emitted when an action is activated.
9151 // <index>: the index of the activated action
9152 extern (C) alias static void function (EntryCompletion* this_, int index, void* user_data=null) signal_action_activated;
9154 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9155 return super_.signal_connect!name(cb, data, cf);
9158 ulong signal_connect(string name:"action-activated", CB/*:signal_action_activated*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9159 return signal_connect_data(&this, cast(char*)"action-activated",
9160 cast(GObject2.Callback)cb, data, null, cf);
9163 // Gets emitted when a match from the cursor is on a match
9164 // of the list.The default behaviour is to replace the contents
9165 // of the entry with the contents of the text column in the row
9166 // pointed to by @iter.
9167 // RETURNS: %TRUE if the signal has been handled
9168 // <model>: the #GtkTreeModel containing the matches
9169 // <iter>: a #GtkTreeIter positioned at the selected match
9170 extern (C) alias static c_int function (EntryCompletion* this_, TreeModel* model, TreeIter* iter, void* user_data=null) signal_cursor_on_match;
9171 ulong signal_connect(string name:"cursor-on-match", CB/*:signal_cursor_on_match*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9172 return signal_connect_data(&this, cast(char*)"cursor-on-match",
9173 cast(GObject2.Callback)cb, data, null, cf);
9176 // Gets emitted when the inline autocompletion is triggered.
9177 // The default behaviour is to make the entry display the
9178 // whole prefix and select the newly inserted part.
9179 // Applications may connect to this signal in order to insert only a
9180 // smaller part of the @prefix into the entry - e.g. the entry used in
9181 // the #GtkFileChooser inserts only the part of the prefix up to the
9182 // next '/'.
9183 // RETURNS: %TRUE if the signal has been handled
9184 // <prefix>: the common prefix of all possible completions
9185 extern (C) alias static c_int function (EntryCompletion* this_, char* prefix, void* user_data=null) signal_insert_prefix;
9186 ulong signal_connect(string name:"insert-prefix", CB/*:signal_insert_prefix*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9187 return signal_connect_data(&this, cast(char*)"insert-prefix",
9188 cast(GObject2.Callback)cb, data, null, cf);
9191 // Gets emitted when a match from the list is selected.
9192 // The default behaviour is to replace the contents of the
9193 // entry with the contents of the text column in the row
9194 // pointed to by @iter.
9195 // RETURNS: %TRUE if the signal has been handled
9196 // <model>: the #GtkTreeModel containing the matches
9197 // <iter>: a #GtkTreeIter positioned at the selected match
9198 extern (C) alias static c_int function (EntryCompletion* this_, TreeModel* model, TreeIter* iter, void* user_data=null) signal_match_selected;
9199 ulong signal_connect(string name:"match-selected", CB/*:signal_match_selected*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9200 return signal_connect_data(&this, cast(char*)"match-selected",
9201 cast(GObject2.Callback)cb, data, null, cf);
9205 struct EntryCompletionClass {
9206 GObject2.ObjectClass parent_class;
9207 extern (C) int function (EntryCompletion* completion, TreeModel* model, TreeIter* iter) match_selected;
9208 extern (C) void function (EntryCompletion* completion, int index_) action_activated;
9209 extern (C) int function (EntryCompletion* completion, char* prefix) insert_prefix;
9210 extern (C) int function (EntryCompletion* completion, TreeModel* model, TreeIter* iter) cursor_on_match;
9211 extern (C) void function () _gtk_reserved0;
9212 extern (C) void function () _gtk_reserved1;
9215 extern (C) alias int function (EntryCompletion* completion, char* key, TreeIter* iter, void* user_data) EntryCompletionMatchFunc;
9217 struct EntryCompletionPrivate {
9220 enum EntryIconPosition {
9221 PRIMARY = 0,
9222 SECONDARY = 1
9224 struct EventBox /* : Bin */ {
9225 alias bin this;
9226 alias bin super_;
9227 Bin bin;
9229 static EventBox* new_() {
9230 return gtk_event_box_new();
9233 // Returns whether the event box window is above or below the
9234 // windows of its child. See gtk_event_box_set_above_child() for
9235 // details.
9236 // of its child.
9237 // RETURNS: %TRUE if the event box window is above the window
9238 int get_above_child() {
9239 return gtk_event_box_get_above_child(&this);
9242 // Returns whether the event box has a visible window.
9243 // See gtk_event_box_set_visible_window() for details.
9244 // RETURNS: %TRUE if the event box window is visible
9245 int get_visible_window() {
9246 return gtk_event_box_get_visible_window(&this);
9249 // Set whether the event box window is positioned above the windows of its child,
9250 // as opposed to below it. If the window is above, all events inside the
9251 // event box will go to the event box. If the window is below, events
9252 // in windows of child widgets will first got to that widget, and then
9253 // to its parents.
9254 // The default is to keep the window below the child.
9255 // <above_child>: %TRUE if the event box window is above the windows of its child
9256 void set_above_child(int above_child) {
9257 gtk_event_box_set_above_child(&this, above_child);
9260 // Set whether the event box uses a visible or invisible child
9261 // window. The default is to use visible windows.
9262 // In an invisible window event box, the window that the
9263 // event box creates is a %GDK_INPUT_ONLY window, which
9264 // means that it is invisible and only serves to receive
9265 // events.
9266 // A visible window event box creates a visible (%GDK_INPUT_OUTPUT)
9267 // window that acts as the parent window for all the widgets
9268 // contained in the event box.
9269 // You should generally make your event box invisible if
9270 // you just want to trap events. Creating a visible window
9271 // may cause artifacts that are visible to the user, especially
9272 // if the user is using a theme with gradients or pixmaps.
9273 // The main reason to create a non input-only event box is if
9274 // you want to set the background to a different color or
9275 // draw on it.
9276 // <note><para>
9277 // There is one unexpected issue for an invisible event box that has its
9278 // window below the child. (See gtk_event_box_set_above_child().)
9279 // Since the input-only window is not an ancestor window of any windows
9280 // that descendent widgets of the event box create, events on these
9281 // windows aren't propagated up by the windowing system, but only by GTK+.
9282 // The practical effect of this is if an event isn't in the event
9283 // mask for the descendant window (see gtk_widget_add_events()),
9284 // it won't be received by the event box.
9285 // </para><para>
9286 // This problem doesn't occur for visible event boxes, because in
9287 // that case, the event box window is actually the ancestor of the
9288 // descendant windows, not just at the same place on the screen.
9289 // </para></note>
9290 // <visible_window>: boolean value
9291 void set_visible_window(int visible_window) {
9292 gtk_event_box_set_visible_window(&this, visible_window);
9296 struct EventBoxClass {
9297 BinClass parent_class;
9300 struct Expander /* : Bin */ {
9301 alias bin this;
9302 alias bin super_;
9303 Bin bin;
9304 ExpanderPrivate* priv;
9307 // Creates a new expander using @label as the text of the label.
9308 // RETURNS: a new #GtkExpander widget.
9309 // <label>: the text of the label
9310 static Expander* new_(char* label) {
9311 return gtk_expander_new(label);
9314 // Creates a new expander using @label as the text of the label.
9315 // If characters in @label are preceded by an underscore, they are underlined.
9316 // If you need a literal underscore character in a label, use '__' (two
9317 // underscores). The first underlined character represents a keyboard
9318 // accelerator called a mnemonic.
9319 // Pressing Alt and that key activates the button.
9320 // RETURNS: a new #GtkExpander widget.
9321 // <label>: the text of the label with an underscore in front of the mnemonic character
9322 static Expander* new_with_mnemonic(char* label=null) {
9323 return gtk_expander_new_with_mnemonic(label);
9326 // Queries a #GtkExpander and returns its current state. Returns %TRUE
9327 // if the child widget is revealed.
9328 // See gtk_expander_set_expanded().
9329 // RETURNS: the current state of the expander.
9330 int get_expanded() {
9331 return gtk_expander_get_expanded(&this);
9334 // Fetches the text from a label widget including any embedded
9335 // underlines indicating mnemonics and Pango markup, as set by
9336 // gtk_expander_set_label(). If the label text has not been set the
9337 // return value will be %NULL. This will be the case if you create an
9338 // empty button with gtk_button_new() to use as a container.
9339 // Note that this function behaved differently in versions prior to
9340 // 2.14 and used to return the label text stripped of embedded
9341 // underlines indicating mnemonics and Pango markup. This problem can
9342 // be avoided by fetching the label text directly from the label
9343 // widget.
9344 // by the widget and must not be modified or freed.
9345 // RETURNS: The text of the label widget. This string is owned
9346 char* get_label() {
9347 return gtk_expander_get_label(&this);
9350 // Returns whether the label widget will fill all available horizontal
9351 // space allocated to @expander.
9352 // space
9353 // RETURNS: %TRUE if the label widget will fill all available horizontal
9354 int get_label_fill() {
9355 return gtk_expander_get_label_fill(&this);
9358 // Retrieves the label widget for the frame. See
9359 // gtk_expander_set_label_widget().
9360 // or %NULL if there is none.
9361 // RETURNS: the label widget,
9362 Widget* get_label_widget() {
9363 return gtk_expander_get_label_widget(&this);
9366 // Gets the value set by gtk_expander_set_spacing().
9367 // RETURNS: spacing between the expander and child.
9368 int get_spacing() {
9369 return gtk_expander_get_spacing(&this);
9372 // Returns whether the label's text is interpreted as marked up with
9373 // the <link linkend="PangoMarkupFormat">Pango text markup
9374 // language</link>. See gtk_expander_set_use_markup ().
9375 // RETURNS: %TRUE if the label's text will be parsed for markup
9376 int get_use_markup() {
9377 return gtk_expander_get_use_markup(&this);
9380 // Returns whether an embedded underline in the expander label indicates a
9381 // mnemonic. See gtk_expander_set_use_underline().
9382 // indicates the mnemonic accelerator keys.
9383 // RETURNS: %TRUE if an embedded underline in the expander label
9384 int get_use_underline() {
9385 return gtk_expander_get_use_underline(&this);
9388 // Sets the state of the expander. Set to %TRUE, if you want
9389 // the child widget to be revealed, and %FALSE if you want the
9390 // child widget to be hidden.
9391 // <expanded>: whether the child widget is revealed
9392 void set_expanded(int expanded) {
9393 gtk_expander_set_expanded(&this, expanded);
9396 // Sets the text of the label of the expander to @label.
9397 // This will also clear any previously set labels.
9398 // <label>: a string
9399 void set_label(char* label=null) {
9400 gtk_expander_set_label(&this, label);
9403 // Sets whether the label widget should fill all available horizontal space
9404 // allocated to @expander.
9405 // <label_fill>: %TRUE if the label should should fill all available horizontal space
9406 void set_label_fill(int label_fill) {
9407 gtk_expander_set_label_fill(&this, label_fill);
9410 // Set the label widget for the expander. This is the widget
9411 // that will appear embedded alongside the expander arrow.
9412 // <label_widget>: the new label widget
9413 void set_label_widget(Widget* label_widget=null) {
9414 gtk_expander_set_label_widget(&this, label_widget);
9417 // Sets the spacing field of @expander, which is the number of pixels to
9418 // place between expander and the child.
9419 // <spacing>: distance between the expander and child in pixels.
9420 void set_spacing(int spacing) {
9421 gtk_expander_set_spacing(&this, spacing);
9424 // Sets whether the text of the label contains markup in <link
9425 // linkend="PangoMarkupFormat">Pango's text markup
9426 // language</link>. See gtk_label_set_markup().
9427 // <use_markup>: %TRUE if the label's text should be parsed for markup
9428 void set_use_markup(int use_markup) {
9429 gtk_expander_set_use_markup(&this, use_markup);
9432 // If true, an underline in the text of the expander label indicates
9433 // the next character should be used for the mnemonic accelerator key.
9434 // <use_underline>: %TRUE if underlines in the text indicate mnemonics
9435 void set_use_underline(int use_underline) {
9436 gtk_expander_set_use_underline(&this, use_underline);
9438 extern (C) alias static void function (Expander* this_, void* user_data=null) signal_activate;
9440 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9441 return super_.signal_connect!name(cb, data, cf);
9444 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9445 return signal_connect_data(&this, cast(char*)"activate",
9446 cast(GObject2.Callback)cb, data, null, cf);
9450 struct ExpanderClass {
9451 BinClass parent_class;
9452 extern (C) void function (Expander* expander) activate;
9455 struct ExpanderPrivate {
9458 enum ExpanderStyle {
9459 COLLAPSED = 0,
9460 SEMI_COLLAPSED = 1,
9461 SEMI_EXPANDED = 2,
9462 EXPANDED = 3
9465 // #GtkFileChooser is an interface that can be implemented by file
9466 // selection widgets. In GTK+, the main objects that implement this
9467 // interface are #GtkFileChooserWidget, #GtkFileChooserDialog, and
9468 // #GtkFileChooserButton. You do not need to write an object that
9469 // implements the #GtkFileChooser interface unless you are trying to
9470 // adapt an existing file selector to expose a standard programming
9471 // interface.
9472 // #GtkFileChooser allows for shortcuts to various places in the filesystem.
9473 // In the default implementation these are displayed in the left pane. It
9474 // may be a bit confusing at first that these shortcuts come from various
9475 // sources and in various flavours, so lets explain the terminology here:
9476 // <variablelist>
9477 // <varlistentry>
9478 // <term>Bookmarks</term>
9479 // <listitem>
9480 // are created by the user, by dragging folders from the
9481 // right pane to the left pane, or by using the "Add". Bookmarks
9482 // can be renamed and deleted by the user.
9483 // </listitem>
9484 // </varlistentry>
9485 // <varlistentry>
9486 // <term>Shortcuts</term>
9487 // <listitem>
9488 // can be provided by the application or by the underlying filesystem
9489 // abstraction (e.g. both the gnome-vfs and the Windows filesystems
9490 // provide "Desktop" shortcuts). Shortcuts cannot be modified by the
9491 // user.
9492 // </listitem>
9493 // </varlistentry>
9494 // <varlistentry>
9495 // <term>Volumes</term>
9496 // <listitem>
9497 // are provided by the underlying filesystem abstraction. They are
9498 // the "roots" of the filesystem.
9499 // </listitem>
9500 // </varlistentry>
9501 // </variablelist>
9502 // <refsect2 id="gtkfilechooser-encodings">
9503 // <title>File Names and Encodings</title>
9504 // When the user is finished selecting files in a
9505 // #GtkFileChooser, your program can get the selected names
9506 // either as filenames or as URIs. For URIs, the normal escaping
9507 // rules are applied if the URI contains non-ASCII characters.
9508 // However, filenames are <emphasis>always</emphasis> returned in
9509 // the character set specified by the
9510 // <envar>G_FILENAME_ENCODING</envar> environment variable.
9511 // Please see the Glib documentation for more details about this
9512 // variable.
9513 // <note>
9514 // This means that while you can pass the result of
9515 // gtk_file_chooser_get_filename() to
9516 // <function>open(2)</function> or
9517 // <function>fopen(3)</function>, you may not be able to
9518 // directly set it as the text of a #GtkLabel widget unless you
9519 // convert it first to UTF-8, which all GTK+ widgets expect.
9520 // You should use g_filename_to_utf8() to convert filenames
9521 // into strings that can be passed to GTK+ widgets.
9522 // </note>
9523 // </refsect2>
9524 // <refsect2 id="gtkfilechooser-preview">
9525 // <title>Adding a Preview Widget</title>
9526 // <para>
9527 // You can add a custom preview widget to a file chooser and then
9528 // get notification about when the preview needs to be updated.
9529 // To install a preview widget, use
9530 // gtk_file_chooser_set_preview_widget(). Then, connect to the
9531 // #GtkFileChooser::update-preview signal to get notified when
9532 // you need to update the contents of the preview.
9533 // </para>
9534 // <para>
9535 // Your callback should use
9536 // gtk_file_chooser_get_preview_filename() to see what needs
9537 // previewing. Once you have generated the preview for the
9538 // corresponding file, you must call
9539 // gtk_file_chooser_set_preview_widget_active() with a boolean
9540 // flag that indicates whether your callback could successfully
9541 // generate a preview.
9542 // </para>
9543 // <example id="example-gtkfilechooser-preview">
9544 // <title>Sample Usage</title>
9545 // <programlisting>
9546 // {
9547 // GtkImage *preview;
9548 // ...
9549 // preview = gtk_image_new (<!-- -->);
9550 // gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
9551 // g_signal_connect (my_file_chooser, "update-preview",
9552 // G_CALLBACK (update_preview_cb), preview);
9553 // }
9554 // static void
9555 // update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
9556 // {
9557 // GtkWidget *preview;
9558 // char *filename;
9559 // GdkPixbuf *pixbuf;
9560 // gboolean have_preview;
9561 // preview = GTK_WIDGET (data);
9562 // filename = gtk_file_chooser_get_preview_filename (file_chooser);
9563 // pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
9564 // have_preview = (pixbuf != NULL);
9565 // g_free (filename);
9566 // gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
9567 // if (pixbuf)
9568 // g_object_unref (pixbuf);
9569 // gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
9570 // }
9571 // </programlisting>
9572 // </example>
9573 // </refsect2>
9574 // <refsect2 id="gtkfilechooser-extra">
9575 // <title>Adding Extra Widgets</title>
9576 // <para>
9577 // You can add extra widgets to a file chooser to provide options
9578 // that are not present in the default design. For example, you
9579 // can add a toggle button to give the user the option to open a
9580 // file in read-only mode. You can use
9581 // gtk_file_chooser_set_extra_widget() to insert additional
9582 // widgets in a file chooser.
9583 // </para>
9584 // <example id="example-gtkfilechooser-extra">
9585 // <title>Sample Usage</title>
9586 // <programlisting>
9587 // GtkWidget *toggle;
9588 // ...
9589 // toggle = gtk_check_button_new_with_label ("Open file read-only");
9590 // gtk_widget_show (toggle);
9591 // gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
9592 // }
9593 // </programlisting>
9594 // </example>
9595 // <note>
9596 // If you want to set more than one extra widget in the file
9597 // chooser, you can a container such as a #GtkVBox or a #GtkTable
9598 // and include your widgets in it. Then, set the container as
9599 // the whole extra widget.
9600 // </note>
9601 // </refsect2>
9602 // <refsect2 id="gtkfilechooser-key-bindings">
9603 // <title>Key Bindings</title>
9604 // <para>
9605 // Internally, GTK+ implements a file chooser's graphical user
9606 // interface with the private
9607 // <classname>GtkFileChooserDefaultClass</classname>. This
9608 // widget has several <link linkend="gtk-Bindings">key
9609 // bindings</link> and their associated signals. This section
9610 // describes the available key binding signals.
9611 // </para>
9612 // <example id="gtkfilechooser-key-binding-example">
9613 // <title>GtkFileChooser key binding example</title>
9614 // <para>
9615 // The default keys that activate the key-binding signals in
9616 // <classname>GtkFileChooserDefaultClass</classname> are as
9617 // follows:
9618 // </para>
9619 // <informaltable>
9620 // <tgroup cols="2">
9621 // <tbody>
9622 // <row>
9623 // <entry>Signal name</entry>
9624 // <entry>Default key combinations</entry>
9625 // </row>
9626 // <row>
9627 // <entry>location-popup</entry>
9628 // <entry>
9629 // <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo> (empty path);
9630 // <keycap>/</keycap> (path of "/")
9631 // <footnote>
9632 // Both the individual <keycap>/</keycap> key and the
9633 // numeric keypad's "divide" key are supported.
9634 // </footnote>;
9635 // <keycap>~</keycap> (path of "~")
9636 // </entry>
9637 // </row>
9638 // <row>
9639 // <entry>up-folder</entry>
9640 // <entry>
9641 // <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>;
9642 // <keycombo><keycap>Alt</keycap><keycap>Shift</keycap><keycap>Up</keycap></keycombo>
9643 // <footnote>
9644 // Both the individual Up key and the numeric
9645 // keypad's Up key are supported.
9646 // </footnote>;
9647 // <keycap>Backspace</keycap>
9648 // </entry>
9649 // </row>
9650 // <row>
9651 // <entry>down-folder</entry>
9652 // <entry>
9653 // <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>;
9654 // <keycombo><keycap>Alt</keycap><keycap>Shift</keycap><keycap>Down</keycap></keycombo>
9655 // <footnote>
9656 // Both the individual Down key and the numeric
9657 // keypad's Down key are supported.
9658 // </footnote>
9659 // </entry>
9660 // </row>
9661 // <row>
9662 // <entry>home-folder</entry>
9663 // <entry><keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo></entry>
9664 // </row>
9665 // <row>
9666 // <entry>desktop-folder</entry>
9667 // <entry><keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo></entry>
9668 // </row>
9669 // <row>
9670 // <entry>quick-bookmark</entry>
9671 // <entry><keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> through <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo></entry>
9672 // </row>
9673 // </tbody>
9674 // </tgroup>
9675 // </informaltable>
9676 // <para>
9677 // You can change these defaults to something else. For
9678 // example, to add a <keycap>Shift</keycap> modifier to a few
9679 // of the default bindings, you can include the following
9680 // fragment in your <filename>.gtkrc-3.0</filename> file:
9681 // </para>
9682 // <programlisting>
9683 // binding "my-own-gtkfilechooser-bindings" {
9684 // bind "&lt;Alt&gt;&lt;Shift&gt;Up" {
9685 // "up-folder" ()
9686 // }
9687 // bind "&lt;Alt&gt;&lt;Shift&gt;Down" {
9688 // "down-folder" ()
9689 // }
9690 // bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
9691 // "home-folder" ()
9692 // }
9693 // }
9694 // class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
9695 // </programlisting>
9696 // </example>
9697 // <refsect3 id="GtkFileChooserDefault-location-popup">
9698 // <title>The &quot;GtkFileChooserDefault::location-popup&quot; signal</title>
9699 // <programlisting>
9700 // void user_function (GtkFileChooserDefault *chooser,
9701 // const char *path,
9702 // <link linkend="gpointer">gpointer</link> user_data);
9703 // </programlisting>
9704 // <para>
9705 // This is used to make the file chooser show a "Location"
9706 // dialog which the user can use to manually type the name of
9707 // the file he wishes to select. The
9708 // <parameter>path</parameter> argument is a string that gets
9709 // put in the text entry for the file name. By default this is bound to
9710 // <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
9711 // with a <parameter>path</parameter> string of "" (the empty
9712 // string). It is also bound to <keycap>/</keycap> with a
9713 // <parameter>path</parameter> string of "<literal>/</literal>"
9714 // (a slash): this lets you type <keycap>/</keycap> and
9715 // immediately type a path name. On Unix systems, this is bound to
9716 // <keycap>~</keycap> (tilde) with a <parameter>path</parameter> string
9717 // of "~" itself for access to home directories.
9718 // </para>
9719 // <variablelist role="params">
9720 // <varlistentry>
9721 // <term><parameter>chooser</parameter>&nbsp;:</term>
9722 // <listitem>
9723 // <simpara>
9724 // the object which received the signal.
9725 // </simpara>
9726 // </listitem>
9727 // </varlistentry>
9728 // <varlistentry>
9729 // <term><parameter>path</parameter>&nbsp;:</term>
9730 // <listitem>
9731 // <simpara>
9732 // default contents for the text entry for the file name
9733 // </simpara>
9734 // </listitem>
9735 // </varlistentry>
9736 // <varlistentry>
9737 // <term><parameter>user_data</parameter>&nbsp;:</term>
9738 // <listitem>
9739 // <simpara>
9740 // user data set when the signal handler was connected.
9741 // </simpara>
9742 // </listitem>
9743 // </varlistentry>
9744 // </variablelist>
9745 // <note>
9746 // You can create your own bindings for the
9747 // #GtkFileChooserDefault::location-popup signal with custom
9748 // <parameter>path</parameter> strings, and have a crude form
9749 // of easily-to-type bookmarks. For example, say you access
9750 // the path <filename>/home/username/misc</filename> very
9751 // frequently. You could then create an <keycombo>
9752 // <keycap>Alt</keycap> <keycap>M</keycap> </keycombo>
9753 // shortcut by including the following in your
9754 // <filename>.gtkrc-3.0</filename>:
9755 // <programlisting>
9756 // binding "misc-shortcut" {
9757 // bind "&lt;Alt&gt;M" {
9758 // "location-popup" ("/home/username/misc")
9759 // }
9760 // }
9761 // class "GtkFileChooserDefault" binding "misc-shortcut"
9762 // </programlisting>
9763 // </note>
9764 // </refsect3>
9765 // <refsect3 id="GtkFileChooserDefault-up-folder">
9766 // <title>The &quot;GtkFileChooserDefault::up-folder&quot; signal</title>
9767 // <programlisting>
9768 // void user_function (GtkFileChooserDefault *chooser,
9769 // <link linkend="gpointer">gpointer</link> user_data);
9770 // </programlisting>
9771 // <para>
9772 // This is used to make the file chooser go to the parent of
9773 // the current folder in the file hierarchy. By default this
9774 // is bound to <keycap>Backspace</keycap> and
9775 // <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>
9776 // (the Up key in the numeric keypad also works).
9777 // </para>
9778 // <variablelist role="params">
9779 // <varlistentry>
9780 // <term><parameter>chooser</parameter>&nbsp;:</term>
9781 // <listitem>
9782 // <simpara>
9783 // the object which received the signal.
9784 // </simpara>
9785 // </listitem>
9786 // </varlistentry>
9787 // <varlistentry>
9788 // <term><parameter>user_data</parameter>&nbsp;:</term>
9789 // <listitem>
9790 // <simpara>
9791 // user data set when the signal handler was connected.
9792 // </simpara>
9793 // </listitem>
9794 // </varlistentry>
9795 // </variablelist>
9796 // </refsect3>
9797 // <refsect3 id="GtkFileChooserDefault-down-folder">
9798 // <title>The &quot;GtkFileChooserDefault::down-folder&quot; signal</title>
9799 // <programlisting>
9800 // void user_function (GtkFileChooserDefault *chooser,
9801 // <link linkend="gpointer">gpointer</link> user_data);
9802 // </programlisting>
9803 // <para>
9804 // This is used to make the file chooser go to a child of the
9805 // current folder in the file hierarchy. The subfolder that
9806 // will be used is displayed in the path bar widget of the file
9807 // chooser. For example, if the path bar is showing
9808 // "/foo/<emphasis>bar/</emphasis>baz", then this will cause
9809 // the file chooser to switch to the "baz" subfolder. By
9810 // default this is bound to
9811 // <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>
9812 // (the Down key in the numeric keypad also works).
9813 // </para>
9814 // <variablelist role="params">
9815 // <varlistentry>
9816 // <term><parameter>chooser</parameter>&nbsp;:</term>
9817 // <listitem>
9818 // <simpara>
9819 // the object which received the signal.
9820 // </simpara>
9821 // </listitem>
9822 // </varlistentry>
9823 // <varlistentry>
9824 // <term><parameter>user_data</parameter>&nbsp;:</term>
9825 // <listitem>
9826 // <simpara>
9827 // user data set when the signal handler was connected.
9828 // </simpara>
9829 // </listitem>
9830 // </varlistentry>
9831 // </variablelist>
9832 // </refsect3>
9833 // <refsect3 id="GtkFileChooserDefault-home-folder">
9834 // <title>The &quot;GtkFileChooserDefault::home-folder&quot; signal</title>
9835 // <programlisting>
9836 // void user_function (GtkFileChooserDefault *chooser,
9837 // <link linkend="gpointer">gpointer</link> user_data);
9838 // </programlisting>
9839 // <para>
9840 // This is used to make the file chooser show the user's home
9841 // folder in the file list. By default this is bound to
9842 // <keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>
9843 // (the Home key in the numeric keypad also works).
9844 // </para>
9845 // <variablelist role="params">
9846 // <varlistentry>
9847 // <term><parameter>chooser</parameter>&nbsp;:</term>
9848 // <listitem>
9849 // <simpara>
9850 // the object which received the signal.
9851 // </simpara>
9852 // </listitem>
9853 // </varlistentry>
9854 // <varlistentry>
9855 // <term><parameter>user_data</parameter>&nbsp;:</term>
9856 // <listitem>
9857 // <simpara>
9858 // user data set when the signal handler was connected.
9859 // </simpara>
9860 // </listitem>
9861 // </varlistentry>
9862 // </variablelist>
9863 // </refsect3>
9864 // <refsect3 id="GtkFileChooserDefault-desktop-folder">
9865 // <title>The &quot;GtkFileChooserDefault::desktop-folder&quot; signal</title>
9866 // <programlisting>
9867 // void user_function (GtkFileChooserDefault *chooser,
9868 // <link linkend="gpointer">gpointer</link> user_data);
9869 // </programlisting>
9870 // <para>
9871 // This is used to make the file chooser show the user's Desktop
9872 // folder in the file list. By default this is bound to
9873 // <keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo>.
9874 // </para>
9875 // <variablelist role="params">
9876 // <varlistentry>
9877 // <term><parameter>chooser</parameter>&nbsp;:</term>
9878 // <listitem>
9879 // <simpara>
9880 // the object which received the signal.
9881 // </simpara>
9882 // </listitem>
9883 // </varlistentry>
9884 // <varlistentry>
9885 // <term><parameter>user_data</parameter>&nbsp;:</term>
9886 // <listitem>
9887 // <simpara>
9888 // user data set when the signal handler was connected.
9889 // </simpara>
9890 // </listitem>
9891 // </varlistentry>
9892 // </variablelist>
9893 // </refsect3>
9894 // <refsect3 id="GtkFileChooserDefault-quick-bookmark">
9895 // <title>The &quot;GtkFileChooserDefault::quick-bookmark&quot; signal</title>
9896 // <programlisting>
9897 // void user_function (GtkFileChooserDefault *chooser,
9898 // gint bookmark_index,
9899 // <link linkend="gpointer">gpointer</link> user_data);
9900 // </programlisting>
9901 // <para>
9902 // This is used to make the file chooser switch to the bookmark
9903 // specified in the <parameter>bookmark_index</parameter> parameter.
9904 // For example, if you have three bookmarks, you can pass 0, 1, 2 to
9905 // this signal to switch to each of them, respectively. By default this is bound to
9906 // <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo>,
9907 // <keycombo><keycap>Alt</keycap><keycap>2</keycap></keycombo>,
9908 // etc. until
9909 // <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo>. Note
9910 // that in the default binding,
9911 // that <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> is
9912 // actually defined to switch to the bookmark at index 0, and so on
9913 // successively;
9914 // <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo> is
9915 // defined to switch to the bookmark at index 10.
9916 // </para>
9917 // <variablelist role="params">
9918 // <varlistentry>
9919 // <term><parameter>chooser</parameter>&nbsp;:</term>
9920 // <listitem>
9921 // <simpara>
9922 // the object which received the signal.
9923 // </simpara>
9924 // </listitem>
9925 // </varlistentry>
9926 // <varlistentry>
9927 // <term><parameter>bookmark_indes</parameter>&nbsp;:</term>
9928 // <listitem>
9929 // <simpara>
9930 // index of the bookmark to switch to; the indices start at 0.
9931 // </simpara>
9932 // </listitem>
9933 // </varlistentry>
9934 // <varlistentry>
9935 // <term><parameter>user_data</parameter>&nbsp;:</term>
9936 // <listitem>
9937 // <simpara>
9938 // user data set when the signal handler was connected.
9939 // </simpara>
9940 // </listitem>
9941 // </varlistentry>
9942 // </variablelist>
9943 // </refsect3>
9944 // </refsect2>
9945 struct FileChooser {
9947 // Adds @filter to the list of filters that the user can select between.
9948 // When a filter is selected, only files that are passed by that
9949 // filter are displayed.
9950 // Note that the @chooser takes ownership of the filter, so you have to
9951 // ref and sink it if you want to keep a reference.
9952 // <filter>: a #GtkFileFilter
9953 void add_filter(FileFilter* filter) {
9954 gtk_file_chooser_add_filter(&this, filter);
9957 // Adds a folder to be displayed with the shortcut folders in a file chooser.
9958 // Note that shortcut folders do not get saved, as they are provided by the
9959 // application. For example, you can use this to add a
9960 // "/usr/share/mydrawprogram/Clipart" folder to the volume list.
9961 // otherwise. In the latter case, the @error will be set as appropriate.
9962 // RETURNS: %TRUE if the folder could be added successfully, %FALSE
9963 // <folder>: filename of the folder to add
9964 int add_shortcut_folder(char* folder, GLib2.Error** error=null) {
9965 return gtk_file_chooser_add_shortcut_folder(&this, folder, error);
9968 // Adds a folder URI to be displayed with the shortcut folders in a file
9969 // chooser. Note that shortcut folders do not get saved, as they are provided
9970 // by the application. For example, you can use this to add a
9971 // "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.
9972 // otherwise. In the latter case, the @error will be set as appropriate.
9973 // RETURNS: %TRUE if the folder could be added successfully, %FALSE
9974 // <uri>: URI of the folder to add
9975 int add_shortcut_folder_uri(char* uri, GLib2.Error** error=null) {
9976 return gtk_file_chooser_add_shortcut_folder_uri(&this, uri, error);
9979 // Gets the type of operation that the file chooser is performing; see
9980 // gtk_file_chooser_set_action().
9981 // RETURNS: the action that the file selector is performing
9982 FileChooserAction get_action() {
9983 return gtk_file_chooser_get_action(&this);
9986 // Gets whether file choser will offer to create new folders.
9987 // See gtk_file_chooser_set_create_folders().
9988 // RETURNS: %TRUE if the New Folder button should be displayed.
9989 int get_create_folders() {
9990 return gtk_file_chooser_get_create_folders(&this);
9993 // Gets the current folder of @chooser as a local filename.
9994 // See gtk_file_chooser_set_current_folder().
9995 // Note that this is the folder that the file chooser is currently displaying
9996 // (e.g. "/home/username/Documents"), which is <emphasis>not the same</emphasis>
9997 // as the currently-selected folder if the chooser is in
9998 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode
9999 // (e.g. "/home/username/Documents/selected-folder/". To get the
10000 // currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
10001 // usual way to get the selection.
10002 // or %NULL if the current path cannot be represented as a local
10003 // filename. Free with g_free(). This function will also return
10004 // %NULL if the file chooser was unable to load the last folder that
10005 // was requested from it; for example, as would be for calling
10006 // gtk_file_chooser_set_current_folder() on a nonexistent folder.
10007 // RETURNS: the full path of the current folder,
10008 char* /*new*/ get_current_folder() {
10009 return gtk_file_chooser_get_current_folder(&this);
10012 // Gets the current folder of @chooser as #GFile.
10013 // See gtk_file_chooser_get_current_folder_uri().
10014 // RETURNS: the #GFile for the current folder.
10015 Gio2.File* /*new*/ get_current_folder_file() {
10016 return gtk_file_chooser_get_current_folder_file(&this);
10019 // Gets the current folder of @chooser as an URI.
10020 // See gtk_file_chooser_set_current_folder_uri().
10021 // Note that this is the folder that the file chooser is currently displaying
10022 // (e.g. "file:///home/username/Documents"), which is <emphasis>not the same</emphasis>
10023 // as the currently-selected folder if the chooser is in
10024 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode
10025 // (e.g. "file:///home/username/Documents/selected-folder/". To get the
10026 // currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
10027 // usual way to get the selection.
10028 // function will also return %NULL if the file chooser was unable to load the
10029 // last folder that was requested from it; for example, as would be for calling
10030 // gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
10031 // RETURNS: the URI for the current folder. Free with g_free(). This
10032 char* /*new*/ get_current_folder_uri() {
10033 return gtk_file_chooser_get_current_folder_uri(&this);
10036 // Queries whether a file chooser is set to confirm for overwriting when the user
10037 // types a file name that already exists.
10038 // %FALSE otherwise.
10039 // RETURNS: %TRUE if the file chooser will present a confirmation dialog;
10040 int get_do_overwrite_confirmation() {
10041 return gtk_file_chooser_get_do_overwrite_confirmation(&this);
10044 // Gets the current preview widget; see
10045 // gtk_file_chooser_set_extra_widget().
10046 // RETURNS: the current extra widget, or %NULL
10047 Widget* get_extra_widget() {
10048 return gtk_file_chooser_get_extra_widget(&this);
10051 // Gets the #GFile for the currently selected file in
10052 // the file selector. If multiple files are selected,
10053 // one of the files will be returned at random.
10054 // If the file chooser is in folder mode, this function returns the selected
10055 // folder.
10056 // use g_object_unref() to release it.
10057 // RETURNS: a selected #GFile. You own the returned file;
10058 Gio2.File* /*new*/ get_file() {
10059 return gtk_file_chooser_get_file(&this);
10062 // Gets the filename for the currently selected file in
10063 // the file selector. If multiple files are selected,
10064 // one of the filenames will be returned at random.
10065 // If the file chooser is in folder mode, this function returns the selected
10066 // folder.
10067 // if no file is selected, or the selected file can't
10068 // be represented with a local filename. Free with g_free().
10069 // RETURNS: The currently selected filename, or %NULL
10070 char* /*new*/ get_filename() {
10071 return gtk_file_chooser_get_filename(&this);
10074 // Lists all the selected files and subfolders in the current folder of
10075 // folder cannot be represented as local filenames they will be ignored. (See
10076 // gtk_file_chooser_get_uris())
10077 // containing the filenames of all selected files and subfolders in
10078 // the current folder. Free the returned list with g_slist_free(),
10079 // and the filenames with g_free().
10080 // RETURNS: a #GSList
10081 GLib2.SList* /*new*/ get_filenames() {
10082 return gtk_file_chooser_get_filenames(&this);
10085 // Lists all the selected files and subfolders in the current folder of @chooser
10086 // as #GFile. An internal function, see gtk_file_chooser_get_uris().
10087 // containing a #GFile for each selected file and subfolder in the
10088 // current folder. Free the returned list with g_slist_free(), and
10089 // the files with g_object_unref().
10090 // RETURNS: a #GSList
10091 GLib2.SList* /*new*/ get_files() {
10092 return gtk_file_chooser_get_files(&this);
10095 // Gets the current filter; see gtk_file_chooser_set_filter().
10096 // RETURNS: the current filter, or %NULL
10097 FileFilter* get_filter() {
10098 return gtk_file_chooser_get_filter(&this);
10101 // Gets whether only local files can be selected in the
10102 // file selector. See gtk_file_chooser_set_local_only()
10103 // RETURNS: %TRUE if only local files can be selected.
10104 int get_local_only() {
10105 return gtk_file_chooser_get_local_only(&this);
10108 // Gets the #GFile that should be previewed in a custom preview
10109 // Internal function, see gtk_file_chooser_get_preview_uri().
10110 // or %NULL if no file is selected. Free with g_object_unref().
10111 // RETURNS: the #GFile for the file to preview,
10112 Gio2.File* /*new*/ get_preview_file() {
10113 return gtk_file_chooser_get_preview_file(&this);
10116 // Gets the filename that should be previewed in a custom preview
10117 // widget. See gtk_file_chooser_set_preview_widget().
10118 // no file is selected, or if the selected file cannot be represented
10119 // as a local filename. Free with g_free()
10120 // RETURNS: the filename to preview, or %NULL if
10121 char* /*new*/ get_preview_filename() {
10122 return gtk_file_chooser_get_preview_filename(&this);
10125 // Gets the URI that should be previewed in a custom preview
10126 // widget. See gtk_file_chooser_set_preview_widget().
10127 // selected. Free with g_free().
10128 // RETURNS: the URI for the file to preview, or %NULL if no file is
10129 char* /*new*/ get_preview_uri() {
10130 return gtk_file_chooser_get_preview_uri(&this);
10133 // Gets the current preview widget; see
10134 // gtk_file_chooser_set_preview_widget().
10135 // RETURNS: the current preview widget, or %NULL
10136 Widget* get_preview_widget() {
10137 return gtk_file_chooser_get_preview_widget(&this);
10140 // Gets whether the preview widget set by gtk_file_chooser_set_preview_widget()
10141 // should be shown for the current filename. See
10142 // gtk_file_chooser_set_preview_widget_active().
10143 // RETURNS: %TRUE if the preview widget is active for the current filename.
10144 int get_preview_widget_active() {
10145 return gtk_file_chooser_get_preview_widget_active(&this);
10148 // Gets whether multiple files can be selected in the file
10149 // selector. See gtk_file_chooser_set_select_multiple().
10150 // RETURNS: %TRUE if multiple files can be selected.
10151 int get_select_multiple() {
10152 return gtk_file_chooser_get_select_multiple(&this);
10155 // Gets whether hidden files and folders are displayed in the file selector.
10156 // See gtk_file_chooser_set_show_hidden().
10157 // RETURNS: %TRUE if hidden files and folders are displayed.
10158 int get_show_hidden() {
10159 return gtk_file_chooser_get_show_hidden(&this);
10162 // Gets the URI for the currently selected file in
10163 // the file selector. If multiple files are selected,
10164 // one of the filenames will be returned at random.
10165 // If the file chooser is in folder mode, this function returns the selected
10166 // folder.
10167 // if no file is selected. Free with g_free()
10168 // RETURNS: The currently selected URI, or %NULL
10169 char* /*new*/ get_uri() {
10170 return gtk_file_chooser_get_uri(&this);
10173 // Lists all the selected files and subfolders in the current folder of
10174 // files and subfolders in the current folder. Free the returned list
10175 // with g_slist_free(), and the filenames with g_free().
10176 // RETURNS: a #GSList containing the URIs of all selected
10177 GLib2.SList* /*new*/ get_uris() {
10178 return gtk_file_chooser_get_uris(&this);
10181 // Gets whether a stock label should be drawn with the name of the previewed
10182 // file. See gtk_file_chooser_set_use_preview_label().
10183 // name of the previewed file, %FALSE otherwise.
10184 // RETURNS: %TRUE if the file chooser is set to display a label with the
10185 int get_use_preview_label() {
10186 return gtk_file_chooser_get_use_preview_label(&this);
10189 // Lists the current set of user-selectable filters; see
10190 // gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
10191 // #GSList containing the current set of user selectable filters. The
10192 // contents of the list are owned by GTK+, but you must free the list
10193 // itself with g_slist_free() when you are done with it.
10194 // RETURNS: a
10195 GLib2.SList* /*new container*/ list_filters() {
10196 return gtk_file_chooser_list_filters(&this);
10199 // Queries the list of shortcut folders in the file chooser, as set by
10200 // gtk_file_chooser_add_shortcut_folder_uri().
10201 // URIs, or %NULL if there are no shortcut folders. Free the returned
10202 // list with g_slist_free(), and the URIs with g_free().
10203 // RETURNS: A list of folder
10204 GLib2.SList* /*new*/ list_shortcut_folder_uris() {
10205 return gtk_file_chooser_list_shortcut_folder_uris(&this);
10208 // Queries the list of shortcut folders in the file chooser, as set by
10209 // gtk_file_chooser_add_shortcut_folder().
10210 // folder filenames, or %NULL if there are no shortcut folders. Free
10211 // the returned list with g_slist_free(), and the filenames with
10212 // g_free().
10213 // RETURNS: A list of
10214 GLib2.SList* /*new*/ list_shortcut_folders() {
10215 return gtk_file_chooser_list_shortcut_folders(&this);
10218 // Removes @filter from the list of filters that the user can select between.
10219 // <filter>: a #GtkFileFilter
10220 void remove_filter(FileFilter* filter) {
10221 gtk_file_chooser_remove_filter(&this, filter);
10224 // Removes a folder from a file chooser's list of shortcut folders.
10225 // In the latter case, the @error will be set as appropriate.
10226 // RETURNS: %TRUE if the operation succeeds, %FALSE otherwise.
10227 // <folder>: filename of the folder to remove
10228 int remove_shortcut_folder(char* folder, GLib2.Error** error=null) {
10229 return gtk_file_chooser_remove_shortcut_folder(&this, folder, error);
10232 // Removes a folder URI from a file chooser's list of shortcut folders.
10233 // In the latter case, the @error will be set as appropriate.
10234 // RETURNS: %TRUE if the operation succeeds, %FALSE otherwise.
10235 // <uri>: URI of the folder to remove
10236 int remove_shortcut_folder_uri(char* uri, GLib2.Error** error=null) {
10237 return gtk_file_chooser_remove_shortcut_folder_uri(&this, uri, error);
10239 // Selects all the files in the current folder of a file chooser.
10240 void select_all() {
10241 gtk_file_chooser_select_all(&this);
10244 // Selects the file referred to by @file. An internal function. See
10245 // _gtk_file_chooser_select_uri().
10246 // selected successfully, %FALSE otherwise.
10247 // RETURNS: %TRUE if both the folder could be changed and the path was
10248 // <file>: the file to select
10249 int select_file(Gio2.File* file, GLib2.Error** error=null) {
10250 return gtk_file_chooser_select_file(&this, file, error);
10253 // Selects a filename. If the file name isn't in the current
10254 // folder of @chooser, then the current folder of @chooser will
10255 // be changed to the folder containing @filename.
10256 // selected successfully, %FALSE otherwise.
10257 // RETURNS: %TRUE if both the folder could be changed and the file was
10258 // <filename>: the filename to select
10259 int select_filename(char* filename) {
10260 return gtk_file_chooser_select_filename(&this, filename);
10263 // Selects the file to by @uri. If the URI doesn't refer to a
10264 // file in the current folder of @chooser, then the current folder of
10265 // selected successfully, %FALSE otherwise.
10266 // RETURNS: %TRUE if both the folder could be changed and the URI was
10267 // <uri>: the URI to select
10268 int select_uri(char* uri) {
10269 return gtk_file_chooser_select_uri(&this, uri);
10272 // Sets the type of operation that the chooser is performing; the
10273 // user interface is adapted to suit the selected action. For example,
10274 // an option to create a new folder might be shown if the action is
10275 // %GTK_FILE_CHOOSER_ACTION_SAVE but not if the action is
10276 // %GTK_FILE_CHOOSER_ACTION_OPEN.
10277 // <action>: the action that the file selector is performing
10278 void set_action(FileChooserAction action) {
10279 gtk_file_chooser_set_action(&this, action);
10282 // Sets whether file choser will offer to create new folders.
10283 // This is only relevant if the action is not set to be
10284 // %GTK_FILE_CHOOSER_ACTION_OPEN.
10285 // <create_folders>: %TRUE if the New Folder button should be displayed
10286 void set_create_folders(int create_folders) {
10287 gtk_file_chooser_set_create_folders(&this, create_folders);
10290 // Sets the current folder for @chooser from a local filename.
10291 // The user will be shown the full contents of the current folder,
10292 // plus user interface elements for navigating to other folders.
10293 // otherwise.
10294 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
10295 // <filename>: the full path of the new current folder
10296 int set_current_folder(char* filename) {
10297 return gtk_file_chooser_set_current_folder(&this, filename);
10300 // Sets the current folder for @chooser from a #GFile.
10301 // Internal function, see gtk_file_chooser_set_current_folder_uri().
10302 // otherwise.
10303 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
10304 // <file>: the #GFile for the new folder
10305 int set_current_folder_file(Gio2.File* file, GLib2.Error** error=null) {
10306 return gtk_file_chooser_set_current_folder_file(&this, file, error);
10309 // Sets the current folder for @chooser from an URI.
10310 // The user will be shown the full contents of the current folder,
10311 // plus user interface elements for navigating to other folders.
10312 // otherwise.
10313 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
10314 // <uri>: the URI for the new current folder
10315 int set_current_folder_uri(char* uri) {
10316 return gtk_file_chooser_set_current_folder_uri(&this, uri);
10319 // Sets the current name in the file selector, as if entered
10320 // by the user. Note that the name passed in here is a UTF-8
10321 // string rather than a filename. This function is meant for
10322 // such uses as a suggested name in a "Save As..." dialog.
10323 // If you want to preselect a particular existing file, you should use
10324 // gtk_file_chooser_set_filename() or gtk_file_chooser_set_uri() instead.
10325 // Please see the documentation for those functions for an example of using
10326 // gtk_file_chooser_set_current_name() as well.
10327 // <name>: the filename to use, as a UTF-8 string
10328 void set_current_name(char* name) {
10329 gtk_file_chooser_set_current_name(&this, name);
10332 // Sets whether a file chooser in %GTK_FILE_CHOOSER_ACTION_SAVE mode will present
10333 // a confirmation dialog if the user types a file name that already exists. This
10334 // is %FALSE by default.
10335 // Regardless of this setting, the @chooser will emit the
10336 // #GtkFileChooser::confirm-overwrite signal when appropriate.
10337 // If all you need is the stock confirmation dialog, set this property to %TRUE.
10338 // You can override the way confirmation is done by actually handling the
10339 // #GtkFileChooser::confirm-overwrite signal; please refer to its documentation
10340 // for the details.
10341 // <do_overwrite_confirmation>: whether to confirm overwriting in save mode
10342 void set_do_overwrite_confirmation(int do_overwrite_confirmation) {
10343 gtk_file_chooser_set_do_overwrite_confirmation(&this, do_overwrite_confirmation);
10346 // Sets an application-supplied widget to provide extra options to the user.
10347 // <extra_widget>: widget for extra options
10348 void set_extra_widget(Widget* extra_widget) {
10349 gtk_file_chooser_set_extra_widget(&this, extra_widget);
10352 // Sets @file as the current filename for the file chooser, by changing
10353 // to the file's parent folder and actually selecting the file in list. If
10354 // the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
10355 // will also appear in the dialog's file name entry.
10356 // If the file name isn't in the current folder of @chooser, then the current
10357 // folder of @chooser will be changed to the folder containing @filename. This
10358 // is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
10359 // gtk_file_chooser_select_filename().
10360 // Note that the file must exist, or nothing will be done except
10361 // for the directory change.
10362 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
10363 // you should use this function if you already have a file name to which the
10364 // user may save; for example, when the user opens an existing file and then
10365 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
10366 // a file name already &mdash; for example, if the user just created a new
10367 // file and is saving it for the first time, do not call this function.
10368 // Instead, use something similar to this:
10369 // |[
10370 // if (document_is_new)
10371 // {
10372 // /&ast; the user just created a new document &ast;/
10373 // gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving);
10374 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
10375 // }
10376 // else
10377 // {
10378 // /&ast; the user edited an existing document &ast;/
10379 // gtk_file_chooser_set_file (chooser, existing_file);
10380 // }
10381 // ]|
10382 // selected successfully, %FALSE otherwise.
10383 // RETURNS: %TRUE if both the folder could be changed and the file was
10384 // <file>: the #GFile to set as current
10385 int set_file(Gio2.File* file, GLib2.Error** error=null) {
10386 return gtk_file_chooser_set_file(&this, file, error);
10389 // Sets @filename as the current filename for the file chooser, by changing
10390 // to the file's parent folder and actually selecting the file in list. If
10391 // the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
10392 // will also appear in the dialog's file name entry.
10393 // If the file name isn't in the current folder of @chooser, then the current
10394 // folder of @chooser will be changed to the folder containing @filename. This
10395 // is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
10396 // gtk_file_chooser_select_filename().
10397 // Note that the file must exist, or nothing will be done except
10398 // for the directory change.
10399 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
10400 // you should use this function if you already have a file name to which the
10401 // user may save; for example, when the user opens an existing file and then
10402 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
10403 // a file name already &mdash; for example, if the user just created a new
10404 // file and is saving it for the first time, do not call this function.
10405 // Instead, use something similar to this:
10406 // |[
10407 // if (document_is_new)
10408 // {
10409 // /&ast; the user just created a new document &ast;/
10410 // gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
10411 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
10412 // }
10413 // else
10414 // {
10415 // /&ast; the user edited an existing document &ast;/
10416 // gtk_file_chooser_set_filename (chooser, existing_filename);
10417 // }
10418 // ]|
10419 // selected successfully, %FALSE otherwise.
10420 // RETURNS: %TRUE if both the folder could be changed and the file was
10421 // <filename>: the filename to set as current
10422 int set_filename(char* filename) {
10423 return gtk_file_chooser_set_filename(&this, filename);
10426 // Sets the current filter; only the files that pass the
10427 // filter will be displayed. If the user-selectable list of filters
10428 // is non-empty, then the filter should be one of the filters
10429 // in that list. Setting the current filter when the list of
10430 // filters is empty is useful if you want to restrict the displayed
10431 // set of files without letting the user change it.
10432 // <filter>: a #GtkFileFilter
10433 void set_filter(FileFilter* filter) {
10434 gtk_file_chooser_set_filter(&this, filter);
10437 // Sets whether only local files can be selected in the
10438 // file selector. If @local_only is %TRUE (the default),
10439 // then the selected file are files are guaranteed to be
10440 // accessible through the operating systems native file
10441 // file system and therefore the application only
10442 // needs to worry about the filename functions in
10443 // #GtkFileChooser, like gtk_file_chooser_get_filename(),
10444 // rather than the URI functions like
10445 // gtk_file_chooser_get_uri(),
10446 // <local_only>: %TRUE if only local files can be selected
10447 void set_local_only(int local_only) {
10448 gtk_file_chooser_set_local_only(&this, local_only);
10451 // Sets an application-supplied widget to use to display a custom preview
10452 // of the currently selected file. To implement a preview, after setting the
10453 // preview widget, you connect to the #GtkFileChooser::update-preview
10454 // signal, and call gtk_file_chooser_get_preview_filename() or
10455 // gtk_file_chooser_get_preview_uri() on each change. If you can
10456 // display a preview of the new file, update your widget and
10457 // set the preview active using gtk_file_chooser_set_preview_widget_active().
10458 // Otherwise, set the preview inactive.
10459 // When there is no application-supplied preview widget, or the
10460 // application-supplied preview widget is not active, the file chooser
10461 // may display an internally generated preview of the current file or
10462 // it may display no preview at all.
10463 // <preview_widget>: widget for displaying preview.
10464 void set_preview_widget(Widget* preview_widget) {
10465 gtk_file_chooser_set_preview_widget(&this, preview_widget);
10468 // Sets whether the preview widget set by
10469 // gtk_file_chooser_set_preview_widget() should be shown for the
10470 // current filename. When @active is set to false, the file chooser
10471 // may display an internally generated preview of the current file
10472 // or it may display no preview at all. See
10473 // gtk_file_chooser_set_preview_widget() for more details.
10474 // <active>: whether to display the user-specified preview widget
10475 void set_preview_widget_active(int active) {
10476 gtk_file_chooser_set_preview_widget_active(&this, active);
10479 // Sets whether multiple files can be selected in the file selector. This is
10480 // only relevant if the action is set to be %GTK_FILE_CHOOSER_ACTION_OPEN or
10481 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
10482 // <select_multiple>: %TRUE if multiple files can be selected.
10483 void set_select_multiple(int select_multiple) {
10484 gtk_file_chooser_set_select_multiple(&this, select_multiple);
10487 // Sets whether hidden files and folders are displayed in the file selector.
10488 // <show_hidden>: %TRUE if hidden files and folders should be displayed.
10489 void set_show_hidden(int show_hidden) {
10490 gtk_file_chooser_set_show_hidden(&this, show_hidden);
10493 // Sets the file referred to by @uri as the current file for the file chooser,
10494 // by changing to the URI's parent folder and actually selecting the URI in the
10495 // list. If the @chooser is %GTK_FILE_CHOOSER_ACTION_SAVE mode, the URI's base
10496 // name will also appear in the dialog's file name entry.
10497 // If the URI isn't in the current folder of @chooser, then the current folder
10498 // of @chooser will be changed to the folder containing @uri. This is equivalent
10499 // to a sequence of gtk_file_chooser_unselect_all() followed by
10500 // gtk_file_chooser_select_uri().
10501 // Note that the URI must exist, or nothing will be done except for the
10502 // directory change.
10503 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
10504 // you should use this function if you already have a file name to which the
10505 // user may save; for example, when the user opens an existing file and then
10506 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
10507 // a file name already &mdash; for example, if the user just created a new
10508 // file and is saving it for the first time, do not call this function.
10509 // Instead, use something similar to this:
10510 // |[
10511 // if (document_is_new)
10512 // {
10513 // /&ast; the user just created a new document &ast;/
10514 // gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
10515 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
10516 // }
10517 // else
10518 // {
10519 // /&ast; the user edited an existing document &ast;/
10520 // gtk_file_chooser_set_uri (chooser, existing_uri);
10521 // }
10522 // ]|
10523 // selected successfully, %FALSE otherwise.
10524 // RETURNS: %TRUE if both the folder could be changed and the URI was
10525 // <uri>: the URI to set as current
10526 int set_uri(char* uri) {
10527 return gtk_file_chooser_set_uri(&this, uri);
10530 // Sets whether the file chooser should display a stock label with the name of
10531 // the file that is being previewed; the default is %TRUE. Applications that
10532 // want to draw the whole preview area themselves should set this to %FALSE and
10533 // display the name themselves in their preview widget.
10534 // <use_label>: whether to display a stock label with the name of the previewed file
10535 void set_use_preview_label(int use_label) {
10536 gtk_file_chooser_set_use_preview_label(&this, use_label);
10538 // Unselects all the files in the current folder of a file chooser.
10539 void unselect_all() {
10540 gtk_file_chooser_unselect_all(&this);
10543 // Unselects the file referred to by @file. If the file is not in the current
10544 // directory, does not exist, or is otherwise not currently selected, does nothing.
10545 // <file>: a #GFile
10546 void unselect_file(Gio2.File* file) {
10547 gtk_file_chooser_unselect_file(&this, file);
10550 // Unselects a currently selected filename. If the filename
10551 // is not in the current directory, does not exist, or
10552 // is otherwise not currently selected, does nothing.
10553 // <filename>: the filename to unselect
10554 void unselect_filename(char* filename) {
10555 gtk_file_chooser_unselect_filename(&this, filename);
10558 // Unselects the file referred to by @uri. If the file
10559 // is not in the current directory, does not exist, or
10560 // is otherwise not currently selected, does nothing.
10561 // <uri>: the URI to unselect
10562 void unselect_uri(char* uri) {
10563 gtk_file_chooser_unselect_uri(&this, uri);
10566 // This signal gets emitted whenever it is appropriate to present a
10567 // confirmation dialog when the user has selected a file name that
10568 // already exists. The signal only gets emitted when the file
10569 // chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode.
10570 // Most applications just need to turn on the
10571 // #GtkFileChooser:do-overwrite-confirmation property (or call the
10572 // gtk_file_chooser_set_do_overwrite_confirmation() function), and
10573 // they will automatically get a stock confirmation dialog.
10574 // Applications which need to customize this behavior should do
10575 // that, and also connect to the #GtkFileChooser::confirm-overwrite
10576 // signal.
10577 // A signal handler for this signal must return a
10578 // #GtkFileChooserConfirmation value, which indicates the action to
10579 // take. If the handler determines that the user wants to select a
10580 // different filename, it should return
10581 // %GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it determines
10582 // that the user is satisfied with his choice of file name, it
10583 // should return %GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME.
10584 // On the other hand, if it determines that the stock confirmation
10585 // dialog should be used, it should return
10586 // %GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM. The following example
10587 // illustrates this.
10588 // <example id="gtkfilechooser-confirmation">
10589 // <title>Custom confirmation</title>
10590 // <programlisting>
10591 // static GtkFileChooserConfirmation
10592 // confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
10593 // {
10594 // char *uri;
10595 // uri = gtk_file_chooser_get_uri (chooser);
10596 // if (is_uri_read_only (uri))
10597 // {
10598 // if (user_wants_to_replace_read_only_file (uri))
10599 // return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
10600 // else
10601 // return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
10602 // } else
10603 // return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog
10604 // }
10605 // ...
10606 // chooser = gtk_file_chooser_dialog_new (...);
10607 // gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
10608 // g_signal_connect (chooser, "confirm-overwrite",
10609 // G_CALLBACK (confirm_overwrite_callback), NULL);
10610 // if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
10611 // save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
10612 // gtk_widget_destroy (chooser);
10613 // </programlisting>
10614 // </example>
10615 // action to take after emitting the signal.
10616 // RETURNS: a #GtkFileChooserConfirmation value that indicates which
10617 extern (C) alias static FileChooserConfirmation* function (FileChooser* this_, void* user_data=null) signal_confirm_overwrite;
10619 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10620 return super_.signal_connect!name(cb, data, cf);
10623 ulong signal_connect(string name:"confirm-overwrite", CB/*:signal_confirm_overwrite*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10624 return signal_connect_data(&this, cast(char*)"confirm-overwrite",
10625 cast(GObject2.Callback)cb, data, null, cf);
10628 // This signal is emitted when the current folder in a #GtkFileChooser
10629 // changes. This can happen due to the user performing some action that
10630 // changes folders, such as selecting a bookmark or visiting a folder on the
10631 // file list. It can also happen as a result of calling a function to
10632 // explicitly change the current folder in a file chooser.
10633 // Normally you do not need to connect to this signal, unless you need to keep
10634 // track of which folder a file chooser is showing.
10635 // gtk_file_chooser_get_current_folder(),
10636 // gtk_file_chooser_set_current_folder_uri(),
10637 // gtk_file_chooser_get_current_folder_uri().
10638 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_current_folder_changed;
10639 ulong signal_connect(string name:"current-folder-changed", CB/*:signal_current_folder_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10640 return signal_connect_data(&this, cast(char*)"current-folder-changed",
10641 cast(GObject2.Callback)cb, data, null, cf);
10644 // This signal is emitted when the user "activates" a file in the file
10645 // chooser. This can happen by double-clicking on a file in the file list, or
10646 // by pressing <keycap>Enter</keycap>.
10647 // Normally you do not need to connect to this signal. It is used internally
10648 // by #GtkFileChooserDialog to know when to activate the default button in the
10649 // dialog.
10650 // gtk_file_chooser_get_filenames(), gtk_file_chooser_get_uri(),
10651 // gtk_file_chooser_get_uris().
10652 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_file_activated;
10653 ulong signal_connect(string name:"file-activated", CB/*:signal_file_activated*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10654 return signal_connect_data(&this, cast(char*)"file-activated",
10655 cast(GObject2.Callback)cb, data, null, cf);
10658 // This signal is emitted when there is a change in the set of selected files
10659 // in a #GtkFileChooser. This can happen when the user modifies the selection
10660 // with the mouse or the keyboard, or when explicitly calling functions to
10661 // change the selection.
10662 // Normally you do not need to connect to this signal, as it is easier to wait
10663 // for the file chooser to finish running, and then to get the list of
10664 // selected files using the functions mentioned below.
10665 // gtk_file_chooser_unselect_filename(), gtk_file_chooser_get_filename(),
10666 // gtk_file_chooser_get_filenames(), gtk_file_chooser_select_uri(),
10667 // gtk_file_chooser_unselect_uri(), gtk_file_chooser_get_uri(),
10668 // gtk_file_chooser_get_uris().
10669 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_selection_changed;
10670 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10671 return signal_connect_data(&this, cast(char*)"selection-changed",
10672 cast(GObject2.Callback)cb, data, null, cf);
10675 // This signal is emitted when the preview in a file chooser should be
10676 // regenerated. For example, this can happen when the currently selected file
10677 // changes. You should use this signal if you want your file chooser to have
10678 // a preview widget.
10679 // Once you have installed a preview widget with
10680 // gtk_file_chooser_set_preview_widget(), you should update it when this
10681 // signal is emitted. You can use the functions
10682 // gtk_file_chooser_get_preview_filename() or
10683 // gtk_file_chooser_get_preview_uri() to get the name of the file to preview.
10684 // Your widget may not be able to preview all kinds of files; your callback
10685 // must call gtk_file_chooser_set_preview_widget_active() to inform the file
10686 // chooser about whether the preview was generated successfully or not.
10687 // Please see the example code in <xref linkend="gtkfilechooser-preview"/>.
10688 // gtk_file_chooser_set_preview_widget_active(),
10689 // gtk_file_chooser_set_use_preview_label(),
10690 // gtk_file_chooser_get_preview_filename(),
10691 // gtk_file_chooser_get_preview_uri().
10692 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_update_preview;
10693 ulong signal_connect(string name:"update-preview", CB/*:signal_update_preview*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10694 return signal_connect_data(&this, cast(char*)"update-preview",
10695 cast(GObject2.Callback)cb, data, null, cf);
10700 // Describes whether a #GtkFileChooser is being used to open existing files
10701 // or to save to a possibly new file.
10702 enum FileChooserAction {
10703 OPEN = 0,
10704 SAVE = 1,
10705 SELECT_FOLDER = 2,
10706 CREATE_FOLDER = 3
10708 struct FileChooserButton /* : HBox */ {
10709 alias parent this;
10710 alias parent super_;
10711 alias parent hbox;
10712 HBox parent;
10713 private FileChooserButtonPrivate* priv;
10716 // Creates a new file-selecting button widget.
10717 // RETURNS: a new button widget.
10718 // <title>: the title of the browse dialog.
10719 // <action>: the open mode for the widget.
10720 static FileChooserButton* new_(char* title, FileChooserAction action) {
10721 return gtk_file_chooser_button_new(title, action);
10724 // Creates a new file-selecting button widget using @backend.
10725 // RETURNS: a new button widget.
10726 // <title>: the title of the browse dialog.
10727 // <action>: the open mode for the widget.
10728 // <backend>: the name of the #GtkFileSystem backend to use.
10729 static FileChooserButton* new_with_backend(char* title, FileChooserAction action, char* backend) {
10730 return gtk_file_chooser_button_new_with_backend(title, action, backend);
10733 // Creates a #GtkFileChooserButton widget which uses @dialog as its
10734 // file-picking window.
10735 // Note that @dialog must be a #GtkDialog (or subclass) which
10736 // implements the #GtkFileChooser interface and must not have
10737 // %GTK_DIALOG_DESTROY_WITH_PARENT set.
10738 // Also note that the dialog needs to have its confirmative button
10739 // added with response %GTK_RESPONSE_ACCEPT or %GTK_RESPONSE_OK in
10740 // order for the button to take over the file selected in the dialog.
10741 // RETURNS: a new button widget.
10742 // <dialog>: the widget to use as dialog
10743 static FileChooserButton* new_with_dialog(Widget* dialog) {
10744 return gtk_file_chooser_button_new_with_dialog(dialog);
10747 // Returns whether the button grabs focus when it is clicked with the mouse.
10748 // See gtk_file_chooser_button_set_focus_on_click().
10749 // the mouse.
10750 // RETURNS: %TRUE if the button grabs focus when it is clicked with
10751 int get_focus_on_click() {
10752 return gtk_file_chooser_button_get_focus_on_click(&this);
10755 // Retrieves the title of the browse dialog used by @button. The returned value
10756 // should not be modified or freed.
10757 // RETURNS: a pointer to the browse dialog's title.
10758 char* get_title() {
10759 return gtk_file_chooser_button_get_title(&this);
10762 // Retrieves the width in characters of the @button widget's entry and/or label.
10763 // RETURNS: an integer width (in characters) that the button will use to size itself.
10764 int get_width_chars() {
10765 return gtk_file_chooser_button_get_width_chars(&this);
10768 // Sets whether the button will grab focus when it is clicked with the mouse.
10769 // Making mouse clicks not grab focus is useful in places like toolbars where
10770 // you don't want the keyboard focus removed from the main area of the
10771 // application.
10772 // <focus_on_click>: whether the button grabs focus when clicked with the mouse
10773 void set_focus_on_click(int focus_on_click) {
10774 gtk_file_chooser_button_set_focus_on_click(&this, focus_on_click);
10777 // Modifies the @title of the browse dialog used by @button.
10778 // <title>: the new browse dialog title.
10779 void set_title(char* title) {
10780 gtk_file_chooser_button_set_title(&this, title);
10783 // Sets the width (in characters) that @button will use to @n_chars.
10784 // <n_chars>: the new width, in characters.
10785 void set_width_chars(int n_chars) {
10786 gtk_file_chooser_button_set_width_chars(&this, n_chars);
10789 // The ::file-set signal is emitted when the user selects a file.
10790 // Note that this signal is only emitted when the <emphasis>user</emphasis>
10791 // changes the file.
10792 extern (C) alias static void function (FileChooserButton* this_, void* user_data=null) signal_file_set;
10794 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10795 return super_.signal_connect!name(cb, data, cf);
10798 ulong signal_connect(string name:"file-set", CB/*:signal_file_set*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10799 return signal_connect_data(&this, cast(char*)"file-set",
10800 cast(GObject2.Callback)cb, data, null, cf);
10804 struct FileChooserButtonClass {
10805 private HBoxClass parent_class;
10806 extern (C) void function (FileChooserButton* fc) file_set;
10807 private void* __gtk_reserved1, __gtk_reserved2, __gtk_reserved3, __gtk_reserved4, __gtk_reserved5, __gtk_reserved6, __gtk_reserved7;
10810 struct FileChooserButtonPrivate {
10814 // Used as a return value of handlers for the
10815 // #GtkFileChooser::confirm-overwrite signal of a #GtkFileChooser. This
10816 // value determines whether the file chooser will present the stock
10817 // confirmation dialog, accept the user's choice of a filename, or
10818 // let the user choose another filename.
10819 enum FileChooserConfirmation /* Version 2.8 */ {
10820 CONFIRM = 0,
10821 ACCEPT_FILENAME = 1,
10822 SELECT_AGAIN = 2
10824 struct FileChooserDialog /* : Dialog */ {
10825 alias parent_instance this;
10826 alias parent_instance super_;
10827 alias parent_instance dialog;
10828 Dialog parent_instance;
10829 FileChooserDialogPrivate* priv;
10832 // Unintrospectable constructor: new() / gtk_file_chooser_dialog_new()
10833 // Creates a new #GtkFileChooserDialog. This function is analogous to
10834 // gtk_dialog_new_with_buttons().
10835 // RETURNS: a new #GtkFileChooserDialog
10836 // <title>: Title of the dialog, or %NULL
10837 // <parent>: Transient parent of the dialog, or %NULL
10838 // <action>: Open or save mode for the dialog
10839 // <first_button_text>: stock ID or text to go in the first button, or %NULL
10840 alias gtk_file_chooser_dialog_new new_; // Variadic
10842 // Unintrospectable constructor: new_with_backend() / gtk_file_chooser_dialog_new_with_backend()
10843 // Creates a new #GtkFileChooserDialog with a specified backend. This is
10844 // especially useful if you use gtk_file_chooser_set_local_only() to allow
10845 // non-local files and you use a more expressive vfs, such as gnome-vfs,
10846 // to load files.
10847 // RETURNS: a new #GtkFileChooserDialog
10848 // <title>: Title of the dialog, or %NULL
10849 // <parent>: Transient parent of the dialog, or %NULL
10850 // <action>: Open or save mode for the dialog
10851 // <backend>: The name of the specific filesystem backend to use.
10852 // <first_button_text>: stock ID or text to go in the first button, or %NULL
10853 alias gtk_file_chooser_dialog_new_with_backend new_with_backend; // Variadic
10856 struct FileChooserDialogClass {
10857 DialogClass parent_class;
10860 struct FileChooserDialogPrivate {
10864 // These identify the various errors that can occur while calling
10865 // #GtkFileChooser functions.
10866 enum FileChooserError {
10867 NONEXISTENT = 0,
10868 BAD_FILENAME = 1,
10869 ALREADY_EXISTS = 2,
10870 INCOMPLETE_HOSTNAME = 3
10872 struct FileChooserWidget /* : VBox */ {
10873 alias parent_instance this;
10874 alias parent_instance super_;
10875 alias parent_instance vbox;
10876 VBox parent_instance;
10877 FileChooserWidgetPrivate* priv;
10880 // Creates a new #GtkFileChooserWidget. This is a file chooser widget that can
10881 // be embedded in custom windows, and it is the same widget that is used by
10882 // #GtkFileChooserDialog.
10883 // RETURNS: a new #GtkFileChooserWidget
10884 // <action>: Open or save mode for the widget
10885 static FileChooserWidget* new_(FileChooserAction action) {
10886 return gtk_file_chooser_widget_new(action);
10889 // Creates a new #GtkFileChooserWidget with a specified backend. This is
10890 // especially useful if you use gtk_file_chooser_set_local_only() to allow
10891 // non-local files. This is a file chooser widget that can be embedded in
10892 // custom windows and it is the same widget that is used by
10893 // #GtkFileChooserDialog.
10894 // RETURNS: a new #GtkFileChooserWidget
10895 // <action>: Open or save mode for the widget
10896 // <backend>: The name of the specific filesystem backend to use.
10897 static FileChooserWidget* new_with_backend(FileChooserAction action, char* backend) {
10898 return gtk_file_chooser_widget_new_with_backend(action, backend);
10902 struct FileChooserWidgetClass {
10903 VBoxClass parent_class;
10906 struct FileChooserWidgetPrivate {
10909 struct FileFilter /* : Object */ {
10910 alias method_parent this;
10911 alias method_parent super_;
10912 alias method_parent object;
10913 Object method_parent;
10916 // Creates a new #GtkFileFilter with no rules added to it.
10917 // Such a filter doesn't accept any files, so is not
10918 // particularly useful until you add rules with
10919 // gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(),
10920 // or gtk_file_filter_add_custom(). To create a filter
10921 // that accepts any file, use:
10922 // |[
10923 // GtkFileFilter *filter = gtk_file_filter_new ();
10924 // gtk_file_filter_add_pattern (filter, "*");
10925 // ]|
10926 // RETURNS: a new #GtkFileFilter
10927 static FileFilter* new_() {
10928 return gtk_file_filter_new();
10931 // Adds rule to a filter that allows files based on a custom callback
10932 // function. The bitfield @needed which is passed in provides information
10933 // about what sorts of information that the filter function needs;
10934 // this allows GTK+ to avoid retrieving expensive information when
10935 // it isn't needed by the filter.
10936 // <needed>: bitfield of flags indicating the information that the custom filter function needs.
10937 // <func>: callback function; if the function returns %TRUE, then the file will be displayed.
10938 // <data>: data to pass to @func
10939 // <notify>: function to call to free @data when it is no longer needed.
10940 void add_custom(FileFilterFlags needed, FileFilterFunc func, void* data, GLib2.DestroyNotify notify) {
10941 gtk_file_filter_add_custom(&this, needed, func, data, notify);
10944 // Adds a rule allowing a given mime type to @filter.
10945 // <mime_type>: name of a MIME type
10946 void add_mime_type(char* mime_type) {
10947 gtk_file_filter_add_mime_type(&this, mime_type);
10950 // Adds a rule allowing a shell style glob to a filter.
10951 // <pattern>: a shell style glob
10952 void add_pattern(char* pattern) {
10953 gtk_file_filter_add_pattern(&this, pattern);
10956 // Adds a rule allowing image files in the formats supported
10957 // by GdkPixbuf.
10958 void add_pixbuf_formats() {
10959 gtk_file_filter_add_pixbuf_formats(&this);
10962 // Tests whether a file should be displayed according to @filter.
10963 // The #GtkFileFilterInfo structure @filter_info should include
10964 // the fields returned from gtk_file_filter_get_needed().
10965 // This function will not typically be used by applications; it
10966 // is intended principally for use in the implementation of
10967 // #GtkFileChooser.
10968 // RETURNS: %TRUE if the file should be displayed
10969 // <filter_info>: a #GtkFileFilterInfo structure containing information about a file.
10970 int filter(FileFilterInfo* filter_info) {
10971 return gtk_file_filter_filter(&this, filter_info);
10974 // Gets the human-readable name for the filter. See gtk_file_filter_set_name().
10975 // or %NULL. This value is owned by GTK+ and must not
10976 // be modified or freed.
10977 // RETURNS: The human-readable name of the filter,
10978 char* get_name() {
10979 return gtk_file_filter_get_name(&this);
10982 // Gets the fields that need to be filled in for the structure
10983 // passed to gtk_file_filter_filter()
10984 // This function will not typically be used by applications; it
10985 // is intended principally for use in the implementation of
10986 // #GtkFileChooser.
10987 // calling gtk_file_filter_filter()
10988 // RETURNS: bitfield of flags indicating needed fields when
10989 FileFilterFlags get_needed() {
10990 return gtk_file_filter_get_needed(&this);
10993 // Sets the human-readable name of the filter; this is the string
10994 // that will be displayed in the file selector user interface if
10995 // there is a selectable list of filters.
10996 // <name>: the human-readable-name for the filter, or %NULL to remove any existing name.
10997 void set_name(char* name=null) {
10998 gtk_file_filter_set_name(&this, name);
11002 enum FileFilterFlags {
11003 FILENAME = 1,
11004 URI = 2,
11005 DISPLAY_NAME = 4,
11006 MIME_TYPE = 8
11008 extern (C) alias int function (FileFilterInfo* filter_info, void* data) FileFilterFunc;
11010 struct FileFilterInfo {
11011 FileFilterFlags contains;
11012 char* filename, uri, display_name, mime_type;
11015 struct FileSelection /* : Dialog */ {
11016 alias parent_instance this;
11017 alias parent_instance super_;
11018 alias parent_instance dialog;
11019 Dialog parent_instance;
11020 Widget* dir_list, file_list, selection_entry, selection_text, main_vbox, ok_button, cancel_button, help_button, history_pulldown, history_menu;
11021 GLib2.List* history_list;
11022 Widget* fileop_dialog, fileop_entry;
11023 char* fileop_file;
11024 void* cmpl_state;
11025 Widget* fileop_c_dir, fileop_del_file, fileop_ren_file, button_area, action_area;
11026 private void*[0] selected_names;
11027 private char* last_selected;
11029 static FileSelection* new_(char* title) {
11030 return gtk_file_selection_new(title);
11032 void complete(char* pattern) {
11033 gtk_file_selection_complete(&this, pattern);
11036 // This function returns the selected filename in the GLib file name
11037 // encoding. To convert to UTF-8, call g_filename_to_utf8(). The
11038 // returned string points to a statically allocated buffer and should
11039 // be copied if you plan to keep it around.
11040 // If no file is selected then the selected directory path is returned.
11041 // RETURNS: currently-selected filename in the on-disk encoding.
11042 char* get_filename() {
11043 return gtk_file_selection_get_filename(&this);
11046 // Determines whether or not the user is allowed to select multiple files in
11047 // the file list. See gtk_file_selection_set_select_multiple().
11048 // file list
11049 // RETURNS: %TRUE if the user is allowed to select multiple files in the
11050 int get_select_multiple() {
11051 return gtk_file_selection_get_select_multiple(&this);
11054 // Unintrospectable method: get_selections() / gtk_file_selection_get_selections()
11055 // Retrieves the list of file selections the user has made in the dialog box.
11056 // This function is intended for use when the user can select multiple files
11057 // in the file list.
11058 // The filenames are in the GLib file name encoding. To convert to
11059 // UTF-8, call g_filename_to_utf8() on each string.
11060 // g_strfreev() to free it.
11061 // RETURNS: a newly-allocated %NULL-terminated array of strings. Use
11062 char** get_selections() {
11063 return gtk_file_selection_get_selections(&this);
11065 void hide_fileop_buttons() {
11066 gtk_file_selection_hide_fileop_buttons(&this);
11069 // Sets a default path for the file requestor. If @filename includes a
11070 // directory path, then the requestor will open with that path as its
11071 // current working directory.
11072 // This has the consequence that in order to open the requestor with a
11073 // working directory and an empty filename, @filename must have a trailing
11074 // directory separator.
11075 // The encoding of @filename is preferred GLib file name encoding, which
11076 // may not be UTF-8. See g_filename_from_utf8().
11077 // <filename>: a string to set as the default file name.
11078 void set_filename(char* filename) {
11079 gtk_file_selection_set_filename(&this, filename);
11082 // Sets whether the user is allowed to select multiple files in the file list.
11083 // Use gtk_file_selection_get_selections () to get the list of selected files.
11084 // <select_multiple>: whether or not the user is allowed to select multiple files in the file list.
11085 void set_select_multiple(int select_multiple) {
11086 gtk_file_selection_set_select_multiple(&this, select_multiple);
11088 void show_fileop_buttons() {
11089 gtk_file_selection_show_fileop_buttons(&this);
11093 struct FileSelectionClass {
11094 DialogClass parent_class;
11095 extern (C) void function () _gtk_reserved1;
11096 extern (C) void function () _gtk_reserved2;
11097 extern (C) void function () _gtk_reserved3;
11098 extern (C) void function () _gtk_reserved4;
11101 struct Fixed /* : Container */ {
11102 alias container this;
11103 alias container super_;
11104 Container container;
11105 GLib2.List* children;
11107 static Fixed* new_() {
11108 return gtk_fixed_new();
11111 // Gets whether the #GtkFixed has its own #GdkWindow.
11112 // See gtk_fixed_set_has_window().
11113 // RETURNS: %TRUE if @fixed has its own window.
11114 int get_has_window() {
11115 return gtk_fixed_get_has_window(&this);
11117 void move(Widget* widget, int x, int y) {
11118 gtk_fixed_move(&this, widget, x, y);
11120 void put(Widget* widget, int x, int y) {
11121 gtk_fixed_put(&this, widget, x, y);
11124 // Sets whether a #GtkFixed widget is created with a separate
11125 // #GdkWindow for @widget->window or not. (By default, it will be
11126 // created with no separate #GdkWindow). This function must be called
11127 // while the #GtkFixed is not realized, for instance, immediately after the
11128 // window is created.
11129 // This function was added to provide an easy migration path for
11130 // older applications which may expect #GtkFixed to have a separate window.
11131 // <has_window>: %TRUE if a separate window should be created
11132 void set_has_window(int has_window) {
11133 gtk_fixed_set_has_window(&this, has_window);
11137 struct FixedChild {
11138 Widget* widget;
11139 int x, y;
11142 struct FixedClass {
11143 ContainerClass parent_class;
11146 struct FontButton /* : Button */ {
11147 alias button this;
11148 alias button super_;
11149 Button button;
11150 private FontButtonPrivate* priv;
11153 // Creates a new font picker widget.
11154 // RETURNS: a new font picker widget.
11155 static FontButton* new_() {
11156 return gtk_font_button_new();
11159 // Creates a new font picker widget.
11160 // RETURNS: a new font picker widget.
11161 // <fontname>: Name of font to display in font selection dialog
11162 static FontButton* new_with_font(char* fontname) {
11163 return gtk_font_button_new_with_font(fontname);
11166 // Retrieves the name of the currently selected font. This name includes
11167 // style and size information as well. If you want to render something
11168 // with the font, use this string with pango_font_description_from_string() .
11169 // If you're interested in peeking certain values (family name,
11170 // style, size, weight) just query these properties from the
11171 // #PangoFontDescription object.
11172 // RETURNS: an internal copy of the font name which must not be freed.
11173 char* get_font_name() {
11174 return gtk_font_button_get_font_name(&this);
11177 // Returns whether the font size will be shown in the label.
11178 // RETURNS: whether the font size will be shown in the label.
11179 int get_show_size() {
11180 return gtk_font_button_get_show_size(&this);
11183 // Returns whether the name of the font style will be shown in the label.
11184 // RETURNS: whether the font style will be shown in the label.
11185 int get_show_style() {
11186 return gtk_font_button_get_show_style(&this);
11189 // Retrieves the title of the font selection dialog.
11190 // RETURNS: an internal copy of the title string which must not be freed.
11191 char* get_title() {
11192 return gtk_font_button_get_title(&this);
11195 // Returns whether the selected font is used in the label.
11196 // RETURNS: whether the selected font is used in the label.
11197 int get_use_font() {
11198 return gtk_font_button_get_use_font(&this);
11201 // Returns whether the selected size is used in the label.
11202 // RETURNS: whether the selected size is used in the label.
11203 int get_use_size() {
11204 return gtk_font_button_get_use_size(&this);
11207 // Sets or updates the currently-displayed font in font picker dialog.
11208 // font selection dialog exists, otherwise %FALSE.
11209 // RETURNS: Return value of gtk_font_selection_dialog_set_font_name() if the
11210 // <fontname>: Name of font to display in font selection dialog
11211 int set_font_name(char* fontname) {
11212 return gtk_font_button_set_font_name(&this, fontname);
11215 // If @show_size is %TRUE, the font size will be displayed along with the name of the selected font.
11216 // <show_size>: %TRUE if font size should be displayed in dialog.
11217 void set_show_size(int show_size) {
11218 gtk_font_button_set_show_size(&this, show_size);
11221 // If @show_style is %TRUE, the font style will be displayed along with name of the selected font.
11222 // <show_style>: %TRUE if font style should be displayed in label.
11223 void set_show_style(int show_style) {
11224 gtk_font_button_set_show_style(&this, show_style);
11227 // Sets the title for the font selection dialog.
11228 // <title>: a string containing the font selection dialog title
11229 void set_title(char* title) {
11230 gtk_font_button_set_title(&this, title);
11233 // If @use_font is %TRUE, the font name will be written using the selected font.
11234 // <use_font>: If %TRUE, font name will be written using font chosen.
11235 void set_use_font(int use_font) {
11236 gtk_font_button_set_use_font(&this, use_font);
11239 // If @use_size is %TRUE, the font name will be written using the selected size.
11240 // <use_size>: If %TRUE, font name will be written using the selected size.
11241 void set_use_size(int use_size) {
11242 gtk_font_button_set_use_size(&this, use_size);
11245 // The ::font-set signal is emitted when the user selects a font.
11246 // When handling this signal, use gtk_font_button_get_font_name()
11247 // to find out which font was just selected.
11248 // Note that this signal is only emitted when the <emphasis>user</emphasis>
11249 // changes the font. If you need to react to programmatic font changes
11250 // as well, use the notify::font-name signal.
11251 extern (C) alias static void function (FontButton* this_, void* user_data=null) signal_font_set;
11253 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11254 return super_.signal_connect!name(cb, data, cf);
11257 ulong signal_connect(string name:"font-set", CB/*:signal_font_set*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11258 return signal_connect_data(&this, cast(char*)"font-set",
11259 cast(GObject2.Callback)cb, data, null, cf);
11263 struct FontButtonClass {
11264 ButtonClass parent_class;
11265 extern (C) void function (FontButton* gfp) font_set;
11266 extern (C) void function () _gtk_reserved1;
11267 extern (C) void function () _gtk_reserved2;
11268 extern (C) void function () _gtk_reserved3;
11269 extern (C) void function () _gtk_reserved4;
11272 struct FontButtonPrivate {
11275 struct FontSelection /* : VBox */ {
11276 alias parent_instance this;
11277 alias parent_instance super_;
11278 alias parent_instance vbox;
11279 VBox parent_instance;
11280 Widget* font_entry, family_list, font_style_entry, face_list, size_entry, size_list, pixels_button, points_button, filter_button, preview_entry;
11281 Pango.FontFamily* family;
11282 Pango.FontFace* face;
11283 int size;
11284 Gdk2.Font* font;
11287 // Creates a new #GtkFontSelection.
11288 // RETURNS: a n ew #GtkFontSelection
11289 static FontSelection* new_() {
11290 return gtk_font_selection_new();
11293 // Gets the #PangoFontFace representing the selected font group
11294 // details (i.e. family, slant, weight, width, etc).
11295 // selected font group details. The returned object is owned by
11296 // RETURNS: A #PangoFontFace representing the
11297 Pango.FontFace* get_face() {
11298 return gtk_font_selection_get_face(&this);
11301 // This returns the #GtkTreeView which lists all styles available for
11302 // the selected font. For example, 'Regular', 'Bold', etc.
11303 // RETURNS: A #GtkWidget that is part of @fontsel
11304 Widget* get_face_list() {
11305 return gtk_font_selection_get_face_list(&this);
11308 // Gets the #PangoFontFamily representing the selected font family.
11309 // selected font family. Font families are a collection of font
11310 // faces. The returned object is owned by @fontsel and must not
11311 // be modified or freed.
11312 // RETURNS: A #PangoFontFamily representing the
11313 Pango.FontFamily* get_family() {
11314 return gtk_font_selection_get_family(&this);
11317 // This returns the #GtkTreeView that lists font families, for
11318 // example, 'Sans', 'Serif', etc.
11319 // RETURNS: A #GtkWidget that is part of @fontsel
11320 Widget* get_family_list() {
11321 return gtk_font_selection_get_family_list(&this);
11324 // Gets the currently-selected font.
11325 // RETURNS: A #GdkFont.
11326 Gdk2.Font* /*new*/ get_font() {
11327 return gtk_font_selection_get_font(&this);
11330 // Gets the currently-selected font name.
11331 // Note that this can be a different string than what you set with
11332 // gtk_font_selection_set_font_name(), as the font selection widget may
11333 // normalize font names and thus return a string with a different structure.
11334 // For example, "Helvetica Italic Bold 12" could be normalized to
11335 // "Helvetica Bold Italic 12". Use pango_font_description_equal()
11336 // if you want to compare two font descriptions.
11337 // no font is selected. You must free this string with g_free().
11338 // RETURNS: A string with the name of the current font, or %NULL if
11339 char* /*new*/ get_font_name() {
11340 return gtk_font_selection_get_font_name(&this);
11343 // This returns the #GtkEntry used to display the font as a preview.
11344 // RETURNS: A #GtkWidget that is part of @fontsel
11345 Widget* get_preview_entry() {
11346 return gtk_font_selection_get_preview_entry(&this);
11349 // Gets the text displayed in the preview area.
11350 // This string is owned by the widget and should not be
11351 // modified or freed
11352 // RETURNS: the text displayed in the preview area.
11353 char* get_preview_text() {
11354 return gtk_font_selection_get_preview_text(&this);
11357 // The selected font size.
11358 // or -1 if no font size is selected.
11359 // RETURNS: A n integer representing the selected font size,
11360 int get_size() {
11361 return gtk_font_selection_get_size(&this);
11364 // This returns the #GtkEntry used to allow the user to edit the font
11365 // number manually instead of selecting it from the list of font sizes.
11366 // RETURNS: A #GtkWidget that is part of @fontsel
11367 Widget* get_size_entry() {
11368 return gtk_font_selection_get_size_entry(&this);
11371 // This returns the #GtkTreeeView used to list font sizes.
11372 // RETURNS: A #GtkWidget that is part of @fontsel
11373 Widget* get_size_list() {
11374 return gtk_font_selection_get_size_list(&this);
11377 // Sets the currently-selected font.
11378 // Note that the @fontsel needs to know the screen in which it will appear
11379 // for this to work; this can be guaranteed by simply making sure that the
11380 // such font exists or if the @fontsel doesn't belong to a particular
11381 // screen yet.
11382 // RETURNS: %TRUE if the font could be set successfully; %FALSE if no
11383 // <fontname>: a font name like "Helvetica 12" or "Times Bold 18"
11384 int set_font_name(char* fontname) {
11385 return gtk_font_selection_set_font_name(&this, fontname);
11388 // Sets the text displayed in the preview area.
11389 // The @text is used to show how the selected font looks.
11390 // <text>: the text to display in the preview area
11391 void set_preview_text(char* text) {
11392 gtk_font_selection_set_preview_text(&this, text);
11396 struct FontSelectionClass {
11397 VBoxClass parent_class;
11398 extern (C) void function () _gtk_reserved1;
11399 extern (C) void function () _gtk_reserved2;
11400 extern (C) void function () _gtk_reserved3;
11401 extern (C) void function () _gtk_reserved4;
11404 struct FontSelectionDialog /* : Dialog */ {
11405 alias parent_instance this;
11406 alias parent_instance super_;
11407 alias parent_instance dialog;
11408 Dialog parent_instance;
11409 private Widget* fontsel, main_vbox, action_area;
11410 Widget* ok_button, apply_button, cancel_button;
11411 private int dialog_width;
11412 private int auto_resize;
11415 // Creates a new #GtkFontSelectionDialog.
11416 // RETURNS: a new #GtkFontSelectionDialog
11417 // <title>: the title of the dialog window
11418 static FontSelectionDialog* new_(char* title) {
11419 return gtk_font_selection_dialog_new(title);
11422 // Unintrospectable method: get_apply_button() / gtk_font_selection_dialog_get_apply_button()
11423 // Obtains a button. The button doesn't have any function.
11424 // RETURNS: a #GtkWidget
11425 Widget* get_apply_button() {
11426 return gtk_font_selection_dialog_get_apply_button(&this);
11429 // Gets the 'Cancel' button.
11430 // for the 'Cancel' button.
11431 // RETURNS: the #GtkWidget used in the dialog
11432 Widget* get_cancel_button() {
11433 return gtk_font_selection_dialog_get_cancel_button(&this);
11436 // Gets the currently-selected font.
11437 // currently selected font in the dialog, or %NULL if no font is selected
11438 // RETURNS: the #GdkFont from the #GtkFontSelection for the
11439 Gdk2.Font* /*new*/ get_font() {
11440 return gtk_font_selection_dialog_get_font(&this);
11443 // Gets the currently-selected font name.
11444 // Note that this can be a different string than what you set with
11445 // gtk_font_selection_dialog_set_font_name(), as the font selection widget
11446 // may normalize font names and thus return a string with a different
11447 // structure. For example, "Helvetica Italic Bold 12" could be normalized
11448 // to "Helvetica Bold Italic 12". Use pango_font_description_equal()
11449 // if you want to compare two font descriptions.
11450 // font is selected. You must free this string with g_free().
11451 // RETURNS: A string with the name of the current font, or %NULL if no
11452 char* /*new*/ get_font_name() {
11453 return gtk_font_selection_dialog_get_font_name(&this);
11456 // Retrieves the #GtkFontSelection widget embedded in the dialog.
11457 // RETURNS: the embedded #GtkFontSelection
11458 Widget* get_font_selection() {
11459 return gtk_font_selection_dialog_get_font_selection(&this);
11462 // Gets the 'OK' button.
11463 // for the 'OK' button.
11464 // RETURNS: the #GtkWidget used in the dialog
11465 Widget* get_ok_button() {
11466 return gtk_font_selection_dialog_get_ok_button(&this);
11469 // Gets the text displayed in the preview area.
11470 // This string is owned by the widget and should not be
11471 // modified or freed
11472 // RETURNS: the text displayed in the preview area.
11473 char* get_preview_text() {
11474 return gtk_font_selection_dialog_get_preview_text(&this);
11477 // Sets the currently selected font.
11478 // RETURNS: %TRUE if the font selected in @fsd is now the
11479 // <fontname>: a font name like "Helvetica 12" or "Times Bold 18"
11480 int set_font_name(char* fontname) {
11481 return gtk_font_selection_dialog_set_font_name(&this, fontname);
11484 // Sets the text displayed in the preview area.
11485 // <text>: the text to display in the preview area
11486 void set_preview_text(char* text) {
11487 gtk_font_selection_dialog_set_preview_text(&this, text);
11491 struct FontSelectionDialogClass {
11492 DialogClass parent_class;
11493 extern (C) void function () _gtk_reserved1;
11494 extern (C) void function () _gtk_reserved2;
11495 extern (C) void function () _gtk_reserved3;
11496 extern (C) void function () _gtk_reserved4;
11499 struct Frame /* : Bin */ {
11500 alias bin this;
11501 alias bin super_;
11502 Bin bin;
11503 Widget* label_widget;
11504 short shadow_type;
11505 float label_xalign, label_yalign;
11506 Allocation child_allocation;
11509 // Creates a new #GtkFrame, with optional label @label.
11510 // If @label is %NULL, the label is omitted.
11511 // RETURNS: a new #GtkFrame widget
11512 // <label>: the text to use as the label of the frame
11513 static Frame* new_(char* label) {
11514 return gtk_frame_new(label);
11517 // If the frame's label widget is a #GtkLabel, returns the
11518 // text in the label widget. (The frame will have a #GtkLabel
11519 // for the label widget if a non-%NULL argument was passed
11520 // to gtk_frame_new().)
11521 // was no label widget or the lable widget was not
11522 // a #GtkLabel. This string is owned by GTK+ and
11523 // must not be modified or freed.
11524 // RETURNS: the text in the label, or %NULL if there
11525 char* get_label() {
11526 return gtk_frame_get_label(&this);
11529 // Retrieves the X and Y alignment of the frame's label. See
11530 // gtk_frame_set_label_align().
11531 // <xalign>: location to store X alignment of frame's label, or %NULL
11532 // <yalign>: location to store X alignment of frame's label, or %NULL
11533 void get_label_align(/*out*/ float* xalign=null, /*out*/ float* yalign=null) {
11534 gtk_frame_get_label_align(&this, xalign, yalign);
11537 // Retrieves the label widget for the frame. See
11538 // gtk_frame_set_label_widget().
11539 // RETURNS: the label widget, or %NULL if there is none.
11540 Widget* get_label_widget() {
11541 return gtk_frame_get_label_widget(&this);
11544 // Retrieves the shadow type of the frame. See
11545 // gtk_frame_set_shadow_type().
11546 // RETURNS: the current shadow type of the frame.
11547 ShadowType get_shadow_type() {
11548 return gtk_frame_get_shadow_type(&this);
11551 // Sets the text of the label. If @label is %NULL,
11552 // the current label is removed.
11553 // <label>: the text to use as the label of the frame
11554 void set_label(char* label=null) {
11555 gtk_frame_set_label(&this, label);
11558 // Sets the alignment of the frame widget's label. The
11559 // default values for a newly created frame are 0.0 and 0.5.
11560 // <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.
11561 // <yalign>: The y alignment of the label. A value of 0.0 aligns under the frame; 1.0 aligns above the frame. If the values are exactly 0.0 or 1.0 the gap in the frame won't be painted because the label will be completely above or below the frame.
11562 void set_label_align(float xalign, float yalign) {
11563 gtk_frame_set_label_align(&this, xalign, yalign);
11566 // Sets the label widget for the frame. This is the widget that
11567 // will appear embedded in the top edge of the frame as a
11568 // title.
11569 // <label_widget>: the new label widget
11570 void set_label_widget(Widget* label_widget) {
11571 gtk_frame_set_label_widget(&this, label_widget);
11574 // Sets the shadow type for @frame.
11575 // <type>: the new #GtkShadowType
11576 void set_shadow_type(ShadowType type) {
11577 gtk_frame_set_shadow_type(&this, type);
11581 struct FrameClass {
11582 BinClass parent_class;
11583 extern (C) void function (Frame* frame, Allocation* allocation) compute_child_allocation;
11586 extern (C) alias int function (void* data) Function;
11588 struct GammaCurve /* : VBox */ {
11589 alias vbox this;
11590 alias vbox super_;
11591 VBox vbox;
11592 Widget* table, curve;
11593 Widget*[5] button;
11594 float gamma;
11595 Widget* gamma_dialog, gamma_text;
11597 static GammaCurve* new_() {
11598 return gtk_gamma_curve_new();
11602 struct GammaCurveClass {
11603 VBoxClass parent_class;
11604 extern (C) void function () _gtk_reserved1;
11605 extern (C) void function () _gtk_reserved2;
11606 extern (C) void function () _gtk_reserved3;
11607 extern (C) void function () _gtk_reserved4;
11611 // #GtkHBox is a container that organizes child widgets into a single row.
11612 // Use the #GtkBox packing interface to determine the arrangement,
11613 // spacing, width, and alignment of #GtkHBox children.
11614 // All children are allocated the same height.
11615 struct HBox /* : Box */ {
11616 alias box this;
11617 alias box super_;
11618 Box box;
11621 // Creates a new #GtkHBox.
11622 // RETURNS: a new #GtkHBox.
11623 // <homogeneous>: %TRUE if all children are to be given equal space allotments.
11624 // <spacing>: the number of pixels to place by default between children.
11625 static HBox* new_(int homogeneous, int spacing) {
11626 return gtk_hbox_new(homogeneous, spacing);
11630 struct HBoxClass {
11631 BoxClass parent_class;
11634 struct HButtonBox /* : ButtonBox */ {
11635 alias button_box this;
11636 alias button_box super_;
11637 alias button_box buttonbox;
11638 ButtonBox button_box;
11640 static HButtonBox* new_() {
11641 return gtk_hbutton_box_new();
11643 static ButtonBoxStyle get_layout_default() {
11644 return gtk_hbutton_box_get_layout_default();
11646 static int get_spacing_default() {
11647 return gtk_hbutton_box_get_spacing_default();
11649 static void set_layout_default(ButtonBoxStyle layout) {
11650 gtk_hbutton_box_set_layout_default(layout);
11652 static void set_spacing_default(int spacing) {
11653 gtk_hbutton_box_set_spacing_default(spacing);
11657 struct HButtonBoxClass {
11658 ButtonBoxClass parent_class;
11661 struct HPaned /* : Paned */ {
11662 alias paned this;
11663 alias paned super_;
11664 Paned paned;
11666 static HPaned* new_() {
11667 return gtk_hpaned_new();
11671 struct HPanedClass {
11672 PanedClass parent_class;
11675 struct HRuler /* : Ruler */ {
11676 alias ruler this;
11677 alias ruler super_;
11678 Ruler ruler;
11680 static HRuler* new_() {
11681 return gtk_hruler_new();
11685 struct HRulerClass {
11686 RulerClass parent_class;
11689 struct HSV /* : Widget */ {
11690 alias parent_instance this;
11691 alias parent_instance super_;
11692 alias parent_instance widget;
11693 Widget parent_instance;
11694 void* priv;
11697 // Creates a new HSV color selector.
11698 // RETURNS: A newly-created HSV color selector.
11699 static HSV* new_() {
11700 return gtk_hsv_new();
11703 // Converts a color from HSV space to RGB.
11704 // Input values must be in the [0.0, 1.0] range;
11705 // output values will be in the same range.
11706 // <h>: Hue
11707 // <s>: Saturation
11708 // <v>: Value
11709 // <r>: Return value for the red component
11710 // <g>: Return value for the green component
11711 // <b>: Return value for the blue component
11712 static void to_rgb(double h, double s, double v, /*out*/ double* r, /*out*/ double* g, /*out*/ double* b) {
11713 gtk_hsv_to_rgb(h, s, v, r, g, b);
11716 // Queries the current color in an HSV color selector.
11717 // Returned values will be in the [0.0, 1.0] range.
11718 // <h>: Return value for the hue
11719 // <s>: Return value for the saturation
11720 // <v>: Return value for the value
11721 void get_color(/*out*/ double* h, /*out*/ double* s, /*out*/ double* v) {
11722 gtk_hsv_get_color(&this, h, s, v);
11725 // Queries the size and ring width of an HSV color selector.
11726 // <size>: Return value for the diameter of the hue ring
11727 // <ring_width>: Return value for the width of the hue ring
11728 void get_metrics(/*out*/ int* size, /*out*/ int* ring_width) {
11729 gtk_hsv_get_metrics(&this, size, ring_width);
11732 // An HSV color selector can be said to be adjusting if multiple rapid
11733 // changes are being made to its value, for example, when the user is
11734 // adjusting the value with the mouse. This function queries whether
11735 // the HSV color selector is being adjusted or not.
11736 // since they may be transitory, or %FALSE if they should consider
11737 // the color value status to be final.
11738 // RETURNS: %TRUE if clients can ignore changes to the color value,
11739 int is_adjusting() {
11740 return gtk_hsv_is_adjusting(&this);
11743 // Sets the current color in an HSV color selector.
11744 // Color component values must be in the [0.0, 1.0] range.
11745 // <h>: Hue
11746 // <s>: Saturation
11747 // <v>: Value
11748 void set_color(double h, double s, double v) {
11749 gtk_hsv_set_color(&this, h, s, v);
11752 // Sets the size and ring width of an HSV color selector.
11753 // <size>: Diameter for the hue ring
11754 // <ring_width>: Width of the hue ring
11755 void set_metrics(int size, int ring_width) {
11756 gtk_hsv_set_metrics(&this, size, ring_width);
11758 extern (C) alias static void function (HSV* this_, void* user_data=null) signal_changed;
11760 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11761 return super_.signal_connect!name(cb, data, cf);
11764 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11765 return signal_connect_data(&this, cast(char*)"changed",
11766 cast(GObject2.Callback)cb, data, null, cf);
11768 extern (C) alias static void function (HSV* this_, DirectionType* object, void* user_data=null) signal_move;
11769 ulong signal_connect(string name:"move", CB/*:signal_move*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11770 return signal_connect_data(&this, cast(char*)"move",
11771 cast(GObject2.Callback)cb, data, null, cf);
11775 struct HSVClass {
11776 WidgetClass parent_class;
11777 extern (C) void function (HSV* hsv) changed;
11778 extern (C) void function (HSV* hsv, DirectionType type) move;
11779 extern (C) void function () _gtk_reserved1;
11780 extern (C) void function () _gtk_reserved2;
11781 extern (C) void function () _gtk_reserved3;
11782 extern (C) void function () _gtk_reserved4;
11785 struct HScale /* : Scale */ {
11786 alias scale this;
11787 alias scale super_;
11788 Scale scale;
11790 static HScale* new_(Adjustment* adjustment) {
11791 return gtk_hscale_new(adjustment);
11794 // Creates a new horizontal scale widget that lets the user input a
11795 // number between @min and @max (including @min and @max) with the
11796 // increment @step. @step must be nonzero; it's the distance the
11797 // slider moves when using the arrow keys to adjust the scale value.
11798 // Note that the way in which the precision is derived works best if @step
11799 // is a power of ten. If the resulting precision is not suitable for your
11800 // needs, use gtk_scale_set_digits() to correct it.
11801 // RETURNS: a new #GtkHScale
11802 // <min>: minimum value
11803 // <max>: maximum value
11804 // <step>: step increment (tick size) used with keyboard shortcuts
11805 static HScale* new_with_range(double min, double max, double step) {
11806 return gtk_hscale_new_with_range(min, max, step);
11810 struct HScaleClass {
11811 ScaleClass parent_class;
11814 struct HScrollbar /* : Scrollbar */ {
11815 alias scrollbar this;
11816 alias scrollbar super_;
11817 Scrollbar scrollbar;
11820 // Creates a new horizontal scrollbar.
11821 // RETURNS: the new #GtkHScrollbar
11822 // <adjustment>: the #GtkAdjustment to use, or %NULL to create a new adjustment
11823 static HScrollbar* new_(Adjustment* adjustment=null) {
11824 return gtk_hscrollbar_new(adjustment);
11828 struct HScrollbarClass {
11829 ScrollbarClass parent_class;
11832 struct HSeparator /* : Separator */ {
11833 alias separator this;
11834 alias separator super_;
11835 Separator separator;
11837 static HSeparator* new_() {
11838 return gtk_hseparator_new();
11842 struct HSeparatorClass {
11843 SeparatorClass parent_class;
11846 struct HandleBox /* : Bin */ {
11847 alias bin this;
11848 alias bin super_;
11849 Bin bin;
11850 Gdk2.Window* bin_window, float_window;
11851 ShadowType shadow_type;
11852 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
11853 uint, "handle_position", 2,
11854 uint, "float_window_mapped", 1,
11855 uint, "child_detached", 1,
11856 uint, "in_drag", 1,
11857 uint, "shrink_on_detach", 1,
11858 int, "snap_edge", 3,
11859 uint, "__dummy32A", 23));
11860 int deskoff_x, deskoff_y;
11861 Allocation attach_allocation, float_allocation;
11863 static HandleBox* new_() {
11864 return gtk_handle_box_new();
11867 // Whether the handlebox's child is currently detached.
11868 // RETURNS: %TRUE if the child is currently detached, otherwise %FALSE
11869 int get_child_detached() {
11870 return gtk_handle_box_get_child_detached(&this);
11873 // Gets the handle position of the handle box. See
11874 // gtk_handle_box_set_handle_position().
11875 // RETURNS: the current handle position.
11876 PositionType get_handle_position() {
11877 return gtk_handle_box_get_handle_position(&this);
11880 // Gets the type of shadow drawn around the handle box. See
11881 // gtk_handle_box_set_shadow_type().
11882 // RETURNS: the type of shadow currently drawn around the handle box.
11883 ShadowType get_shadow_type() {
11884 return gtk_handle_box_get_shadow_type(&this);
11887 // Gets the edge used for determining reattachment of the handle box. See
11888 // gtk_handle_box_set_snap_edge().
11889 // is determined (as per default) from the handle position.
11890 // RETURNS: the edge used for determining reattachment, or (GtkPositionType)-1 if this
11891 PositionType get_snap_edge() {
11892 return gtk_handle_box_get_snap_edge(&this);
11894 void set_handle_position(PositionType position) {
11895 gtk_handle_box_set_handle_position(&this, position);
11897 void set_shadow_type(ShadowType type) {
11898 gtk_handle_box_set_shadow_type(&this, type);
11900 void set_snap_edge(PositionType edge) {
11901 gtk_handle_box_set_snap_edge(&this, edge);
11903 extern (C) alias static void function (HandleBox* this_, Widget* object, void* user_data=null) signal_child_attached;
11905 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11906 return super_.signal_connect!name(cb, data, cf);
11909 ulong signal_connect(string name:"child-attached", CB/*:signal_child_attached*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11910 return signal_connect_data(&this, cast(char*)"child-attached",
11911 cast(GObject2.Callback)cb, data, null, cf);
11913 extern (C) alias static void function (HandleBox* this_, Widget* object, void* user_data=null) signal_child_detached;
11914 ulong signal_connect(string name:"child-detached", CB/*:signal_child_detached*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11915 return signal_connect_data(&this, cast(char*)"child-detached",
11916 cast(GObject2.Callback)cb, data, null, cf);
11920 struct HandleBoxClass {
11921 BinClass parent_class;
11922 extern (C) void function (HandleBox* handle_box, Widget* child) child_attached;
11923 extern (C) void function (HandleBox* handle_box, Widget* child) child_detached;
11924 extern (C) void function () _gtk_reserved1;
11925 extern (C) void function () _gtk_reserved2;
11926 extern (C) void function () _gtk_reserved3;
11927 extern (C) void function () _gtk_reserved4;
11931 // #GtkIMContext defines the interface for GTK+ input methods. An input method
11932 // is used by GTK+ text input widgets like #GtkEntry to map from key events to
11933 // Unicode character strings.
11934 // The user may change the current input method via a context menu, unless the
11935 // #GtkSettings:gtk-show-input-method-menu GtkSettings property is set to FALSE.
11936 // The default input method can be set programmatically via the
11937 // #GtkSettings:gtk-im-module GtkSettings property. Alternatively, you may set
11938 // the GTK_IM_MODULE environment variable as documented in #gtk-running.
11939 // The #GtkEntry #GtkEntry:im-module and #GtkTextView #GtkTextView:im-module
11940 // properties may also be used to set input methods for specific widget
11941 // instances. For instance, a certain entry widget might be expected to contain
11942 // certain characters which would be easier to input with a certain input
11943 // method.
11944 // An input method may consume multiple key events in sequence and finally
11945 // output the composed result. This is called preediting, and an input method
11946 // may provide feedback about this process by displaying the intermediate
11947 // composition states as preedit text. For instance, the default GTK+ input
11948 // method implements the input of arbitrary Unicode code points by holding down
11949 // the Control and Shift keys and then typing "U" followed by the hexadecimal
11950 // digits of the code point. When releasing the Control and Shift keys,
11951 // preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for
11952 // example results in the € sign.
11953 // Additional input methods can be made available for use by GTK+ widgets as
11954 // loadable modules. An input method module is a small shared library which
11955 // implements a subclass of #GtkIMContext or #GtkIMContextSimple and exports
11956 // these four functions:
11957 // <informalexample><programlisting>
11958 // void im_module_init(#GTypeModule *module);
11959 // </programlisting></informalexample>
11960 // This function should register the #GType of the #GtkIMContext subclass which
11961 // implements the input method by means of g_type_module_register_type(). Note
11962 // that g_type_register_static() cannot be used as the type needs to be
11963 // registered dynamically.
11964 // <informalexample><programlisting>
11965 // void im_module_exit(void);
11966 // </programlisting></informalexample>
11967 // Here goes any cleanup code your input method might require on module unload.
11968 // <informalexample><programlisting>
11969 // void im_module_list(const #GtkIMContextInfo ***contexts, int *n_contexts)
11970 // {
11971 // *contexts = info_list;
11972 // *n_contexts = G_N_ELEMENTS (info_list);
11973 // }
11974 // </programlisting></informalexample>
11975 // This function returns the list of input methods provided by the module. The
11976 // example implementation above shows a common solution and simply returns a
11977 // pointer to statically defined array of #GtkIMContextInfo items for each
11978 // provided input method.
11979 // <informalexample><programlisting>
11980 // #GtkIMContext * im_module_create(const #gchar *context_id);
11981 // </programlisting></informalexample>
11982 // This function should return a pointer to a newly created instance of the
11983 // #GtkIMContext subclass identified by @context_id. The context ID is the same
11984 // as specified in the #GtkIMContextInfo array returned by im_module_list().
11985 // After a new loadable input method module has been installed on the system,
11986 // the configuration file <filename>gtk.immodules</filename> needs to be
11987 // regenerated by <link linkend="gtk-query-immodules-2.0">gtk-query-immodules-2.0</link>,
11988 // in order for the new input method to become available to GTK+ applications.
11989 struct IMContext /* : GObject.Object */ {
11990 alias parent_instance this;
11991 alias parent_instance super_;
11992 alias parent_instance object;
11993 GObject2.Object parent_instance;
11996 // Asks the widget that the input context is attached to to delete
11997 // characters around the cursor position by emitting the
11998 // GtkIMContext::delete_surrounding signal. Note that @offset and @n_chars
11999 // are in characters not in bytes which differs from the usage other
12000 // places in #GtkIMContext.
12001 // In order to use this function, you should first call
12002 // gtk_im_context_get_surrounding() to get the current context, and
12003 // call this function immediately afterwards to make sure that you
12004 // know what you are deleting. You should also account for the fact
12005 // that even if the signal was handled, the input context might not
12006 // have deleted all the characters that were requested to be deleted.
12007 // This function is used by an input method that wants to make
12008 // subsitutions in the existing text in response to new input. It is
12009 // not useful for applications.
12010 // RETURNS: %TRUE if the signal was handled.
12011 // <offset>: offset from cursor position in chars; a negative value means start before the cursor.
12012 // <n_chars>: number of characters to delete.
12013 int delete_surrounding(int offset, int n_chars) {
12014 return gtk_im_context_delete_surrounding(&this, offset, n_chars);
12017 // Allow an input method to internally handle key press and release
12018 // events. If this function returns %TRUE, then no further processing
12019 // should be done for this key event.
12020 // RETURNS: %TRUE if the input method handled the key event.
12021 // <event>: the key event
12022 int filter_keypress(Gdk2.EventKey* event) {
12023 return gtk_im_context_filter_keypress(&this, event);
12026 // Notify the input method that the widget to which this
12027 // input context corresponds has gained focus. The input method
12028 // may, for example, change the displayed feedback to reflect
12029 // this change.
12030 void focus_in() {
12031 gtk_im_context_focus_in(&this);
12034 // Notify the input method that the widget to which this
12035 // input context corresponds has lost focus. The input method
12036 // may, for example, change the displayed feedback or reset the contexts
12037 // state to reflect this change.
12038 void focus_out() {
12039 gtk_im_context_focus_out(&this);
12042 // Retrieve the current preedit string for the input context,
12043 // and a list of attributes to apply to the string.
12044 // This string should be displayed inserted at the insertion
12045 // point.
12046 // <str>: location to store the retrieved string. The string retrieved must be freed with g_free().
12047 // <attrs>: location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
12048 // <cursor_pos>: location to store position of cursor (in characters) within the preedit string.
12049 void get_preedit_string(/*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos) {
12050 gtk_im_context_get_preedit_string(&this, str, attrs, cursor_pos);
12053 // Retrieves context around the insertion point. Input methods
12054 // typically want context in order to constrain input text based on
12055 // existing text; this is important for languages such as Thai where
12056 // only some sequences of characters are allowed.
12057 // This function is implemented by emitting the
12058 // GtkIMContext::retrieve_surrounding signal on the input method; in
12059 // response to this signal, a widget should provide as much context as
12060 // is available, up to an entire paragraph, by calling
12061 // gtk_im_context_set_surrounding(). Note that there is no obligation
12062 // for a widget to respond to the ::retrieve_surrounding signal, so input
12063 // methods must be prepared to function without context.
12064 // you must free the result stored in *text.
12065 // RETURNS: %TRUE if surrounding text was provided; in this case
12066 // <text>: location to store a UTF-8 encoded string of text holding context around the insertion point. If the function returns %TRUE, then you must free the result stored in this location with g_free().
12067 // <cursor_index>: (out) location to store byte index of the insertion cursor within @text.
12068 int get_surrounding(/*out*/ char** text, int* cursor_index) {
12069 return gtk_im_context_get_surrounding(&this, text, cursor_index);
12072 // Notify the input method that a change such as a change in cursor
12073 // position has been made. This will typically cause the input
12074 // method to clear the preedit state.
12075 void reset() {
12076 gtk_im_context_reset(&this);
12079 // Set the client window for the input context; this is the
12080 // #GdkWindow in which the input appears. This window is
12081 // used in order to correctly position status windows, and may
12082 // also be used for purposes internal to the input method.
12083 // <window>: the client window. This may be %NULL to indicate that the previous client window no longer exists.
12084 void set_client_window(Gdk2.Window* window=null) {
12085 gtk_im_context_set_client_window(&this, window);
12088 // Notify the input method that a change in cursor
12089 // position has been made. The location is relative to the client
12090 // window.
12091 // <area>: new location
12092 void set_cursor_location(Gdk2.Rectangle* area) {
12093 gtk_im_context_set_cursor_location(&this, area);
12096 // Sets surrounding context around the insertion point and preedit
12097 // string. This function is expected to be called in response to the
12098 // GtkIMContext::retrieve_surrounding signal, and will likely have no
12099 // effect if called at other times.
12100 // <text>: text surrounding the insertion point, as UTF-8. the preedit string should not be included within
12101 // <len>: the length of @text, or -1 if @text is nul-terminated
12102 // <cursor_index>: the byte index of the insertion cursor within @text.
12103 void set_surrounding(char* text, int len, int cursor_index) {
12104 gtk_im_context_set_surrounding(&this, text, len, cursor_index);
12107 // Sets whether the IM context should use the preedit string
12108 // to display feedback. If @use_preedit is FALSE (default
12109 // is TRUE), then the IM context may use some other method to display
12110 // feedback, such as displaying it in a child of the root window.
12111 // <use_preedit>: whether the IM context should use the preedit string.
12112 void set_use_preedit(int use_preedit) {
12113 gtk_im_context_set_use_preedit(&this, use_preedit);
12116 // The ::commit signal is emitted when a complete input sequence
12117 // has been entered by the user. This can be a single character
12118 // immediately after a key press or the final result of preediting.
12119 // <str>: the completed character(s) entered by the user
12120 extern (C) alias static void function (IMContext* this_, char* str, void* user_data=null) signal_commit;
12122 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12123 return super_.signal_connect!name(cb, data, cf);
12126 ulong signal_connect(string name:"commit", CB/*:signal_commit*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12127 return signal_connect_data(&this, cast(char*)"commit",
12128 cast(GObject2.Callback)cb, data, null, cf);
12131 // The ::delete-surrounding signal is emitted when the input method
12132 // needs to delete all or part of the context surrounding the cursor.
12133 // RETURNS: %TRUE if the signal was handled.
12134 // <offset>: the character offset from the cursor position of the text to be deleted. A negative value indicates a position before the cursor.
12135 // <n_chars>: the number of characters to be deleted
12136 extern (C) alias static c_int function (IMContext* this_, int offset, int n_chars, void* user_data=null) signal_delete_surrounding;
12137 ulong signal_connect(string name:"delete-surrounding", CB/*:signal_delete_surrounding*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12138 return signal_connect_data(&this, cast(char*)"delete-surrounding",
12139 cast(GObject2.Callback)cb, data, null, cf);
12142 // The ::preedit-changed signal is emitted whenever the preedit sequence
12143 // currently being entered has changed. It is also emitted at the end of
12144 // a preedit sequence, in which case
12145 // gtk_im_context_get_preedit_string() returns the empty string.
12146 extern (C) alias static void function (IMContext* this_, void* user_data=null) signal_preedit_changed;
12147 ulong signal_connect(string name:"preedit-changed", CB/*:signal_preedit_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12148 return signal_connect_data(&this, cast(char*)"preedit-changed",
12149 cast(GObject2.Callback)cb, data, null, cf);
12152 // The ::preedit-end signal is emitted when a preediting sequence
12153 // has been completed or canceled.
12154 extern (C) alias static void function (IMContext* this_, void* user_data=null) signal_preedit_end;
12155 ulong signal_connect(string name:"preedit-end", CB/*:signal_preedit_end*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12156 return signal_connect_data(&this, cast(char*)"preedit-end",
12157 cast(GObject2.Callback)cb, data, null, cf);
12160 // The ::preedit-start signal is emitted when a new preediting sequence
12161 // starts.
12162 extern (C) alias static void function (IMContext* this_, void* user_data=null) signal_preedit_start;
12163 ulong signal_connect(string name:"preedit-start", CB/*:signal_preedit_start*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12164 return signal_connect_data(&this, cast(char*)"preedit-start",
12165 cast(GObject2.Callback)cb, data, null, cf);
12168 // The ::retrieve-surrounding signal is emitted when the input method
12169 // requires the context surrounding the cursor. The callback should set
12170 // the input method surrounding context by calling the
12171 // gtk_im_context_set_surrounding() method.
12172 // RETURNS: %TRUE if the signal was handled.
12173 extern (C) alias static c_int function (IMContext* this_, void* user_data=null) signal_retrieve_surrounding;
12174 ulong signal_connect(string name:"retrieve-surrounding", CB/*:signal_retrieve_surrounding*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12175 return signal_connect_data(&this, cast(char*)"retrieve-surrounding",
12176 cast(GObject2.Callback)cb, data, null, cf);
12180 struct IMContextClass {
12181 private ObjectClass parent_class;
12182 extern (C) void function (IMContext* context) preedit_start;
12183 extern (C) void function (IMContext* context) preedit_end;
12184 extern (C) void function (IMContext* context) preedit_changed;
12185 extern (C) void function (IMContext* context, char* str) commit;
12186 extern (C) int function (IMContext* context) retrieve_surrounding;
12188 // RETURNS: %TRUE if the signal was handled.
12189 // <offset>: offset from cursor position in chars; a negative value means start before the cursor.
12190 // <n_chars>: number of characters to delete.
12191 extern (C) int function (IMContext* context, int offset, int n_chars) delete_surrounding;
12192 // <window>: the client window. This may be %NULL to indicate that the previous client window no longer exists.
12193 extern (C) void function (IMContext* context, Gdk2.Window* window=null) set_client_window;
12195 // <str>: location to store the retrieved string. The string retrieved must be freed with g_free().
12196 // <attrs>: location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
12197 // <cursor_pos>: location to store position of cursor (in characters) within the preedit string.
12198 extern (C) void function (IMContext* context, /*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos) get_preedit_string;
12200 // RETURNS: %TRUE if the input method handled the key event.
12201 // <event>: the key event
12202 extern (C) int function (IMContext* context, Gdk2.EventKey* event) filter_keypress;
12203 extern (C) void function (IMContext* context) focus_in;
12204 extern (C) void function (IMContext* context) focus_out;
12205 extern (C) void function (IMContext* context) reset;
12206 // <area>: new location
12207 extern (C) void function (IMContext* context, Gdk2.Rectangle* area) set_cursor_location;
12208 // <use_preedit>: whether the IM context should use the preedit string.
12209 extern (C) void function (IMContext* context, int use_preedit) set_use_preedit;
12211 // <text>: text surrounding the insertion point, as UTF-8. the preedit string should not be included within
12212 // <len>: the length of @text, or -1 if @text is nul-terminated
12213 // <cursor_index>: the byte index of the insertion cursor within @text.
12214 extern (C) void function (IMContext* context, char* text, int len, int cursor_index) set_surrounding;
12216 // RETURNS: %TRUE if surrounding text was provided; in this case
12217 // <text>: location to store a UTF-8 encoded string of text holding context around the insertion point. If the function returns %TRUE, then you must free the result stored in this location with g_free().
12218 // <cursor_index>: (out) location to store byte index of the insertion cursor within @text.
12219 extern (C) int function (IMContext* context, /*out*/ char** text, int* cursor_index) get_surrounding;
12220 extern (C) void function () _gtk_reserved1;
12221 extern (C) void function () _gtk_reserved2;
12222 extern (C) void function () _gtk_reserved3;
12223 extern (C) void function () _gtk_reserved4;
12224 extern (C) void function () _gtk_reserved5;
12225 extern (C) void function () _gtk_reserved6;
12228 // Bookkeeping information about a loadable input method.
12229 struct IMContextInfo {
12230 char* context_id, context_name, domain, domain_dirname, default_locales;
12233 struct IMContextSimple /* : IMContext */ {
12234 alias object this;
12235 alias object super_;
12236 alias object imcontext;
12237 IMContext object;
12238 GLib2.SList* tables;
12239 uint[8] compose_buffer;
12240 dchar tentative_match;
12241 int tentative_match_len;
12242 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
12243 uint, "in_hex_sequence", 1,
12244 uint, "modifiers_dropped", 1,
12245 uint, "__dummy32A", 30));
12248 // Creates a new #GtkIMContextSimple.
12249 // RETURNS: a new #GtkIMContextSimple.
12250 static IMContextSimple* /*new*/ new_() {
12251 return gtk_im_context_simple_new();
12254 // Adds an additional table to search to the input context.
12255 // Each row of the table consists of @max_seq_len key symbols
12256 // followed by two #guint16 interpreted as the high and low
12257 // words of a #gunicode value. Tables are searched starting
12258 // from the last added.
12259 // The table must be sorted in dictionary order on the
12260 // numeric value of the key symbol fields. (Values beyond
12261 // the length of the sequence should be zero.)
12262 // <data>: the table
12263 // <max_seq_len>: Maximum length of a sequence in the table (cannot be greater than #GTK_MAX_COMPOSE_LEN)
12264 // <n_seqs>: number of sequences in the table
12265 void add_table(ushort* data, int max_seq_len, int n_seqs) {
12266 gtk_im_context_simple_add_table(&this, data, max_seq_len, n_seqs);
12270 struct IMContextSimpleClass {
12271 IMContextClass parent_class;
12274 struct IMMulticontext /* : IMContext */ {
12275 alias object this;
12276 alias object super_;
12277 alias object imcontext;
12278 IMContext object;
12279 IMContext* slave;
12280 IMMulticontextPrivate* priv;
12281 char* context_id;
12284 // Creates a new #GtkIMMulticontext.
12285 // RETURNS: a new #GtkIMMulticontext.
12286 static IMMulticontext* /*new*/ new_() {
12287 return gtk_im_multicontext_new();
12290 // Add menuitems for various available input methods to a menu;
12291 // the menuitems, when selected, will switch the input method
12292 // for the context and the global default input method.
12293 // <menushell>: a #GtkMenuShell
12294 void append_menuitems(MenuShell* menushell) {
12295 gtk_im_multicontext_append_menuitems(&this, menushell);
12298 // Gets the id of the currently active slave of the @context.
12299 // RETURNS: the id of the currently active slave
12300 char* get_context_id() {
12301 return gtk_im_multicontext_get_context_id(&this);
12304 // Sets the context id for @context.
12305 // This causes the currently active slave of @context to be
12306 // replaced by the slave corresponding to the new context id.
12307 // <context_id>: the id to use
12308 void set_context_id(char* context_id) {
12309 gtk_im_multicontext_set_context_id(&this, context_id);
12313 struct IMMulticontextClass {
12314 IMContextClass parent_class;
12315 extern (C) void function () _gtk_reserved1;
12316 extern (C) void function () _gtk_reserved2;
12317 extern (C) void function () _gtk_reserved3;
12318 extern (C) void function () _gtk_reserved4;
12321 struct IMMulticontextPrivate {
12324 enum IMPreeditStyle {
12325 NOTHING = 0,
12326 CALLBACK = 1,
12327 NONE = 2
12329 enum IMStatusStyle {
12330 NOTHING = 0,
12331 CALLBACK = 1,
12332 NONE = 2
12334 enum int INPUT_ERROR = -1;
12335 enum int INTERFACE_AGE = 8;
12336 struct IconFactory /* : GObject.Object */ {
12337 alias parent_instance this;
12338 alias parent_instance super_;
12339 alias parent_instance object;
12340 GObject2.Object parent_instance;
12341 GLib2.HashTable* icons;
12344 // Creates a new #GtkIconFactory. An icon factory manages a collection
12345 // of #GtkIconSet<!-- -->s; a #GtkIconSet manages a set of variants of a
12346 // particular icon (i.e. a #GtkIconSet contains variants for different
12347 // sizes and widget states). Icons in an icon factory are named by a
12348 // stock ID, which is a simple string identifying the icon. Each
12349 // #GtkStyle has a list of #GtkIconFactory<!-- -->s derived from the current
12350 // theme; those icon factories are consulted first when searching for
12351 // an icon. If the theme doesn't set a particular icon, GTK+ looks for
12352 // the icon in a list of default icon factories, maintained by
12353 // gtk_icon_factory_add_default() and
12354 // gtk_icon_factory_remove_default(). Applications with icons should
12355 // add a default icon factory with their icons, which will allow
12356 // themes to override the icons for the application.
12357 // RETURNS: a new #GtkIconFactory
12358 static IconFactory* /*new*/ new_() {
12359 return gtk_icon_factory_new();
12362 // Looks for an icon in the list of default icon factories. For
12363 // display to the user, you should use gtk_style_lookup_icon_set() on
12364 // the #GtkStyle for the widget that will display the icon, instead of
12365 // using this function directly, so that themes are taken into
12366 // account.
12367 // RETURNS: a #GtkIconSet, or %NULL
12368 // <stock_id>: an icon name
12369 static IconSet* lookup_default(char* stock_id) {
12370 return gtk_icon_factory_lookup_default(stock_id);
12373 // Adds the given @icon_set to the icon factory, under the name
12374 // e.g. "myapp-whatever-icon". Normally applications create a
12375 // #GtkIconFactory, then add it to the list of default factories with
12376 // gtk_icon_factory_add_default(). Then they pass the @stock_id to
12377 // widgets such as #GtkImage to display the icon. Themes can provide
12378 // an icon with the same name (such as "myapp-whatever-icon") to
12379 // override your application's default icons. If an icon already
12380 // existed in @factory for @stock_id, it is unreferenced and replaced
12381 // with the new @icon_set.
12382 // <stock_id>: icon name
12383 // <icon_set>: icon set
12384 void add(char* stock_id, IconSet* icon_set) {
12385 gtk_icon_factory_add(&this, stock_id, icon_set);
12388 // Adds an icon factory to the list of icon factories searched by
12389 // gtk_style_lookup_icon_set(). This means that, for example,
12390 // gtk_image_new_from_stock() will be able to find icons in @factory.
12391 // There will normally be an icon factory added for each library or
12392 // application that comes with icons. The default icon factories
12393 // can be overridden by themes.
12394 void add_default() {
12395 gtk_icon_factory_add_default(&this);
12398 // Looks up @stock_id in the icon factory, returning an icon set
12399 // if found, otherwise %NULL. For display to the user, you should
12400 // use gtk_style_lookup_icon_set() on the #GtkStyle for the
12401 // widget that will display the icon, instead of using this
12402 // function directly, so that themes are taken into account.
12403 // RETURNS: icon set of @stock_id.
12404 // <stock_id>: an icon name
12405 IconSet* lookup(char* stock_id) {
12406 return gtk_icon_factory_lookup(&this, stock_id);
12409 // Removes an icon factory from the list of default icon
12410 // factories. Not normally used; you might use it for a library that
12411 // can be unloaded or shut down.
12412 void remove_default() {
12413 gtk_icon_factory_remove_default(&this);
12417 struct IconFactoryClass {
12418 GObject2.ObjectClass parent_class;
12419 extern (C) void function () _gtk_reserved1;
12420 extern (C) void function () _gtk_reserved2;
12421 extern (C) void function () _gtk_reserved3;
12422 extern (C) void function () _gtk_reserved4;
12425 struct IconInfo {
12427 // Creates a #GtkIconInfo for a #GdkPixbuf.
12428 // RETURNS: a #GtkIconInfo
12429 // <icon_theme>: a #GtkIconTheme
12430 // <pixbuf>: the pixbuf to wrap in a #GtkIconInfo
12431 static IconInfo* /*new*/ new_for_pixbuf(IconTheme* icon_theme, GdkPixbuf2.Pixbuf* pixbuf) {
12432 return gtk_icon_info_new_for_pixbuf(icon_theme, pixbuf);
12435 // Make a copy of a #GtkIconInfo.
12436 // RETURNS: the new GtkIconInfo
12437 IconInfo* /*new*/ copy() {
12438 return gtk_icon_info_copy(&this);
12440 // Free a #GtkIconInfo and associated information
12441 void free() {
12442 gtk_icon_info_free(&this);
12445 // Fetches the set of attach points for an icon. An attach point
12446 // is a location in the icon that can be used as anchor points for attaching
12447 // emblems or overlays to the icon.
12448 // RETURNS: %TRUE if there are any attach points for the icon.
12449 // <points>: (array length=n_points) (out): location to store pointer to an array of points, or %NULL free the array of points with g_free().
12450 // <n_points>: location to store the number of points in @points, or %NULL
12451 int get_attach_points(Gdk2.Point** points=null, int* n_points=null) {
12452 return gtk_icon_info_get_attach_points(&this, points, n_points);
12455 // Gets the base size for the icon. The base size
12456 // is a size for the icon that was specified by
12457 // the icon theme creator. This may be different
12458 // than the actual size of image; an example of
12459 // this is small emblem icons that can be attached
12460 // to a larger icon. These icons will be given
12461 // the same base size as the larger icons to which
12462 // they are attached.
12463 // size is known for the icon.
12464 // RETURNS: the base size, or 0, if no base
12465 int get_base_size() {
12466 return gtk_icon_info_get_base_size(&this);
12469 // Gets the built-in image for this icon, if any. To allow
12470 // GTK+ to use built in icon images, you must pass the
12471 // %GTK_ICON_LOOKUP_USE_BUILTIN to
12472 // gtk_icon_theme_lookup_icon().
12473 // extra reference is added to the returned pixbuf, so if
12474 // you want to keep it around, you must use g_object_ref().
12475 // The returned image must not be modified.
12476 // RETURNS: the built-in image pixbuf, or %NULL. No
12477 GdkPixbuf2.Pixbuf* get_builtin_pixbuf() {
12478 return gtk_icon_info_get_builtin_pixbuf(&this);
12481 // Gets the display name for an icon. A display name is a
12482 // string to be used in place of the icon name in a user
12483 // visible context like a list of icons.
12484 // the icon doesn't have a specified display name. This value
12485 // is owned @icon_info and must not be modified or free.
12486 // RETURNS: the display name for the icon or %NULL, if
12487 char* get_display_name() {
12488 return gtk_icon_info_get_display_name(&this);
12491 // Gets the coordinates of a rectangle within the icon
12492 // that can be used for display of information such
12493 // as a preview of the contents of a text file.
12494 // See gtk_icon_info_set_raw_coordinates() for further
12495 // information about the coordinate system.
12496 // RETURNS: %TRUE if the icon has an embedded rectangle
12497 // <rectangle>: #GdkRectangle in which to store embedded rectangle coordinates; coordinates are only stored when this function returns %TRUE.
12498 int get_embedded_rect(/*out*/ Gdk2.Rectangle* rectangle) {
12499 return gtk_icon_info_get_embedded_rect(&this, rectangle);
12502 // Gets the filename for the icon. If the
12503 // %GTK_ICON_LOOKUP_USE_BUILTIN flag was passed
12504 // to gtk_icon_theme_lookup_icon(), there may be
12505 // no filename if a builtin icon is returned; in this
12506 // case, you should use gtk_icon_info_get_builtin_pixbuf().
12507 // if gtk_icon_info_get_builtin_pixbuf() should
12508 // be used instead. The return value is owned by
12509 // GTK+ and should not be modified or freed.
12510 // RETURNS: the filename for the icon, or %NULL
12511 char* get_filename() {
12512 return gtk_icon_info_get_filename(&this);
12515 // Renders an icon previously looked up in an icon theme using
12516 // gtk_icon_theme_lookup_icon(); the size will be based on the size
12517 // passed to gtk_icon_theme_lookup_icon(). Note that the resulting
12518 // pixbuf may not be exactly this size; an icon theme may have icons
12519 // that differ slightly from their nominal sizes, and in addition GTK+
12520 // will avoid scaling icons that it considers sufficiently close to the
12521 // requested size or for which the source image would have to be scaled
12522 // up too far. (This maintains sharpness.). This behaviour can be changed
12523 // by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
12524 // the #GtkIconInfo. If this flag has been specified, the pixbuf
12525 // returned by this function will be scaled to the exact size.
12526 // created icon or a new reference to an internal icon, so you must
12527 // not modify the icon. Use g_object_unref() to release your reference
12528 // to the icon.
12529 // RETURNS: the rendered icon; this may be a newly
12530 GdkPixbuf2.Pixbuf* /*new*/ load_icon(GLib2.Error** error=null) {
12531 return gtk_icon_info_load_icon(&this, error);
12534 // Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect()
12535 // and gtk_icon_info_get_attach_points() should be returned in their
12536 // original form as specified in the icon theme, instead of scaled
12537 // appropriately for the pixbuf returned by gtk_icon_info_load_icon().
12538 // Raw coordinates are somewhat strange; they are specified to be with
12539 // respect to the unscaled pixmap for PNG and XPM icons, but for SVG
12540 // icons, they are in a 1000x1000 coordinate space that is scaled
12541 // to the final size of the icon. You can determine if the icon is an SVG
12542 // icon by using gtk_icon_info_get_filename(), and seeing if it is non-%NULL
12543 // and ends in '.svg'.
12544 // This function is provided primarily to allow compatibility wrappers
12545 // for older API's, and is not expected to be useful for applications.
12546 // <raw_coordinates>: whether the coordinates of embedded rectangles and attached points should be returned in their original (unscaled) form.
12547 void set_raw_coordinates(int raw_coordinates) {
12548 gtk_icon_info_set_raw_coordinates(&this, raw_coordinates);
12552 // Used to specify options for gtk_icon_theme_lookup_icon()
12553 enum IconLookupFlags {
12554 NO_SVG = 1,
12555 FORCE_SVG = 2,
12556 USE_BUILTIN = 4,
12557 GENERIC_FALLBACK = 8,
12558 FORCE_SIZE = 16
12560 struct IconSet {
12562 // Creates a new #GtkIconSet. A #GtkIconSet represents a single icon
12563 // in various sizes and widget states. It can provide a #GdkPixbuf
12564 // for a given size and state on request, and automatically caches
12565 // some of the rendered #GdkPixbuf objects.
12566 // Normally you would use gtk_widget_render_icon() instead of
12567 // using #GtkIconSet directly. The one case where you'd use
12568 // #GtkIconSet is to create application-specific icon sets to place in
12569 // a #GtkIconFactory.
12570 // RETURNS: a new #GtkIconSet
12571 static IconSet* /*new*/ new_() {
12572 return gtk_icon_set_new();
12575 // Creates a new #GtkIconSet with @pixbuf as the default/fallback
12576 // source image. If you don't add any additional #GtkIconSource to the
12577 // icon set, all variants of the icon will be created from @pixbuf,
12578 // using scaling, pixelation, etc. as required to adjust the icon size
12579 // or make the icon look insensitive/prelighted.
12580 // RETURNS: a new #GtkIconSet
12581 // <pixbuf>: a #GdkPixbuf
12582 static IconSet* /*new*/ new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) {
12583 return gtk_icon_set_new_from_pixbuf(pixbuf);
12586 // Icon sets have a list of #GtkIconSource, which they use as base
12587 // icons for rendering icons in different states and sizes. Icons are
12588 // scaled, made to look insensitive, etc. in
12589 // gtk_icon_set_render_icon(), but #GtkIconSet needs base images to
12590 // work with. The base images and when to use them are described by
12591 // a #GtkIconSource.
12592 // This function copies @source, so you can reuse the same source immediately
12593 // without affecting the icon set.
12594 // to Previous Page" icon might point in a different direction in
12595 // Hebrew and in English; it might look different when insensitive;
12596 // and it might change size depending on toolbar mode (small/large
12597 // icons). So a single icon set would contain all those variants of
12598 // the icon, and you might add a separate source for each one.
12599 // You should nearly always add a "default" icon source with all
12600 // fields wildcarded, which will be used as a fallback if no more
12601 // specific source matches. #GtkIconSet always prefers more specific
12602 // icon sources to more generic icon sources. The order in which you
12603 // add the sources to the icon set does not matter.
12604 // gtk_icon_set_new_from_pixbuf() creates a new icon set with a
12605 // default icon source based on the given pixbuf.
12606 // <source>: a #GtkIconSource
12607 void add_source(IconSource* source) {
12608 gtk_icon_set_add_source(&this, source);
12611 // Copies @icon_set by value.
12612 // RETURNS: a new #GtkIconSet identical to the first.
12613 IconSet* /*new*/ copy() {
12614 return gtk_icon_set_copy(&this);
12617 // Obtains a list of icon sizes this icon set can render. The returned
12618 // array must be freed with g_free().
12619 // <sizes>: return location for array of sizes
12620 // <n_sizes>: location to store number of elements in returned array
12621 void get_sizes(/*out*/ /*POINTER*/ int* sizes, /*out*/ int* n_sizes) {
12622 gtk_icon_set_get_sizes(&this, sizes, n_sizes);
12625 // Increments the reference count on @icon_set.
12626 // RETURNS: @icon_set.
12627 IconSet* /*new*/ ref_() {
12628 return gtk_icon_set_ref(&this);
12631 // Renders an icon using gtk_style_render_icon(). In most cases,
12632 // gtk_widget_render_icon() is better, since it automatically provides
12633 // most of the arguments from the current widget settings. This
12634 // function never returns %NULL; if the icon can't be rendered
12635 // (perhaps because an image file fails to load), a default "missing
12636 // image" icon will be returned instead.
12637 // RETURNS: a #GdkPixbuf to be displayed
12638 // <style>: a #GtkStyle associated with @widget, or %NULL
12639 // <direction>: text direction
12640 // <state>: widget state
12641 // <size>: icon size. A size of (GtkIconSize)-1 means render at the size of the source and don't scale.
12642 // <widget>: widget that will display the icon, or %NULL. The only use that is typically made of this is to determine the appropriate #GdkScreen.
12643 // <detail>: detail to pass to the theme engine, or %NULL. Note that passing a detail of anything but %NULL will disable caching.
12644 GdkPixbuf2.Pixbuf* /*new*/ render_icon(Style* style, TextDirection direction, StateType state, int size, Widget* widget=null, char* detail=null) {
12645 return gtk_icon_set_render_icon(&this, style, direction, state, size, widget, detail);
12648 // Decrements the reference count on @icon_set, and frees memory
12649 // if the reference count reaches 0.
12650 void unref() {
12651 gtk_icon_set_unref(&this);
12655 enum IconSize {
12656 INVALID = 0,
12657 MENU = 1,
12658 SMALL_TOOLBAR = 2,
12659 LARGE_TOOLBAR = 3,
12660 BUTTON = 4,
12661 DND = 5,
12662 DIALOG = 6
12664 struct IconSource {
12666 // Creates a new #GtkIconSource. A #GtkIconSource contains a #GdkPixbuf (or
12667 // image filename) that serves as the base image for one or more of the
12668 // icons in a #GtkIconSet, along with a specification for which icons in the
12669 // icon set will be based on that pixbuf or image file. An icon set contains
12670 // a set of icons that represent "the same" logical concept in different states,
12671 // different global text directions, and different sizes.
12672 // So for example a web browser's "Back to Previous Page" icon might
12673 // point in a different direction in Hebrew and in English; it might
12674 // look different when insensitive; and it might change size depending
12675 // on toolbar mode (small/large icons). So a single icon set would
12676 // contain all those variants of the icon. #GtkIconSet contains a list
12677 // of #GtkIconSource from which it can derive specific icon variants in
12678 // the set.
12679 // In the simplest case, #GtkIconSet contains one source pixbuf from
12680 // which it derives all variants. The convenience function
12681 // gtk_icon_set_new_from_pixbuf() handles this case; if you only have
12682 // one source pixbuf, just use that function.
12683 // If you want to use a different base pixbuf for different icon
12684 // variants, you create multiple icon sources, mark which variants
12685 // they'll be used to create, and add them to the icon set with
12686 // gtk_icon_set_add_source().
12687 // By default, the icon source has all parameters wildcarded. That is,
12688 // the icon source will be used as the base icon for any desired text
12689 // direction, widget state, or icon size.
12690 // RETURNS: a new #GtkIconSource
12691 static IconSource* /*new*/ new_() {
12692 return gtk_icon_source_new();
12695 // Creates a copy of @source; mostly useful for language bindings.
12696 // RETURNS: a new #GtkIconSource
12697 IconSource* /*new*/ copy() {
12698 return gtk_icon_source_copy(&this);
12701 // Frees a dynamically-allocated icon source, along with its
12702 // filename, size, and pixbuf fields if those are not %NULL.
12703 void free() {
12704 gtk_icon_source_free(&this);
12707 // Obtains the text direction this icon source applies to. The return
12708 // value is only useful/meaningful if the text direction is <emphasis>not</emphasis>
12709 // wildcarded.
12710 // RETURNS: text direction this source matches
12711 TextDirection get_direction() {
12712 return gtk_icon_source_get_direction(&this);
12715 // Gets the value set by gtk_icon_source_set_direction_wildcarded().
12716 // RETURNS: %TRUE if this icon source is a base for any text direction variant
12717 int get_direction_wildcarded() {
12718 return gtk_icon_source_get_direction_wildcarded(&this);
12721 // Retrieves the source filename, or %NULL if none is set. The
12722 // filename is not a copy, and should not be modified or expected to
12723 // persist beyond the lifetime of the icon source.
12724 // or freed.
12725 // RETURNS: image filename. This string must not be modified
12726 char* get_filename() {
12727 return gtk_icon_source_get_filename(&this);
12730 // Retrieves the source icon name, or %NULL if none is set. The
12731 // icon_name is not a copy, and should not be modified or expected to
12732 // persist beyond the lifetime of the icon source.
12733 // RETURNS: icon name. This string must not be modified or freed.
12734 char* get_icon_name() {
12735 return gtk_icon_source_get_icon_name(&this);
12738 // Retrieves the source pixbuf, or %NULL if none is set.
12739 // In addition, if a filename source is in use, this
12740 // function in some cases will return the pixbuf from
12741 // loaded from the filename. This is, for example, true
12742 // for the GtkIconSource passed to the GtkStyle::render_icon()
12743 // virtual function. The reference count on the pixbuf is
12744 // not incremented.
12745 // RETURNS: source pixbuf
12746 GdkPixbuf2.Pixbuf* get_pixbuf() {
12747 return gtk_icon_source_get_pixbuf(&this);
12750 // Obtains the icon size this source applies to. The return value
12751 // is only useful/meaningful if the icon size is <emphasis>not</emphasis> wildcarded.
12752 // RETURNS: icon size this source matches.
12753 int get_size() {
12754 return gtk_icon_source_get_size(&this);
12757 // Gets the value set by gtk_icon_source_set_size_wildcarded().
12758 // RETURNS: %TRUE if this icon source is a base for any icon size variant
12759 int get_size_wildcarded() {
12760 return gtk_icon_source_get_size_wildcarded(&this);
12763 // Obtains the widget state this icon source applies to. The return
12764 // value is only useful/meaningful if the widget state is <emphasis>not</emphasis>
12765 // wildcarded.
12766 // RETURNS: widget state this source matches
12767 StateType get_state() {
12768 return gtk_icon_source_get_state(&this);
12771 // Gets the value set by gtk_icon_source_set_state_wildcarded().
12772 // RETURNS: %TRUE if this icon source is a base for any widget state variant
12773 int get_state_wildcarded() {
12774 return gtk_icon_source_get_state_wildcarded(&this);
12777 // Sets the text direction this icon source is intended to be used
12778 // with.
12779 // Setting the text direction on an icon source makes no difference
12780 // if the text direction is wildcarded. Therefore, you should usually
12781 // call gtk_icon_source_set_direction_wildcarded() to un-wildcard it
12782 // in addition to calling this function.
12783 // <direction>: text direction this source applies to
12784 void set_direction(TextDirection direction) {
12785 gtk_icon_source_set_direction(&this, direction);
12788 // If the text direction is wildcarded, this source can be used
12789 // as the base image for an icon in any #GtkTextDirection.
12790 // If the text direction is not wildcarded, then the
12791 // text direction the icon source applies to should be set
12792 // with gtk_icon_source_set_direction(), and the icon source
12793 // will only be used with that text direction.
12794 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
12795 // wildcarded sources, and will use an exact match when possible.
12796 // <setting>: %TRUE to wildcard the text direction
12797 void set_direction_wildcarded(int setting) {
12798 gtk_icon_source_set_direction_wildcarded(&this, setting);
12801 // Sets the name of an image file to use as a base image when creating
12802 // icon variants for #GtkIconSet. The filename must be absolute.
12803 // <filename>: image file to use
12804 void set_filename(char* filename) {
12805 gtk_icon_source_set_filename(&this, filename);
12808 // Sets the name of an icon to look up in the current icon theme
12809 // to use as a base image when creating icon variants for #GtkIconSet.
12810 // <icon_name>: name of icon to use
12811 void set_icon_name(char* icon_name=null) {
12812 gtk_icon_source_set_icon_name(&this, icon_name);
12815 // Sets a pixbuf to use as a base image when creating icon variants
12816 // for #GtkIconSet.
12817 // <pixbuf>: pixbuf to use as a source
12818 void set_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) {
12819 gtk_icon_source_set_pixbuf(&this, pixbuf);
12822 // Sets the icon size this icon source is intended to be used
12823 // with.
12824 // Setting the icon size on an icon source makes no difference
12825 // if the size is wildcarded. Therefore, you should usually
12826 // call gtk_icon_source_set_size_wildcarded() to un-wildcard it
12827 // in addition to calling this function.
12828 // <size>: icon size this source applies to
12829 void set_size(int size) {
12830 gtk_icon_source_set_size(&this, size);
12833 // If the icon size is wildcarded, this source can be used as the base
12834 // image for an icon of any size. If the size is not wildcarded, then
12835 // the size the source applies to should be set with
12836 // gtk_icon_source_set_size() and the icon source will only be used
12837 // with that specific size.
12838 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
12839 // wildcarded sources, and will use an exact match when possible.
12840 // #GtkIconSet will normally scale wildcarded source images to produce
12841 // an appropriate icon at a given size, but will not change the size
12842 // of source images that match exactly.
12843 // <setting>: %TRUE to wildcard the widget state
12844 void set_size_wildcarded(int setting) {
12845 gtk_icon_source_set_size_wildcarded(&this, setting);
12848 // Sets the widget state this icon source is intended to be used
12849 // with.
12850 // Setting the widget state on an icon source makes no difference
12851 // if the state is wildcarded. Therefore, you should usually
12852 // call gtk_icon_source_set_state_wildcarded() to un-wildcard it
12853 // in addition to calling this function.
12854 // <state>: widget state this source applies to
12855 void set_state(StateType state) {
12856 gtk_icon_source_set_state(&this, state);
12859 // If the widget state is wildcarded, this source can be used as the
12860 // base image for an icon in any #GtkStateType. If the widget state
12861 // is not wildcarded, then the state the source applies to should be
12862 // set with gtk_icon_source_set_state() and the icon source will
12863 // only be used with that specific state.
12864 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
12865 // wildcarded sources, and will use an exact match when possible.
12866 // #GtkIconSet will normally transform wildcarded source images to
12867 // produce an appropriate icon for a given state, for example
12868 // lightening an image on prelight, but will not modify source images
12869 // that match exactly.
12870 // <setting>: %TRUE to wildcard the widget state
12871 void set_state_wildcarded(int setting) {
12872 gtk_icon_source_set_state_wildcarded(&this, setting);
12876 struct IconTheme /* : GObject.Object */ {
12877 alias parent_instance this;
12878 alias parent_instance super_;
12879 alias parent_instance object;
12880 GObject2.Object parent_instance;
12881 private IconThemePrivate* priv;
12884 // Creates a new icon theme object. Icon theme objects are used
12885 // to lookup up an icon by name in a particular icon theme.
12886 // Usually, you'll want to use gtk_icon_theme_get_default()
12887 // or gtk_icon_theme_get_for_screen() rather than creating
12888 // a new icon theme object for scratch.
12889 // RETURNS: the newly created #GtkIconTheme object.
12890 static IconTheme* /*new*/ new_() {
12891 return gtk_icon_theme_new();
12894 // Registers a built-in icon for icon theme lookups. The idea
12895 // of built-in icons is to allow an application or library
12896 // that uses themed icons to function requiring files to
12897 // be present in the file system. For instance, the default
12898 // images for all of GTK+'s stock icons are registered
12899 // as built-icons.
12900 // In general, if you use gtk_icon_theme_add_builtin_icon()
12901 // you should also install the icon in the icon theme, so
12902 // that the icon is generally available.
12903 // This function will generally be used with pixbufs loaded
12904 // via gdk_pixbuf_new_from_inline().
12905 // <icon_name>: the name of the icon to register
12906 // <size>: the size at which to register the icon (different images can be registered for the same icon name at different sizes.)
12907 // <pixbuf>: #GdkPixbuf that contains the image to use for @icon_name.
12908 static void add_builtin_icon(char* icon_name, int size, GdkPixbuf2.Pixbuf* pixbuf) {
12909 gtk_icon_theme_add_builtin_icon(icon_name, size, pixbuf);
12912 // Gets the icon theme for the default screen. See
12913 // gtk_icon_theme_get_for_screen().
12914 // the default screen. This icon theme is associated with
12915 // the screen and can be used as long as the screen
12916 // is open. Do not ref or unref it.
12917 // RETURNS: A unique #GtkIconTheme associated with
12918 static IconTheme* get_default() {
12919 return gtk_icon_theme_get_default();
12922 // Gets the icon theme object associated with @screen; if this
12923 // function has not previously been called for the given
12924 // screen, a new icon theme object will be created and
12925 // associated with the screen. Icon theme objects are
12926 // fairly expensive to create, so using this function
12927 // is usually a better choice than calling than gtk_icon_theme_new()
12928 // and setting the screen yourself; by using this function
12929 // a single icon theme object will be shared between users.
12930 // the given screen. This icon theme is associated with
12931 // the screen and can be used as long as the screen
12932 // is open. Do not ref or unref it.
12933 // RETURNS: A unique #GtkIconTheme associated with
12934 // <screen>: a #GdkScreen
12935 static IconTheme* get_for_screen(Gdk2.Screen* screen) {
12936 return gtk_icon_theme_get_for_screen(screen);
12939 // Appends a directory to the search path.
12940 // See gtk_icon_theme_set_search_path().
12941 // <path>: directory name to append to the icon path
12942 void append_search_path(char* path) {
12943 gtk_icon_theme_append_search_path(&this, path);
12946 // Looks up a named icon and returns a structure containing
12947 // information such as the filename of the icon. The icon
12948 // can then be rendered into a pixbuf using
12949 // gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
12950 // combines these two steps if all you need is the pixbuf.)
12951 // If @icon_names contains more than one name, this function
12952 // tries them all in the given order before falling back to
12953 // inherited icon themes.
12954 // about the icon, or %NULL if the icon wasn't found. Free with
12955 // gtk_icon_info_free()
12956 // RETURNS: a #GtkIconInfo structure containing information
12957 // <icon_names>: %NULL-terminated array of icon names to lookup
12958 // <size>: desired icon size
12959 // <flags>: flags modifying the behavior of the icon lookup
12960 IconInfo* /*new*/ choose_icon(char* icon_names, int size, IconLookupFlags flags) {
12961 return gtk_icon_theme_choose_icon(&this, icon_names, size, flags);
12964 // Gets the name of an icon that is representative of the
12965 // current theme (for instance, to use when presenting
12966 // a list of themes to the user.)
12967 // Free with g_free().
12968 // RETURNS: the name of an example icon or %NULL.
12969 char* /*new*/ get_example_icon_name() {
12970 return gtk_icon_theme_get_example_icon_name(&this);
12973 // Returns an array of integers describing the sizes at which
12974 // the icon is available without scaling. A size of -1 means
12975 // that the icon is available in a scalable format. The array
12976 // is zero-terminated.
12977 // describing the sizes at which the icon is available. The array
12978 // should be freed with g_free() when it is no longer needed.
12979 // RETURNS: An newly allocated array
12980 // <icon_name>: the name of an icon
12981 int* get_icon_sizes(char* icon_name) {
12982 return gtk_icon_theme_get_icon_sizes(&this, icon_name);
12985 // Gets the current search path. See gtk_icon_theme_set_search_path().
12986 // <path>: (array length=n_elements) (out): location to store a list of icon theme path directories or %NULL The stored value should be freed with g_strfreev().
12987 // <n_elements>: location to store number of elements in @path, or %NULL
12988 void get_search_path(char** path, int* n_elements) {
12989 gtk_icon_theme_get_search_path(&this, path, n_elements);
12992 // Checks whether an icon theme includes an icon
12993 // for a particular name.
12994 // icon for @icon_name.
12995 // RETURNS: %TRUE if @icon_theme includes an
12996 // <icon_name>: the name of an icon
12997 int has_icon(char* icon_name) {
12998 return gtk_icon_theme_has_icon(&this, icon_name);
13001 // Gets the list of contexts available within the current
13002 // hierarchy of icon themes
13003 // contexts in the theme. You must first free each element
13004 // in the list with g_free(), then free the list itself
13005 // with g_list_free().
13006 // RETURNS: a #GList list holding the names of all the
13007 GLib2.List* /*new*/ list_contexts() {
13008 return gtk_icon_theme_list_contexts(&this);
13011 // Lists the icons in the current icon theme. Only a subset
13012 // of the icons can be listed by providing a context string.
13013 // The set of values for the context string is system dependent,
13014 // but will typically include such values as "Applications" and
13015 // "MimeTypes".
13016 // holding the names of all the icons in the theme. You must first
13017 // free each element in the list with g_free(), then free the list
13018 // itself with g_list_free().
13019 // RETURNS: a #GList list
13020 // <context>: a string identifying a particular type of icon, or %NULL to list all icons.
13021 GLib2.List* /*new*/ list_icons(char* context) {
13022 return gtk_icon_theme_list_icons(&this, context);
13025 // Looks up an icon in an icon theme, scales it to the given size
13026 // and renders it into a pixbuf. This is a convenience function;
13027 // if more details about the icon are needed, use
13028 // gtk_icon_theme_lookup_icon() followed by gtk_icon_info_load_icon().
13029 // Note that you probably want to listen for icon theme changes and
13030 // update the icon. This is usually done by connecting to the
13031 // GtkWidget::style-set signal. If for some reason you do not want to
13032 // update the icon when the icon theme changes, you should consider
13033 // using gdk_pixbuf_copy() to make a private copy of the pixbuf
13034 // returned by this function. Otherwise GTK+ may need to keep the old
13035 // icon theme loaded, which would be a waste of memory.
13036 // created icon or a new reference to an internal icon, so you must not modify
13037 // the icon. Use g_object_unref() to release your reference to the
13038 // icon. %NULL if the icon isn't found.
13039 // RETURNS: the rendered icon; this may be a newly
13040 // <icon_name>: the name of the icon to lookup
13041 // <size>: the desired icon size. The resulting icon may not be exactly this size; see gtk_icon_info_load_icon().
13042 // <flags>: flags modifying the behavior of the icon lookup
13043 GdkPixbuf2.Pixbuf* /*new*/ load_icon(char* icon_name, int size, IconLookupFlags flags, GLib2.Error** error=null) {
13044 return gtk_icon_theme_load_icon(&this, icon_name, size, flags, error);
13047 // Looks up an icon and returns a structure containing
13048 // information such as the filename of the icon.
13049 // The icon can then be rendered into a pixbuf using
13050 // gtk_icon_info_load_icon().
13051 // information about the icon, or %NULL if the icon
13052 // wasn't found. Free with gtk_icon_info_free()
13053 // RETURNS: a #GtkIconInfo structure containing
13054 // <icon>: the #GIcon to look up
13055 // <size>: desired icon size
13056 // <flags>: flags modifying the behavior of the icon lookup
13057 IconInfo* /*new*/ lookup_by_gicon(Gio2.Icon* icon, int size, IconLookupFlags flags) {
13058 return gtk_icon_theme_lookup_by_gicon(&this, icon, size, flags);
13061 // Looks up a named icon and returns a structure containing
13062 // information such as the filename of the icon. The icon
13063 // can then be rendered into a pixbuf using
13064 // gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
13065 // combines these two steps if all you need is the pixbuf.)
13066 // about the icon, or %NULL if the icon wasn't found. Free with
13067 // gtk_icon_info_free()
13068 // RETURNS: a #GtkIconInfo structure containing information
13069 // <icon_name>: the name of the icon to lookup
13070 // <size>: desired icon size
13071 // <flags>: flags modifying the behavior of the icon lookup
13072 IconInfo* /*new*/ lookup_icon(char* icon_name, int size, IconLookupFlags flags) {
13073 return gtk_icon_theme_lookup_icon(&this, icon_name, size, flags);
13076 // Prepends a directory to the search path.
13077 // See gtk_icon_theme_set_search_path().
13078 // <path>: directory name to prepend to the icon path
13079 void prepend_search_path(char* path) {
13080 gtk_icon_theme_prepend_search_path(&this, path);
13083 // Checks to see if the icon theme has changed; if it has, any
13084 // currently cached information is discarded and will be reloaded
13085 // next time @icon_theme is accessed.
13086 // to be reloaded.
13087 // RETURNS: %TRUE if the icon theme has changed and needed
13088 int rescan_if_needed() {
13089 return gtk_icon_theme_rescan_if_needed(&this);
13092 // Sets the name of the icon theme that the #GtkIconTheme object uses
13093 // overriding system configuration. This function cannot be called
13094 // on the icon theme objects returned from gtk_icon_theme_get_default()
13095 // and gtk_icon_theme_get_for_screen().
13096 // <theme_name>: name of icon theme to use instead of configured theme, or %NULL to unset a previously set custom theme
13097 void set_custom_theme(char* theme_name) {
13098 gtk_icon_theme_set_custom_theme(&this, theme_name);
13101 // Sets the screen for an icon theme; the screen is used
13102 // to track the user's currently configured icon theme,
13103 // which might be different for different screens.
13104 // <screen>: a #GdkScreen
13105 void set_screen(Gdk2.Screen* screen) {
13106 gtk_icon_theme_set_screen(&this, screen);
13109 // Sets the search path for the icon theme object. When looking
13110 // for an icon theme, GTK+ will search for a subdirectory of
13111 // one or more of the directories in @path with the same name
13112 // as the icon theme. (Themes from multiple of the path elements
13113 // are combined to allow themes to be extended by adding icons
13114 // in the user's home directory.)
13115 // In addition if an icon found isn't found either in the current
13116 // icon theme or the default icon theme, and an image file with
13117 // the right name is found directly in one of the elements of
13118 // (This is legacy feature, and new icons should be put
13119 // into the default icon theme, which is called DEFAULT_THEME_NAME,
13120 // rather than directly on the icon path.)
13121 // <path>: array of directories that are searched for icon themes
13122 // <n_elements>: number of elements in @path.
13123 void set_search_path(char* path, int n_elements) {
13124 gtk_icon_theme_set_search_path(&this, path, n_elements);
13127 // Emitted when the current icon theme is switched or GTK+ detects
13128 // that a change has occurred in the contents of the current
13129 // icon theme.
13130 extern (C) alias static void function (IconTheme* this_, void* user_data=null) signal_changed;
13132 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13133 return super_.signal_connect!name(cb, data, cf);
13136 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13137 return signal_connect_data(&this, cast(char*)"changed",
13138 cast(GObject2.Callback)cb, data, null, cf);
13142 struct IconThemeClass {
13143 GObject2.ObjectClass parent_class;
13144 extern (C) void function (IconTheme* icon_theme) changed;
13147 // Error codes for GtkIconTheme operations.
13148 enum IconThemeError {
13149 NOT_FOUND = 0,
13150 FAILED = 1
13152 struct IconThemePrivate {
13155 struct IconView /* : Container */ {
13156 alias parent this;
13157 alias parent super_;
13158 alias parent container;
13159 Container parent;
13160 IconViewPrivate* priv;
13163 // Creates a new #GtkIconView widget
13164 // RETURNS: A newly created #GtkIconView widget
13165 static IconView* new_() {
13166 return gtk_icon_view_new();
13169 // Creates a new #GtkIconView widget with the model @model.
13170 // RETURNS: A newly created #GtkIconView widget.
13171 // <model>: The model.
13172 static IconView* new_with_model(TreeModel* model) {
13173 return gtk_icon_view_new_with_model(model);
13176 // Converts widget coordinates to coordinates for the bin_window,
13177 // as expected by e.g. gtk_icon_view_get_path_at_pos().
13178 // <wx>: X coordinate relative to the widget
13179 // <wy>: Y coordinate relative to the widget
13180 // <bx>: return location for bin_window X coordinate
13181 // <by>: return location for bin_window Y coordinate
13182 void convert_widget_to_bin_window_coords(int wx, int wy, /*out*/ int* bx, /*out*/ int* by) {
13183 gtk_icon_view_convert_widget_to_bin_window_coords(&this, wx, wy, bx, by);
13186 // Creates a #GdkPixmap representation of the item at @path.
13187 // This image is used for a drag icon.
13188 // RETURNS: a newly-allocated pixmap of the drag icon.
13189 // <path>: a #GtkTreePath in @icon_view
13190 Gdk2.Pixmap* /*new*/ create_drag_icon(TreePath* path) {
13191 return gtk_icon_view_create_drag_icon(&this, path);
13194 // Turns @icon_view into a drop destination for automatic DND. Calling this
13195 // method sets #GtkIconView:reorderable to %FALSE.
13196 // <targets>: the table of targets that the drag will support
13197 // <n_targets>: the number of items in @targets
13198 // <actions>: the bitmask of possible actions for a drag to this widget
13199 void enable_model_drag_dest(TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
13200 gtk_icon_view_enable_model_drag_dest(&this, targets, n_targets, actions);
13203 // Turns @icon_view into a drag source for automatic DND. Calling this
13204 // method sets #GtkIconView:reorderable to %FALSE.
13205 // <start_button_mask>: Mask of allowed buttons to start drag
13206 // <targets>: the table of targets that the drag will support
13207 // <n_targets>: the number of items in @targets
13208 // <actions>: the bitmask of possible actions for a drag from this widget
13209 void enable_model_drag_source(Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
13210 gtk_icon_view_enable_model_drag_source(&this, start_button_mask, targets, n_targets, actions);
13213 // Returns the value of the ::column-spacing property.
13214 // RETURNS: the space between columns
13215 int get_column_spacing() {
13216 return gtk_icon_view_get_column_spacing(&this);
13219 // Returns the value of the ::columns property.
13220 // RETURNS: the number of columns, or -1
13221 int get_columns() {
13222 return gtk_icon_view_get_columns(&this);
13225 // Fills in @path and @cell with the current cursor path and cell.
13226 // If the cursor isn't currently set, then *@path will be %NULL.
13227 // If no cell currently has focus, then *@cell will be %NULL.
13228 // The returned #GtkTreePath must be freed with gtk_tree_path_free().
13229 // RETURNS: %TRUE if the cursor is set.
13230 // <path>: Return location for the current cursor path, or %NULL
13231 // <cell>: Return location the current focus cell, or %NULL
13232 int get_cursor(TreePath** path=null, CellRenderer** cell=null) {
13233 return gtk_icon_view_get_cursor(&this, path, cell);
13236 // Determines the destination item for a given position.
13237 // RETURNS: whether there is an item at the given position.
13238 // <drag_x>: the position to determine the destination item for
13239 // <drag_y>: the position to determine the destination item for
13240 // <path>: Return location for the path of the item, or %NULL.
13241 // <pos>: Return location for the drop position, or %NULL
13242 int get_dest_item_at_pos(int drag_x, int drag_y, TreePath** path=null, IconViewDropPosition* pos=null) {
13243 return gtk_icon_view_get_dest_item_at_pos(&this, drag_x, drag_y, path, pos);
13246 // Gets information about the item that is highlighted for feedback.
13247 // <path>: Return location for the path of the highlighted item, or %NULL.
13248 // <pos>: Return location for the drop position, or %NULL
13249 void get_drag_dest_item(TreePath** path=null, IconViewDropPosition* pos=null) {
13250 gtk_icon_view_get_drag_dest_item(&this, path, pos);
13253 // Finds the path at the point (@x, @y), relative to bin_window coordinates.
13254 // In contrast to gtk_icon_view_get_path_at_pos(), this function also
13255 // obtains the cell at the specified position. The returned path should
13256 // be freed with gtk_tree_path_free().
13257 // See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
13258 // widget coordinates to bin_window coordinates.
13259 // RETURNS: %TRUE if an item exists at the specified position
13260 // <x>: The x position to be identified
13261 // <y>: The y position to be identified
13262 // <path>: Return location for the path, or %NULL
13263 // <cell>: Return location for the renderer responsible for the cell at (@x, @y), or %NULL
13264 int get_item_at_pos(int x, int y, TreePath** path, CellRenderer** cell) {
13265 return gtk_icon_view_get_item_at_pos(&this, x, y, path, cell);
13268 // Gets the column in which the item @path is currently
13269 // displayed. Column numbers start at 0.
13270 // RETURNS: The column in which the item is displayed
13271 // <path>: the #GtkTreePath of the item
13272 int get_item_column(TreePath* path) {
13273 return gtk_icon_view_get_item_column(&this, path);
13276 // Returns the value of the ::item-orientation property which determines
13277 // whether the labels are drawn beside the icons instead of below.
13278 // RETURNS: the relative position of texts and icons
13279 Orientation get_item_orientation() {
13280 return gtk_icon_view_get_item_orientation(&this);
13283 // Returns the value of the ::item-padding property.
13284 // RETURNS: the padding around items
13285 int get_item_padding() {
13286 return gtk_icon_view_get_item_padding(&this);
13289 // Gets the row in which the item @path is currently
13290 // displayed. Row numbers start at 0.
13291 // RETURNS: The row in which the item is displayed
13292 // <path>: the #GtkTreePath of the item
13293 int get_item_row(TreePath* path) {
13294 return gtk_icon_view_get_item_row(&this, path);
13297 // Returns the value of the ::item-width property.
13298 // RETURNS: the width of a single item, or -1
13299 int get_item_width() {
13300 return gtk_icon_view_get_item_width(&this);
13303 // Returns the value of the ::margin property.
13304 // RETURNS: the space at the borders
13305 int get_margin() {
13306 return gtk_icon_view_get_margin(&this);
13309 // Returns the column with markup text for @icon_view.
13310 // RETURNS: the markup column, or -1 if it's unset.
13311 int get_markup_column() {
13312 return gtk_icon_view_get_markup_column(&this);
13315 // Returns the model the #GtkIconView is based on. Returns %NULL if the
13316 // model is unset.
13317 // currently being used.
13318 // RETURNS: A #GtkTreeModel, or %NULL if none is
13319 TreeModel* get_model() {
13320 return gtk_icon_view_get_model(&this);
13323 // Returns the value of the ::orientation property which determines
13324 // whether the labels are drawn beside the icons instead of below.
13325 // RETURNS: the relative position of texts and icons
13326 Orientation get_orientation() {
13327 return gtk_icon_view_get_orientation(&this);
13330 // Finds the path at the point (@x, @y), relative to bin_window coordinates.
13331 // See gtk_icon_view_get_item_at_pos(), if you are also interested in
13332 // the cell at the specified position.
13333 // See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
13334 // widget coordinates to bin_window coordinates.
13335 // if no icon exists at that position.
13336 // RETURNS: The #GtkTreePath corresponding to the icon or %NULL
13337 // <x>: The x position to be identified
13338 // <y>: The y position to be identified
13339 TreePath* /*new*/ get_path_at_pos(int x, int y) {
13340 return gtk_icon_view_get_path_at_pos(&this, x, y);
13343 // Returns the column with pixbufs for @icon_view.
13344 // RETURNS: the pixbuf column, or -1 if it's unset.
13345 int get_pixbuf_column() {
13346 return gtk_icon_view_get_pixbuf_column(&this);
13349 // Retrieves whether the user can reorder the list via drag-and-drop.
13350 // See gtk_icon_view_set_reorderable().
13351 // RETURNS: %TRUE if the list can be reordered.
13352 int get_reorderable() {
13353 return gtk_icon_view_get_reorderable(&this);
13356 // Returns the value of the ::row-spacing property.
13357 // RETURNS: the space between rows
13358 int get_row_spacing() {
13359 return gtk_icon_view_get_row_spacing(&this);
13362 // Creates a list of paths of all selected items. Additionally, if you are
13363 // planning on modifying the model after calling this function, you may
13364 // want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
13365 // To do this, you can use gtk_tree_row_reference_new().
13366 // To free the return value, use:
13367 // |[
13368 // g_list_foreach (list, (GFunc)gtk_tree_path_free, NULL);
13369 // g_list_free (list);
13370 // ]|
13371 // RETURNS: A #GList containing a #GtkTreePath for each selected row.
13372 GLib2.List* /*new*/ get_selected_items() {
13373 return gtk_icon_view_get_selected_items(&this);
13376 // Gets the selection mode of the @icon_view.
13377 // RETURNS: the current selection mode
13378 SelectionMode get_selection_mode() {
13379 return gtk_icon_view_get_selection_mode(&this);
13382 // Returns the value of the ::spacing property.
13383 // RETURNS: the space between cells
13384 int get_spacing() {
13385 return gtk_icon_view_get_spacing(&this);
13388 // Returns the column with text for @icon_view.
13389 // RETURNS: the text column, or -1 if it's unset.
13390 int get_text_column() {
13391 return gtk_icon_view_get_text_column(&this);
13394 // Returns the column of @icon_view's model which is being used for
13395 // displaying tooltips on @icon_view's rows.
13396 // used, or -1 if this is disabled.
13397 // RETURNS: the index of the tooltip column that is currently being
13398 int get_tooltip_column() {
13399 return gtk_icon_view_get_tooltip_column(&this);
13402 // This function is supposed to be used in a #GtkWidget::query-tooltip
13403 // signal handler for #GtkIconView. The @x, @y and @keyboard_tip values
13404 // which are received in the signal handler, should be passed to this
13405 // function without modification.
13406 // The return value indicates whether there is an icon view item at the given
13407 // coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
13408 // tooltips the item returned will be the cursor item. When %TRUE, then any of
13409 // that row and the corresponding model. @x and @y will always be converted
13410 // to be relative to @icon_view's bin_window if @keyboard_tooltip is %FALSE.
13411 // RETURNS: whether or not the given tooltip context points to a item
13412 // <x>: the x coordinate (relative to widget coordinates)
13413 // <y>: the y coordinate (relative to widget coordinates)
13414 // <keyboard_tip>: whether this is a keyboard tooltip or not
13415 // <model>: a pointer to receive a #GtkTreeModel or %NULL
13416 // <path>: a pointer to receive a #GtkTreePath or %NULL
13417 // <iter>: a pointer to receive a #GtkTreeIter or %NULL
13418 int get_tooltip_context(/*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ TreeModel** model=null, /*out*/ TreePath** path=null, /*out*/ TreeIter* iter=null) {
13419 return gtk_icon_view_get_tooltip_context(&this, x, y, keyboard_tip, model, path, iter);
13422 // Sets @start_path and @end_path to be the first and last visible path.
13423 // Note that there may be invisible paths in between.
13424 // Both paths should be freed with gtk_tree_path_free() after use.
13425 // RETURNS: %TRUE, if valid paths were placed in @start_path and @end_path
13426 // <start_path>: Return location for start of region, or %NULL
13427 // <end_path>: Return location for end of region, or %NULL
13428 int get_visible_range(TreePath** start_path=null, TreePath** end_path=null) {
13429 return gtk_icon_view_get_visible_range(&this, start_path, end_path);
13432 // Activates the item determined by @path.
13433 // <path>: The #GtkTreePath to be activated
13434 void item_activated(TreePath* path) {
13435 gtk_icon_view_item_activated(&this, path);
13438 // Returns %TRUE if the icon pointed to by @path is currently
13439 // selected. If @path does not point to a valid location, %FALSE is returned.
13440 // RETURNS: %TRUE if @path is selected.
13441 // <path>: A #GtkTreePath to check selection on.
13442 int path_is_selected(TreePath* path) {
13443 return gtk_icon_view_path_is_selected(&this, path);
13446 // Moves the alignments of @icon_view to the position specified by @path.
13447 // where @column is placed. Both are expected to be between 0.0 and 1.0.
13448 // 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means
13449 // center.
13450 // If @use_align is %FALSE, then the alignment arguments are ignored, and the
13451 // tree does the minimum amount of work to scroll the item onto the screen.
13452 // This means that the item will be scrolled to the edge closest to its current
13453 // position. If the item is currently visible on the screen, nothing is done.
13454 // This function only works if the model is set, and @path is a valid row on
13455 // the model. If the model changes before the @icon_view is realized, the
13456 // centered path will be modified to reflect this change.
13457 // <path>: The path of the item to move to.
13458 // <use_align>: whether to use alignment arguments, or %FALSE.
13459 // <row_align>: The vertical alignment of the item specified by @path.
13460 // <col_align>: The horizontal alignment of the item specified by @path.
13461 void scroll_to_path(TreePath* path, int use_align, float row_align, float col_align) {
13462 gtk_icon_view_scroll_to_path(&this, path, use_align, row_align, col_align);
13465 // Selects all the icons. @icon_view must has its selection mode set
13466 // to #GTK_SELECTION_MULTIPLE.
13467 void select_all() {
13468 gtk_icon_view_select_all(&this);
13471 // Selects the row at @path.
13472 // <path>: The #GtkTreePath to be selected.
13473 void select_path(TreePath* path) {
13474 gtk_icon_view_select_path(&this, path);
13477 // Calls a function for each selected icon. Note that the model or
13478 // selection cannot be modified from within this function.
13479 // <func>: The function to call for each selected icon.
13480 // <data>: User data to pass to the function.
13481 void selected_foreach(IconViewForeachFunc func, void* data) {
13482 gtk_icon_view_selected_foreach(&this, func, data);
13485 // Sets the ::column-spacing property which specifies the space
13486 // which is inserted between the columns of the icon view.
13487 // <column_spacing>: the column spacing
13488 void set_column_spacing(int column_spacing) {
13489 gtk_icon_view_set_column_spacing(&this, column_spacing);
13492 // Sets the ::columns property which determines in how
13493 // many columns the icons are arranged. If @columns is
13494 // -1, the number of columns will be chosen automatically
13495 // to fill the available area.
13496 // <columns>: the number of columns
13497 void set_columns(int columns) {
13498 gtk_icon_view_set_columns(&this, columns);
13501 // Sets the current keyboard focus to be at @path, and selects it. This is
13502 // useful when you want to focus the user's attention on a particular item.
13503 // If @cell is not %NULL, then focus is given to the cell specified by
13504 // it. Additionally, if @start_editing is %TRUE, then editing should be
13505 // started in the specified cell.
13506 // This function is often followed by <literal>gtk_widget_grab_focus
13507 // (icon_view)</literal> in order to give keyboard focus to the widget.
13508 // Please note that editing can only happen when the widget is realized.
13509 // <path>: A #GtkTreePath
13510 // <cell>: One of the cell renderers of @icon_view, or %NULL
13511 // <start_editing>: %TRUE if the specified cell should start being edited.
13512 void set_cursor(TreePath* path, CellRenderer* cell, int start_editing) {
13513 gtk_icon_view_set_cursor(&this, path, cell, start_editing);
13516 // Sets the item that is highlighted for feedback.
13517 // <path>: The path of the item to highlight, or %NULL.
13518 // <pos>: Specifies where to drop, relative to the item
13519 void set_drag_dest_item(TreePath* path, IconViewDropPosition pos) {
13520 gtk_icon_view_set_drag_dest_item(&this, path, pos);
13523 // Sets the ::item-orientation property which determines whether
13524 // the labels are drawn beside the icons instead of below.
13525 // <orientation>: the relative position of texts and icons
13526 void set_item_orientation(Orientation orientation) {
13527 gtk_icon_view_set_item_orientation(&this, orientation);
13530 // Sets the #GtkIconView:item-padding property which specifies the padding
13531 // around each of the icon view's items.
13532 // <item_padding>: the item padding
13533 void set_item_padding(int item_padding) {
13534 gtk_icon_view_set_item_padding(&this, item_padding);
13537 // Sets the ::item-width property which specifies the width
13538 // to use for each item. If it is set to -1, the icon view will
13539 // automatically determine a suitable item size.
13540 // <item_width>: the width for each item
13541 void set_item_width(int item_width) {
13542 gtk_icon_view_set_item_width(&this, item_width);
13545 // Sets the ::margin property which specifies the space
13546 // which is inserted at the top, bottom, left and right
13547 // of the icon view.
13548 // <margin>: the margin
13549 void set_margin(int margin) {
13550 gtk_icon_view_set_margin(&this, margin);
13553 // Sets the column with markup information for @icon_view to be
13554 // If the markup column is set to something, it overrides
13555 // the text column set by gtk_icon_view_set_text_column().
13556 // <column>: A column in the currently used model, or -1 to display no text
13557 void set_markup_column(int column) {
13558 gtk_icon_view_set_markup_column(&this, column);
13561 // Sets the model for a #GtkIconView.
13562 // If the @icon_view already has a model set, it will remove
13563 // it before setting the new model. If @model is %NULL, then
13564 // it will unset the old model.
13565 // <model>: The model.
13566 void set_model(TreeModel* model=null) {
13567 gtk_icon_view_set_model(&this, model);
13570 // Sets the ::orientation property which determines whether the labels
13571 // are drawn beside the icons instead of below.
13572 // <orientation>: the relative position of texts and icons
13573 void set_orientation(Orientation orientation) {
13574 gtk_icon_view_set_orientation(&this, orientation);
13577 // Sets the column with pixbufs for @icon_view to be @column. The pixbuf
13578 // column must be of type #GDK_TYPE_PIXBUF
13579 // <column>: A column in the currently used model, or -1 to disable
13580 void set_pixbuf_column(int column) {
13581 gtk_icon_view_set_pixbuf_column(&this, column);
13584 // This function is a convenience function to allow you to reorder models that
13585 // support the #GtkTreeDragSourceIface and the #GtkTreeDragDestIface. Both
13586 // #GtkTreeStore and #GtkListStore support these. If @reorderable is %TRUE, then
13587 // the user can reorder the model by dragging and dropping rows. The
13588 // developer can listen to these changes by connecting to the model's
13589 // row_inserted and row_deleted signals. The reordering is implemented by setting up
13590 // the icon view as a drag source and destination. Therefore, drag and
13591 // drop can not be used in a reorderable view for any other purpose.
13592 // This function does not give you any degree of control over the order -- any
13593 // reordering is allowed. If more control is needed, you should probably
13594 // handle drag and drop manually.
13595 // <reorderable>: %TRUE, if the list of items can be reordered.
13596 void set_reorderable(int reorderable) {
13597 gtk_icon_view_set_reorderable(&this, reorderable);
13600 // Sets the ::row-spacing property which specifies the space
13601 // which is inserted between the rows of the icon view.
13602 // <row_spacing>: the row spacing
13603 void set_row_spacing(int row_spacing) {
13604 gtk_icon_view_set_row_spacing(&this, row_spacing);
13607 // Sets the selection mode of the @icon_view.
13608 // <mode>: The selection mode
13609 void set_selection_mode(SelectionMode mode) {
13610 gtk_icon_view_set_selection_mode(&this, mode);
13613 // Sets the ::spacing property which specifies the space
13614 // which is inserted between the cells (i.e. the icon and
13615 // the text) of an item.
13616 // <spacing>: the spacing
13617 void set_spacing(int spacing) {
13618 gtk_icon_view_set_spacing(&this, spacing);
13621 // Sets the column with text for @icon_view to be @column. The text
13622 // column must be of type #G_TYPE_STRING.
13623 // <column>: A column in the currently used model, or -1 to display no text
13624 void set_text_column(int column) {
13625 gtk_icon_view_set_text_column(&this, column);
13628 // Sets the tip area of @tooltip to the area which @cell occupies in
13629 // the item pointed to by @path. See also gtk_tooltip_set_tip_area().
13630 // See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
13631 // <tooltip>: a #GtkTooltip
13632 // <path>: a #GtkTreePath
13633 // <cell>: a #GtkCellRenderer or %NULL
13634 void set_tooltip_cell(Tooltip* tooltip, TreePath* path, CellRenderer* cell=null) {
13635 gtk_icon_view_set_tooltip_cell(&this, tooltip, path, cell);
13638 // If you only plan to have simple (text-only) tooltips on full items, you
13639 // can use this function to have #GtkIconView handle these automatically
13640 // for you. @column should be set to the column in @icon_view's model
13641 // containing the tooltip texts, or -1 to disable this feature.
13642 // When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
13643 // <column>: an integer, which is a valid column number for @icon_view's model
13644 void set_tooltip_column(int column) {
13645 gtk_icon_view_set_tooltip_column(&this, column);
13648 // Sets the tip area of @tooltip to be the area covered by the item at @path.
13649 // See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
13650 // See also gtk_tooltip_set_tip_area().
13651 // <tooltip>: a #GtkTooltip
13652 // <path>: a #GtkTreePath
13653 void set_tooltip_item(Tooltip* tooltip, TreePath* path) {
13654 gtk_icon_view_set_tooltip_item(&this, tooltip, path);
13656 // Unselects all the icons.
13657 void unselect_all() {
13658 gtk_icon_view_unselect_all(&this);
13661 // Unselects the row at @path.
13662 // <path>: The #GtkTreePath to be unselected.
13663 void unselect_path(TreePath* path) {
13664 gtk_icon_view_unselect_path(&this, path);
13667 // Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
13668 // method sets #GtkIconView:reorderable to %FALSE.
13669 void unset_model_drag_dest() {
13670 gtk_icon_view_unset_model_drag_dest(&this);
13673 // Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
13674 // method sets #GtkIconView:reorderable to %FALSE.
13675 void unset_model_drag_source() {
13676 gtk_icon_view_unset_model_drag_source(&this);
13679 // A <link linkend="keybinding-signals">keybinding signal</link>
13680 // which gets emitted when the user activates the currently
13681 // focused item.
13682 // Applications should not connect to it, but may emit it with
13683 // g_signal_emit_by_name() if they need to control activation
13684 // programmatically.
13685 // The default bindings for this signal are Space, Return and Enter.
13686 extern (C) alias static c_int function (IconView* this_, void* user_data=null) signal_activate_cursor_item;
13688 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13689 return super_.signal_connect!name(cb, data, cf);
13692 ulong signal_connect(string name:"activate-cursor-item", CB/*:signal_activate_cursor_item*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13693 return signal_connect_data(&this, cast(char*)"activate-cursor-item",
13694 cast(GObject2.Callback)cb, data, null, cf);
13697 // The ::item-activated signal is emitted when the method
13698 // gtk_icon_view_item_activated() is called or the user double
13699 // clicks an item. It is also emitted when a non-editable item
13700 // pressed.
13701 // <path>: the #GtkTreePath for the activated item
13702 extern (C) alias static void function (IconView* this_, TreePath* path, void* user_data=null) signal_item_activated;
13703 ulong signal_connect(string name:"item-activated", CB/*:signal_item_activated*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13704 return signal_connect_data(&this, cast(char*)"item-activated",
13705 cast(GObject2.Callback)cb, data, null, cf);
13708 // The ::move-cursor signal is a
13709 // <link linkend="keybinding-signals">keybinding signal</link>
13710 // which gets emitted when the user initiates a cursor movement.
13711 // Applications should not connect to it, but may emit it with
13712 // g_signal_emit_by_name() if they need to control the cursor
13713 // programmatically.
13714 // The default bindings for this signal include
13715 // <itemizedlist>
13716 // <listitem>Arrow keys which move by individual steps</listitem>
13717 // <listitem>Home/End keys which move to the first/last item</listitem>
13718 // <listitem>PageUp/PageDown which move by "pages"</listitem>
13719 // </itemizedlist>
13720 // All of these will extend the selection when combined with
13721 // the Shift modifier.
13722 // <step>: the granularity of the move, as a #GtkMovementStep
13723 // <count>: the number of @step units to move
13724 extern (C) alias static c_int function (IconView* this_, MovementStep* step, int count, void* user_data=null) signal_move_cursor;
13725 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13726 return signal_connect_data(&this, cast(char*)"move-cursor",
13727 cast(GObject2.Callback)cb, data, null, cf);
13730 // A <link linkend="keybinding-signals">keybinding signal</link>
13731 // which gets emitted when the user selects all items.
13732 // Applications should not connect to it, but may emit it with
13733 // g_signal_emit_by_name() if they need to control selection
13734 // programmatically.
13735 // The default binding for this signal is Ctrl-a.
13736 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_select_all;
13737 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13738 return signal_connect_data(&this, cast(char*)"select-all",
13739 cast(GObject2.Callback)cb, data, null, cf);
13742 // A <link linkend="keybinding-signals">keybinding signal</link>
13743 // which gets emitted when the user selects the item that is currently
13744 // focused.
13745 // Applications should not connect to it, but may emit it with
13746 // g_signal_emit_by_name() if they need to control selection
13747 // programmatically.
13748 // There is no default binding for this signal.
13749 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_select_cursor_item;
13750 ulong signal_connect(string name:"select-cursor-item", CB/*:signal_select_cursor_item*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13751 return signal_connect_data(&this, cast(char*)"select-cursor-item",
13752 cast(GObject2.Callback)cb, data, null, cf);
13755 // The ::selection-changed signal is emitted when the selection
13756 // (i.e. the set of selected items) changes.
13757 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_selection_changed;
13758 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13759 return signal_connect_data(&this, cast(char*)"selection-changed",
13760 cast(GObject2.Callback)cb, data, null, cf);
13763 // Set the scroll adjustments for the icon view. Usually scrolled containers
13764 // like #GtkScrolledWindow will emit this signal to connect two instances
13765 // of #GtkScrollbar to the scroll directions of the #GtkIconView.
13766 extern (C) alias static void function (IconView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
13767 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13768 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
13769 cast(GObject2.Callback)cb, data, null, cf);
13772 // A <link linkend="keybinding-signals">keybinding signal</link>
13773 // which gets emitted when the user toggles whether the currently
13774 // focused item is selected or not. The exact effect of this
13775 // depend on the selection mode.
13776 // Applications should not connect to it, but may emit it with
13777 // g_signal_emit_by_name() if they need to control selection
13778 // programmatically.
13779 // There is no default binding for this signal is Ctrl-Space.
13780 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_toggle_cursor_item;
13781 ulong signal_connect(string name:"toggle-cursor-item", CB/*:signal_toggle_cursor_item*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13782 return signal_connect_data(&this, cast(char*)"toggle-cursor-item",
13783 cast(GObject2.Callback)cb, data, null, cf);
13786 // A <link linkend="keybinding-signals">keybinding signal</link>
13787 // which gets emitted when the user unselects all items.
13788 // Applications should not connect to it, but may emit it with
13789 // g_signal_emit_by_name() if they need to control selection
13790 // programmatically.
13791 // The default binding for this signal is Ctrl-Shift-a.
13792 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_unselect_all;
13793 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13794 return signal_connect_data(&this, cast(char*)"unselect-all",
13795 cast(GObject2.Callback)cb, data, null, cf);
13799 struct IconViewClass {
13800 ContainerClass parent_class;
13801 extern (C) void function (IconView* icon_view, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
13802 // <path>: The #GtkTreePath to be activated
13803 extern (C) void function (IconView* icon_view, TreePath* path) item_activated;
13804 extern (C) void function (IconView* icon_view) selection_changed;
13805 extern (C) void function (IconView* icon_view) select_all;
13806 extern (C) void function (IconView* icon_view) unselect_all;
13807 extern (C) void function (IconView* icon_view) select_cursor_item;
13808 extern (C) void function (IconView* icon_view) toggle_cursor_item;
13809 extern (C) int function (IconView* icon_view, MovementStep step, int count) move_cursor;
13810 extern (C) int function (IconView* icon_view) activate_cursor_item;
13813 enum IconViewDropPosition {
13814 NO_DROP = 0,
13815 DROP_INTO = 1,
13816 DROP_LEFT = 2,
13817 DROP_RIGHT = 3,
13818 DROP_ABOVE = 4,
13819 DROP_BELOW = 5
13821 extern (C) alias void function (IconView* icon_view, TreePath* path, void* data) IconViewForeachFunc;
13823 struct IconViewPrivate {
13827 // The #GtkImage widget displays an image. Various kinds of object
13828 // can be displayed as an image; most typically, you would load a
13829 // #GdkPixbuf ("pixel buffer") from a file, and then display that.
13830 // There's a convenience function to do this, gtk_image_new_from_file(),
13831 // used as follows:
13832 // <informalexample><programlisting>
13833 // GtkWidget *image;
13834 // image = gtk_image_new_from_file ("myfile.png");
13835 // </programlisting></informalexample>
13836 // If the file isn't loaded successfully, the image will contain a
13837 // "broken image" icon similar to that used in many web browsers.
13838 // If you want to handle errors in loading the file yourself,
13839 // for example by displaying an error message, then load the image with
13840 // gdk_pixbuf_new_from_file(), then create the #GtkImage with
13841 // gtk_image_new_from_pixbuf().
13842 // The image file may contain an animation, if so the #GtkImage will
13843 // display an animation (#GdkPixbufAnimation) instead of a static image.
13844 // #GtkImage is a subclass of #GtkMisc, which implies that you can
13845 // align it (center, left, right) and add padding to it, using
13846 // #GtkMisc methods.
13847 // #GtkImage is a "no window" widget (has no #GdkWindow of its own),
13848 // so by default does not receive events. If you want to receive events
13849 // on the image, such as button clicks, place the image inside a
13850 // #GtkEventBox, then connect to the event signals on the event box.
13851 // <example>
13852 // <title>Handling button press events on a
13853 // <structname>GtkImage</structname>.</title>
13854 // <programlisting>
13855 // static gboolean
13856 // button_press_callback (GtkWidget *event_box,
13857 // GdkEventButton *event,
13858 // gpointer data)
13859 // {
13860 // g_print ("Event box clicked at coordinates &percnt;f,&percnt;f\n",
13861 // event->x, event->y);
13862 // /<!---->* Returning TRUE means we handled the event, so the signal
13863 // * emission should be stopped (don't call any further
13864 // * callbacks that may be connected). Return FALSE
13865 // * to continue invoking callbacks.
13866 // *<!---->/
13867 // return TRUE;
13868 // }
13869 // static GtkWidget*
13870 // create_image (void)
13871 // {
13872 // GtkWidget *image;
13873 // GtkWidget *event_box;
13874 // image = gtk_image_new_from_file ("myfile.png");
13875 // event_box = gtk_event_box_new (<!-- -->);
13876 // gtk_container_add (GTK_CONTAINER (event_box), image);
13877 // g_signal_connect (G_OBJECT (event_box),
13878 // "button_press_event",
13879 // G_CALLBACK (button_press_callback),
13880 // image);
13881 // return image;
13882 // }
13883 // </programlisting>
13884 // </example>
13885 // When handling events on the event box, keep in mind that coordinates
13886 // in the image may be different from event box coordinates due to
13887 // the alignment and padding settings on the image (see #GtkMisc).
13888 // The simplest way to solve this is to set the alignment to 0.0
13889 // (left/top), and set the padding to zero. Then the origin of
13890 // the image will be the same as the origin of the event box.
13891 // Sometimes an application will want to avoid depending on external data
13892 // files, such as image files. GTK+ comes with a program to avoid this,
13893 // called <application>gdk-pixbuf-csource</application>. This program
13894 // allows you to convert an image into a C variable declaration, which
13895 // can then be loaded into a #GdkPixbuf using
13896 // gdk_pixbuf_new_from_inline().
13897 struct Image /* : Misc */ {
13898 alias misc this;
13899 alias misc super_;
13900 Misc misc;
13901 ImageType storage_type;
13903 union data {
13904 ImagePixmapData pixmap;
13905 ImageImageData image;
13906 ImagePixbufData pixbuf;
13907 ImageStockData stock;
13908 ImageIconSetData icon_set;
13909 ImageAnimationData anim;
13910 ImageIconNameData name;
13911 ImageGIconData gicon;
13914 Gdk2.Bitmap* mask;
13915 IconSize icon_size;
13918 // Creates a new empty #GtkImage widget.
13919 // RETURNS: a newly created #GtkImage widget.
13920 static Image* new_() {
13921 return gtk_image_new();
13924 // Creates a #GtkImage displaying the given animation.
13925 // The #GtkImage does not assume a reference to the
13926 // animation; you still need to unref it if you own references.
13927 // #GtkImage will add its own reference rather than adopting yours.
13928 // Note that the animation frames are shown using a timeout with
13929 // #G_PRIORITY_DEFAULT. When using animations to indicate busyness,
13930 // keep in mind that the animation will only be shown if the main loop
13931 // is not busy with something that has a higher priority.
13932 // RETURNS: a new #GtkImage widget
13933 // <animation>: an animation
13934 static Image* new_from_animation(GdkPixbuf2.PixbufAnimation* animation) {
13935 return gtk_image_new_from_animation(animation);
13938 // Creates a new #GtkImage displaying the file @filename. If the file
13939 // isn't found or can't be loaded, the resulting #GtkImage will
13940 // display a "broken image" icon. This function never returns %NULL,
13941 // it always returns a valid #GtkImage widget.
13942 // If the file contains an animation, the image will contain an
13943 // animation.
13944 // If you need to detect failures to load the file, use
13945 // gdk_pixbuf_new_from_file() to load the file yourself, then create
13946 // the #GtkImage from the pixbuf. (Or for animations, use
13947 // gdk_pixbuf_animation_new_from_file()).
13948 // The storage type (gtk_image_get_storage_type()) of the returned
13949 // image is not defined, it will be whatever is appropriate for
13950 // displaying the file.
13951 // RETURNS: a new #GtkImage
13952 // <filename>: a filename
13953 static Image* new_from_file(char* filename) {
13954 return gtk_image_new_from_file(filename);
13957 // Creates a #GtkImage displaying an icon from the current icon theme.
13958 // If the icon name isn't known, a "broken image" icon will be
13959 // displayed instead. If the current icon theme is changed, the icon
13960 // will be updated appropriately.
13961 // RETURNS: a new #GtkImage displaying the themed icon
13962 // <icon>: an icon
13963 // <size>: a stock icon size
13964 static Image* new_from_gicon(Gio2.Icon* icon, int size) {
13965 return gtk_image_new_from_gicon(icon, size);
13968 // Creates a #GtkImage displaying an icon from the current icon theme.
13969 // If the icon name isn't known, a "broken image" icon will be
13970 // displayed instead. If the current icon theme is changed, the icon
13971 // will be updated appropriately.
13972 // RETURNS: a new #GtkImage displaying the themed icon
13973 // <icon_name>: an icon name
13974 // <size>: a stock icon size
13975 static Image* new_from_icon_name(char* icon_name, int size) {
13976 return gtk_image_new_from_icon_name(icon_name, size);
13979 // Creates a #GtkImage displaying an icon set. Sample stock sizes are
13980 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_SMALL_TOOLBAR. Instead of using
13981 // this function, usually it's better to create a #GtkIconFactory, put
13982 // your icon sets in the icon factory, add the icon factory to the
13983 // list of default factories with gtk_icon_factory_add_default(), and
13984 // then use gtk_image_new_from_stock(). This will allow themes to
13985 // override the icon you ship with your application.
13986 // The #GtkImage does not assume a reference to the
13987 // icon set; you still need to unref it if you own references.
13988 // #GtkImage will add its own reference rather than adopting yours.
13989 // RETURNS: a new #GtkImage
13990 // <icon_set>: a #GtkIconSet
13991 // <size>: a stock icon size
13992 static Image* new_from_icon_set(IconSet* icon_set, int size) {
13993 return gtk_image_new_from_icon_set(icon_set, size);
13996 // Creates a #GtkImage widget displaying a @image with a @mask.
13997 // A #GdkImage is a client-side image buffer in the pixel format of the
13998 // current display. The #GtkImage does not assume a reference to the
13999 // image or mask; you still need to unref them if you own references.
14000 // #GtkImage will add its own reference rather than adopting yours.
14001 // RETURNS: a new #GtkImage
14002 // <image>: a #GdkImage, or %NULL
14003 // <mask>: a #GdkBitmap, or %NULL
14004 static Image* new_from_image(Gdk2.Image* image=null, Gdk2.Bitmap* mask=null) {
14005 return gtk_image_new_from_image(image, mask);
14008 // Creates a new #GtkImage displaying @pixbuf.
14009 // The #GtkImage does not assume a reference to the
14010 // pixbuf; you still need to unref it if you own references.
14011 // #GtkImage will add its own reference rather than adopting yours.
14012 // Note that this function just creates an #GtkImage from the pixbuf. The
14013 // #GtkImage created will not react to state changes. Should you want that,
14014 // you should use gtk_image_new_from_icon_set().
14015 // RETURNS: a new #GtkImage
14016 // <pixbuf>: a #GdkPixbuf, or %NULL
14017 static Image* new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf=null) {
14018 return gtk_image_new_from_pixbuf(pixbuf);
14021 // Creates a #GtkImage widget displaying @pixmap with a @mask.
14022 // A #GdkPixmap is a server-side image buffer in the pixel format of the
14023 // current display. The #GtkImage does not assume a reference to the
14024 // pixmap or mask; you still need to unref them if you own references.
14025 // #GtkImage will add its own reference rather than adopting yours.
14026 // RETURNS: a new #GtkImage
14027 // <pixmap>: a #GdkPixmap, or %NULL
14028 // <mask>: a #GdkBitmap, or %NULL
14029 static Image* new_from_pixmap(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null) {
14030 return gtk_image_new_from_pixmap(pixmap, mask);
14033 // Creates a #GtkImage displaying a stock icon. Sample stock icon
14034 // names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. Sample stock sizes
14035 // are #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_SMALL_TOOLBAR. If the stock
14036 // icon name isn't known, the image will be empty.
14037 // You can register your own stock icon names, see
14038 // gtk_icon_factory_add_default() and gtk_icon_factory_add().
14039 // RETURNS: a new #GtkImage displaying the stock icon
14040 // <stock_id>: a stock icon name
14041 // <size>: a stock icon size
14042 static Image* new_from_stock(char* stock_id, int size) {
14043 return gtk_image_new_from_stock(stock_id, size);
14045 // Resets the image to be empty.
14046 void clear() {
14047 gtk_image_clear(&this);
14050 // Gets the #GtkImage.
14051 // <val>: return location for a #GdkImage
14052 // <mask>: a #GdkBitmap that indicates which parts of the image should be transparent.
14053 void get(Gdk2.Image** val, Gdk2.Bitmap** mask) {
14054 gtk_image_get(&this, val, mask);
14057 // Gets the #GdkPixbufAnimation being displayed by the #GtkImage.
14058 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14059 // %GTK_IMAGE_ANIMATION (see gtk_image_get_storage_type()).
14060 // The caller of this function does not own a reference to the
14061 // returned animation.
14062 // the image is empty
14063 // RETURNS: the displayed animation, or %NULL if
14064 GdkPixbuf2.PixbufAnimation* get_animation() {
14065 return gtk_image_get_animation(&this);
14068 // Gets the #GIcon and size being displayed by the #GtkImage.
14069 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14070 // %GTK_IMAGE_GICON (see gtk_image_get_storage_type()).
14071 // The caller of this function does not own a reference to the
14072 // returned #GIcon.
14073 // <gicon>: place to store a #GIcon, or %NULL
14074 // <size>: place to store an icon size, or %NULL
14075 void get_gicon(/*out*/ Gio2.Icon** gicon=null, /*out*/ /*POINTER*/ int* size=null) {
14076 gtk_image_get_gicon(&this, gicon, size);
14079 // Gets the icon name and size being displayed by the #GtkImage.
14080 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14081 // %GTK_IMAGE_ICON_NAME (see gtk_image_get_storage_type()).
14082 // The returned string is owned by the #GtkImage and should not
14083 // be freed.
14084 // <icon_name>: place to store an icon name, or %NULL
14085 // <size>: place to store an icon size, or %NULL
14086 void get_icon_name(/*out*/ char** icon_name=null, /*out*/ /*POINTER*/ int* size=null) {
14087 gtk_image_get_icon_name(&this, icon_name, size);
14090 // Gets the icon set and size being displayed by the #GtkImage.
14091 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14092 // %GTK_IMAGE_ICON_SET (see gtk_image_get_storage_type()).
14093 // <icon_set>: location to store a #GtkIconSet, or %NULL
14094 // <size>: location to store a stock icon size, or %NULL
14095 void get_icon_set(/*out*/ IconSet** icon_set=null, /*out*/ /*POINTER*/ int* size=null) {
14096 gtk_image_get_icon_set(&this, icon_set, size);
14099 // Gets the #GdkImage and mask being displayed by the #GtkImage.
14100 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14101 // %GTK_IMAGE_IMAGE (see gtk_image_get_storage_type()).
14102 // The caller of this function does not own a reference to the
14103 // returned image and mask.
14104 // <gdk_image>: return location for a #GtkImage, or %NULL
14105 // <mask>: return location for a #GdkBitmap, or %NULL
14106 void get_image(/*out*/ Gdk2.Image** gdk_image=null, /*out*/ Gdk2.Bitmap** mask=null) {
14107 gtk_image_get_image(&this, gdk_image, mask);
14110 // Gets the #GdkPixbuf being displayed by the #GtkImage.
14111 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14112 // %GTK_IMAGE_PIXBUF (see gtk_image_get_storage_type()).
14113 // The caller of this function does not own a reference to the
14114 // returned pixbuf.
14115 // the image is empty
14116 // RETURNS: the displayed pixbuf, or %NULL if
14117 GdkPixbuf2.Pixbuf* get_pixbuf() {
14118 return gtk_image_get_pixbuf(&this);
14121 // Gets the pixel size used for named icons.
14122 // RETURNS: the pixel size used for named icons.
14123 int get_pixel_size() {
14124 return gtk_image_get_pixel_size(&this);
14127 // Gets the pixmap and mask being displayed by the #GtkImage.
14128 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14129 // %GTK_IMAGE_PIXMAP (see gtk_image_get_storage_type()).
14130 // The caller of this function does not own a reference to the
14131 // returned pixmap and mask.
14132 // <pixmap>: location to store the pixmap, or %NULL
14133 // <mask>: location to store the mask, or %NULL
14134 void get_pixmap(/*out*/ Gdk2.Pixmap** pixmap=null, /*out*/ Gdk2.Bitmap** mask=null) {
14135 gtk_image_get_pixmap(&this, pixmap, mask);
14138 // Gets the stock icon name and size being displayed by the #GtkImage.
14139 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14140 // %GTK_IMAGE_STOCK (see gtk_image_get_storage_type()).
14141 // The returned string is owned by the #GtkImage and should not
14142 // be freed.
14143 // <stock_id>: place to store a stock icon name, or %NULL
14144 // <size>: place to store a stock icon size, or %NULL
14145 void get_stock(/*out*/ char** stock_id=null, /*out*/ /*POINTER*/ int* size=null) {
14146 gtk_image_get_stock(&this, stock_id, size);
14149 // Gets the type of representation being used by the #GtkImage
14150 // to store image data. If the #GtkImage has no image data,
14151 // the return value will be %GTK_IMAGE_EMPTY.
14152 // RETURNS: image representation being used
14153 ImageType get_storage_type() {
14154 return gtk_image_get_storage_type(&this);
14157 // Sets the #GtkImage.
14158 // <val>: a #GdkImage
14159 // <mask>: a #GdkBitmap that indicates which parts of the image should be transparent.
14160 void set(Gdk2.Image* val, Gdk2.Bitmap* mask) {
14161 gtk_image_set(&this, val, mask);
14164 // Causes the #GtkImage to display the given animation (or display
14165 // nothing, if you set the animation to %NULL).
14166 // <animation>: the #GdkPixbufAnimation
14167 void set_from_animation(GdkPixbuf2.PixbufAnimation* animation) {
14168 gtk_image_set_from_animation(&this, animation);
14171 // See gtk_image_new_from_file() for details.
14172 // <filename>: a filename or %NULL
14173 void set_from_file(char* filename=null) {
14174 gtk_image_set_from_file(&this, filename);
14177 // See gtk_image_new_from_gicon() for details.
14178 // <icon>: an icon
14179 // <size>: an icon size
14180 void set_from_gicon(Gio2.Icon* icon, int size) {
14181 gtk_image_set_from_gicon(&this, icon, size);
14184 // See gtk_image_new_from_icon_name() for details.
14185 // <icon_name>: an icon name
14186 // <size>: an icon size
14187 void set_from_icon_name(char* icon_name, int size) {
14188 gtk_image_set_from_icon_name(&this, icon_name, size);
14191 // See gtk_image_new_from_icon_set() for details.
14192 // <icon_set>: a #GtkIconSet
14193 // <size>: a stock icon size
14194 void set_from_icon_set(IconSet* icon_set, int size) {
14195 gtk_image_set_from_icon_set(&this, icon_set, size);
14198 // See gtk_image_new_from_image() for details.
14199 // <gdk_image>: a #GdkImage or %NULL
14200 // <mask>: a #GdkBitmap or %NULL
14201 void set_from_image(Gdk2.Image* gdk_image=null, Gdk2.Bitmap* mask=null) {
14202 gtk_image_set_from_image(&this, gdk_image, mask);
14205 // See gtk_image_new_from_pixbuf() for details.
14206 // <pixbuf>: a #GdkPixbuf or %NULL
14207 void set_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf=null) {
14208 gtk_image_set_from_pixbuf(&this, pixbuf);
14211 // See gtk_image_new_from_pixmap() for details.
14212 // <pixmap>: a #GdkPixmap or %NULL
14213 // <mask>: a #GdkBitmap or %NULL
14214 void set_from_pixmap(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null) {
14215 gtk_image_set_from_pixmap(&this, pixmap, mask);
14218 // See gtk_image_new_from_stock() for details.
14219 // <stock_id>: a stock icon name
14220 // <size>: a stock icon size
14221 void set_from_stock(char* stock_id, int size) {
14222 gtk_image_set_from_stock(&this, stock_id, size);
14225 // Sets the pixel size to use for named icons. If the pixel size is set
14226 // to a value != -1, it is used instead of the icon size set by
14227 // gtk_image_set_from_icon_name().
14228 // <pixel_size>: the new pixel size
14229 void set_pixel_size(int pixel_size) {
14230 gtk_image_set_pixel_size(&this, pixel_size);
14234 struct ImageAnimationData {
14235 GdkPixbuf2.PixbufAnimation* anim;
14236 GdkPixbuf2.PixbufAnimationIter* iter;
14237 uint frame_timeout;
14240 struct ImageClass {
14241 MiscClass parent_class;
14242 extern (C) void function () _gtk_reserved1;
14243 extern (C) void function () _gtk_reserved2;
14244 extern (C) void function () _gtk_reserved3;
14245 extern (C) void function () _gtk_reserved4;
14248 struct ImageGIconData {
14249 Gio2.Icon* icon;
14250 GdkPixbuf2.Pixbuf* pixbuf;
14251 uint theme_change_id;
14254 struct ImageIconNameData {
14255 char* icon_name;
14256 GdkPixbuf2.Pixbuf* pixbuf;
14257 uint theme_change_id;
14260 struct ImageIconSetData {
14261 IconSet* icon_set;
14264 struct ImageImageData {
14265 Gdk2.Image* image;
14268 struct ImageMenuItem /* : MenuItem */ {
14269 alias menu_item this;
14270 alias menu_item super_;
14271 alias menu_item menuitem;
14272 MenuItem menu_item;
14273 private Widget* image;
14276 // Creates a new #GtkImageMenuItem with an empty label.
14277 // RETURNS: a new #GtkImageMenuItem.
14278 static ImageMenuItem* new_() {
14279 return gtk_image_menu_item_new();
14282 // Creates a new #GtkImageMenuItem containing the image and text from a
14283 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
14284 // and #GTK_STOCK_APPLY.
14285 // If you want this menu item to have changeable accelerators, then pass in
14286 // %NULL for accel_group. Next call gtk_menu_item_set_accel_path() with an
14287 // appropriate path for the menu item, use gtk_stock_lookup() to look up the
14288 // standard accelerator for the stock item, and if one is found, call
14289 // gtk_accel_map_add_entry() to register it.
14290 // RETURNS: a new #GtkImageMenuItem.
14291 // <stock_id>: the name of the stock item.
14292 // <accel_group>: the #GtkAccelGroup to add the menu items accelerator to, or %NULL.
14293 static ImageMenuItem* new_from_stock(char* stock_id, AccelGroup* accel_group=null) {
14294 return gtk_image_menu_item_new_from_stock(stock_id, accel_group);
14297 // Creates a new #GtkImageMenuItem containing a label.
14298 // RETURNS: a new #GtkImageMenuItem.
14299 // <label>: the text of the menu item.
14300 static ImageMenuItem* new_with_label(char* label) {
14301 return gtk_image_menu_item_new_with_label(label);
14304 // Creates a new #GtkImageMenuItem containing a label. The label
14305 // will be created using gtk_label_new_with_mnemonic(), so underscores
14306 // in @label indicate the mnemonic for the menu item.
14307 // RETURNS: a new #GtkImageMenuItem
14308 // <label>: the text of the menu item, with an underscore in front of the mnemonic character
14309 static ImageMenuItem* new_with_mnemonic(char* label) {
14310 return gtk_image_menu_item_new_with_mnemonic(label);
14313 // Returns whether the menu item will ignore the #GtkSettings:gtk-menu-images
14314 // setting and always show the image, if available.
14315 // RETURNS: %TRUE if the menu item will always show the image
14316 int get_always_show_image() {
14317 return gtk_image_menu_item_get_always_show_image(&this);
14320 // Gets the widget that is currently set as the image of @image_menu_item.
14321 // See gtk_image_menu_item_set_image().
14322 // RETURNS: the widget set as image of @image_menu_item
14323 Widget* get_image() {
14324 return gtk_image_menu_item_get_image(&this);
14327 // Checks whether the label set in the menuitem is used as a
14328 // stock id to select the stock item for the item.
14329 // stock id to select the stock item for the item
14330 // RETURNS: %TRUE if the label set in the menuitem is used as a
14331 int get_use_stock() {
14332 return gtk_image_menu_item_get_use_stock(&this);
14335 // Specifies an @accel_group to add the menu items accelerator to
14336 // (this only applies to stock items so a stock item must already
14337 // be set, make sure to call gtk_image_menu_item_set_use_stock()
14338 // and gtk_menu_item_set_label() with a valid stock item first).
14339 // If you want this menu item to have changeable accelerators then
14340 // you shouldnt need this (see gtk_image_menu_item_new_from_stock()).
14341 // <accel_group>: the #GtkAccelGroup
14342 void set_accel_group(AccelGroup* accel_group) {
14343 gtk_image_menu_item_set_accel_group(&this, accel_group);
14346 // If %TRUE, the menu item will ignore the #GtkSettings:gtk-menu-images
14347 // setting and always show the image, if available.
14348 // Use this property if the menuitem would be useless or hard to use
14349 // without the image.
14350 // <always_show>: %TRUE if the menuitem should always show the image
14351 void set_always_show_image(int always_show) {
14352 gtk_image_menu_item_set_always_show_image(&this, always_show);
14355 // Sets the image of @image_menu_item to the given widget.
14356 // Note that it depends on the show-menu-images setting whether
14357 // the image will be displayed or not.
14358 // <image>: a widget to set as the image for the menu item.
14359 void set_image(Widget* image=null) {
14360 gtk_image_menu_item_set_image(&this, image);
14363 // If %TRUE, the label set in the menuitem is used as a
14364 // stock id to select the stock item for the item.
14365 // <use_stock>: %TRUE if the menuitem should use a stock item
14366 void set_use_stock(int use_stock) {
14367 gtk_image_menu_item_set_use_stock(&this, use_stock);
14371 struct ImageMenuItemClass {
14372 MenuItemClass parent_class;
14375 struct ImagePixbufData {
14376 GdkPixbuf2.Pixbuf* pixbuf;
14379 struct ImagePixmapData {
14380 Gdk2.Pixmap* pixmap;
14383 struct ImageStockData {
14384 char* stock_id;
14388 // Describes the image data representation used by a #GtkImage. If you
14389 // want to get the image from the widget, you can only get the
14390 // currently-stored representation. e.g. if the
14391 // gtk_image_get_storage_type() returns #GTK_IMAGE_PIXBUF, then you can
14392 // call gtk_image_get_pixbuf() but not gtk_image_get_stock(). For empty
14393 // images, you can request any storage type (call any of the "get"
14394 // functions), but they will all return %NULL values.
14395 enum ImageType {
14396 EMPTY = 0,
14397 PIXMAP = 1,
14398 IMAGE = 2,
14399 PIXBUF = 3,
14400 STOCK = 4,
14401 ICON_SET = 5,
14402 ANIMATION = 6,
14403 ICON_NAME = 7,
14404 GICON = 8
14407 // #GtkInfoBar is a widget that can be used to show messages to
14408 // the user without showing a dialog. It is often temporarily shown
14409 // at the top or bottom of a document. In contrast to #GtkDialog, which
14410 // has a horizontal action area at the bottom, #GtkInfoBar has a
14411 // vertical action area at the side.
14412 // The API of #GtkInfoBar is very similar to #GtkDialog, allowing you
14413 // to add buttons to the action area with gtk_info_bar_add_button() or
14414 // gtk_info_bar_new_with_buttons(). The sensitivity of action widgets
14415 // can be controlled with gtk_info_bar_set_response_sensitive().
14416 // To add widgets to the main content area of a #GtkInfoBar, use
14417 // gtk_info_bar_get_content_area() and add your widgets to the container.
14418 // Similar to #GtkMessageDialog, the contents of a #GtkInfoBar can by
14419 // classified as error message, warning, informational message, etc,
14420 // by using gtk_info_bar_set_message_type(). GTK+ uses the message type
14421 // to determine the background color of the message area.
14422 // <example>
14423 // <title>Simple GtkInfoBar usage.</title>
14424 // <programlisting>
14425 // /&ast; set up info bar &ast;/
14426 // info_bar = gtk_info_bar_new ();
14427 // gtk_widget_set_no_show_all (info_bar, TRUE);
14428 // message_label = gtk_label_new ("");
14429 // gtk_widget_show (message_label);
14430 // content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
14431 // gtk_container_add (GTK_CONTAINER (content_area), message_label);
14432 // gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
14433 // GTK_STOCK_OK, GTK_RESPONSE_OK);
14434 // g_signal_connect (info_bar, "response",
14435 // G_CALLBACK (gtk_widget_hide), NULL);
14436 // gtk_table_attach (GTK_TABLE (table),
14437 // info_bar,
14438 // 0, 1, 2, 3,
14439 // GTK_EXPAND | GTK_FILL, 0,
14440 // 0, 0);
14441 // /&ast; ... &ast;/
14442 // /&ast; show an error message &ast;/
14443 // gtk_label_set_text (GTK_LABEL (message_label), error_message);
14444 // gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
14445 // GTK_MESSAGE_ERROR);
14446 // gtk_widget_show (info_bar);
14447 // </programlisting>
14448 // </example>
14449 // <refsect2 id="GtkInfoBar-BUILDER-UI">
14450 // <title>GtkInfoBar as GtkBuildable</title>
14451 // <para>
14452 // The GtkInfoBar implementation of the GtkBuildable interface exposes
14453 // the content area and action area as internal children with the names
14454 // "content_area" and "action_area".
14455 // </para>
14456 // <para>
14457 // GtkInfoBar supports a custom &lt;action-widgets&gt; element, which
14458 // can contain multiple &lt;action-widget&gt; elements. The "response"
14459 // attribute specifies a numeric response, and the content of the element
14460 // is the id of widget (which should be a child of the dialogs @action_area).
14461 // </para>
14462 // </refsect2>
14463 struct InfoBar /* : HBox */ {
14464 alias parent this;
14465 alias parent super_;
14466 alias parent hbox;
14467 HBox parent;
14468 private InfoBarPrivate* priv;
14471 // Creates a new #GtkInfoBar object.
14472 // RETURNS: a new #GtkInfoBar object
14473 static InfoBar* new_() {
14474 return gtk_info_bar_new();
14477 // Unintrospectable constructor: new_with_buttons() / gtk_info_bar_new_with_buttons()
14478 // Creates a new #GtkInfoBar with buttons. Button text/response ID
14479 // pairs should be listed, with a %NULL pointer ending the list.
14480 // Button text can be either a stock ID such as %GTK_STOCK_OK, or
14481 // some arbitrary text. A response ID can be any positive number,
14482 // or one of the values in the #GtkResponseType enumeration. If the
14483 // user clicks one of these dialog buttons, GtkInfoBar will emit
14484 // the "response" signal with the corresponding response ID.
14485 // RETURNS: a new #GtkInfoBar
14486 // <first_button_text>: stock ID or text to go in first button, or %NULL
14487 alias gtk_info_bar_new_with_buttons new_with_buttons; // Variadic
14489 // Add an activatable widget to the action area of a #GtkInfoBar,
14490 // connecting a signal handler that will emit the #GtkInfoBar::response
14491 // signal on the message area when the widget is activated. The widget
14492 // is appended to the end of the message areas action area.
14493 // <child>: an activatable widget
14494 // <response_id>: response ID for @child
14495 void add_action_widget(Widget* child, int response_id) {
14496 gtk_info_bar_add_action_widget(&this, child, response_id);
14499 // Adds a button with the given text (or a stock button, if button_text
14500 // is a stock ID) and sets things up so that clicking the button will emit
14501 // the "response" signal with the given response_id. The button is appended
14502 // to the end of the info bars's action area. The button widget is
14503 // returned, but usually you don't need it.
14504 // RETURNS: the button widget that was added
14505 // <button_text>: text of button, or stock ID
14506 // <response_id>: response ID for the button
14507 Widget* add_button(char* button_text, int response_id) {
14508 return gtk_info_bar_add_button(&this, button_text, response_id);
14511 // Unintrospectable method: add_buttons() / gtk_info_bar_add_buttons()
14512 // Adds more buttons, same as calling gtk_info_bar_add_button()
14513 // repeatedly. The variable argument list should be %NULL-terminated
14514 // as with gtk_info_bar_new_with_buttons(). Each button must have both
14515 // text and response ID.
14516 // <first_button_text>: button text or stock ID
14517 /+ Not available -- variadic methods unsupported - use the C function directly.
14518 alias gtk_info_bar_add_buttons add_buttons; // Variadic
14521 // Returns the action area of @info_bar.
14522 // RETURNS: the action area
14523 Widget* get_action_area() {
14524 return gtk_info_bar_get_action_area(&this);
14527 // Returns the content area of @info_bar.
14528 // RETURNS: the content area
14529 Widget* get_content_area() {
14530 return gtk_info_bar_get_content_area(&this);
14533 // Returns the message type of the message area.
14534 // RETURNS: the message type of the message area.
14535 MessageType get_message_type() {
14536 return gtk_info_bar_get_message_type(&this);
14539 // Emits the 'response' signal with the given @response_id.
14540 // <response_id>: a response ID
14541 void response(int response_id) {
14542 gtk_info_bar_response(&this, response_id);
14545 // Sets the last widget in the info bar's action area with
14546 // the given response_id as the default widget for the dialog.
14547 // Pressing "Enter" normally activates the default widget.
14548 // Note that this function currently requires @info_bar to
14549 // be added to a widget hierarchy.
14550 // <response_id>: a response ID
14551 void set_default_response(int response_id) {
14552 gtk_info_bar_set_default_response(&this, response_id);
14555 // Sets the message type of the message area.
14556 // GTK+ uses this type to determine what color to use
14557 // when drawing the message area.
14558 // <message_type>: a #GtkMessageType
14559 void set_message_type(MessageType message_type) {
14560 gtk_info_bar_set_message_type(&this, message_type);
14563 // Calls gtk_widget_set_sensitive (widget, setting) for each
14564 // widget in the info bars's action area with the given response_id.
14565 // A convenient way to sensitize/desensitize dialog buttons.
14566 // <response_id>: a response ID
14567 // <setting>: TRUE for sensitive
14568 void set_response_sensitive(int response_id, int setting) {
14569 gtk_info_bar_set_response_sensitive(&this, response_id, setting);
14572 // The ::close signal is a
14573 // <link linkend="keybinding-signals">keybinding signal</link>
14574 // which gets emitted when the user uses a keybinding to dismiss
14575 // the info bar.
14576 // The default binding for this signal is the Escape key.
14577 extern (C) alias static void function (InfoBar* this_, void* user_data=null) signal_close;
14579 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14580 return super_.signal_connect!name(cb, data, cf);
14583 ulong signal_connect(string name:"close", CB/*:signal_close*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14584 return signal_connect_data(&this, cast(char*)"close",
14585 cast(GObject2.Callback)cb, data, null, cf);
14588 // Emitted when an action widget is clicked or the application programmer
14589 // calls gtk_dialog_response(). The @response_id depends on which action
14590 // widget was clicked.
14591 // <response_id>: the response ID
14592 extern (C) alias static void function (InfoBar* this_, int response_id, void* user_data=null) signal_response;
14593 ulong signal_connect(string name:"response", CB/*:signal_response*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14594 return signal_connect_data(&this, cast(char*)"response",
14595 cast(GObject2.Callback)cb, data, null, cf);
14599 struct InfoBarClass {
14600 HBoxClass parent_class;
14601 // <response_id>: a response ID
14602 extern (C) void function (InfoBar* info_bar, int response_id) response;
14603 extern (C) void function (InfoBar* info_bar) close;
14604 extern (C) void function () _gtk_reserved1;
14605 extern (C) void function () _gtk_reserved2;
14606 extern (C) void function () _gtk_reserved3;
14607 extern (C) void function () _gtk_reserved4;
14608 extern (C) void function () _gtk_reserved5;
14609 extern (C) void function () _gtk_reserved6;
14612 struct InfoBarPrivate {
14615 struct InputDialog /* : Dialog */ {
14616 alias dialog this;
14617 alias dialog super_;
14618 Dialog dialog;
14619 Widget* axis_list, axis_listbox, mode_optionmenu, close_button, save_button;
14620 Widget*[666] axis_items;
14621 Gdk2.Device* current_device;
14622 Widget* keys_list, keys_listbox;
14624 static InputDialog* new_() {
14625 return gtk_input_dialog_new();
14627 extern (C) alias static void function (InputDialog* this_, Gdk2.Device* object, void* user_data=null) signal_disable_device;
14629 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14630 return super_.signal_connect!name(cb, data, cf);
14633 ulong signal_connect(string name:"disable-device", CB/*:signal_disable_device*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14634 return signal_connect_data(&this, cast(char*)"disable-device",
14635 cast(GObject2.Callback)cb, data, null, cf);
14637 extern (C) alias static void function (InputDialog* this_, Gdk2.Device* object, void* user_data=null) signal_enable_device;
14638 ulong signal_connect(string name:"enable-device", CB/*:signal_enable_device*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14639 return signal_connect_data(&this, cast(char*)"enable-device",
14640 cast(GObject2.Callback)cb, data, null, cf);
14644 struct InputDialogClass {
14645 DialogClass parent_class;
14646 extern (C) void function (InputDialog* inputd, Gdk2.Device* device) enable_device;
14647 extern (C) void function (InputDialog* inputd, Gdk2.Device* device) disable_device;
14648 extern (C) void function () _gtk_reserved1;
14649 extern (C) void function () _gtk_reserved2;
14650 extern (C) void function () _gtk_reserved3;
14651 extern (C) void function () _gtk_reserved4;
14654 struct Invisible /* : Widget */ {
14655 alias widget this;
14656 alias widget super_;
14657 Widget widget;
14658 int has_user_ref_count;
14659 Gdk2.Screen* screen;
14662 // Creates a new #GtkInvisible.
14663 // RETURNS: a new #GtkInvisible.
14664 static Invisible* new_() {
14665 return gtk_invisible_new();
14668 // Creates a new #GtkInvisible object for a specified screen
14669 // RETURNS: a newly created #GtkInvisible object
14670 // <screen>: a #GdkScreen which identifies on which the new #GtkInvisible will be created.
14671 static Invisible* new_for_screen(Gdk2.Screen* screen) {
14672 return gtk_invisible_new_for_screen(screen);
14675 // Returns the #GdkScreen object associated with @invisible
14676 // RETURNS: the associated #GdkScreen.
14677 Gdk2.Screen* get_screen() {
14678 return gtk_invisible_get_screen(&this);
14681 // Sets the #GdkScreen where the #GtkInvisible object will be displayed.
14682 // <screen>: a #GdkScreen.
14683 void set_screen(Gdk2.Screen* screen) {
14684 gtk_invisible_set_screen(&this, screen);
14688 struct InvisibleClass {
14689 WidgetClass parent_class;
14690 extern (C) void function () _gtk_reserved1;
14691 extern (C) void function () _gtk_reserved2;
14692 extern (C) void function () _gtk_reserved3;
14693 extern (C) void function () _gtk_reserved4;
14696 struct Item /* : Bin */ {
14697 alias bin this;
14698 alias bin super_;
14699 Bin bin;
14702 // Deletes all widgets constructed from the specified path.
14703 // <ifactory_path>: a factory path to prepend to @path. May be %NULL if @path starts with a factory path
14704 // <path>: a path
14705 static void factories_path_delete(char* ifactory_path, char* path) {
14706 gtk_item_factories_path_delete(ifactory_path, path);
14708 void deselect() {
14709 gtk_item_deselect(&this);
14711 void select() {
14712 gtk_item_select(&this);
14714 void toggle() {
14715 gtk_item_toggle(&this);
14717 extern (C) alias static void function (Item* this_, void* user_data=null) signal_deselect;
14719 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14720 return super_.signal_connect!name(cb, data, cf);
14723 ulong signal_connect(string name:"deselect", CB/*:signal_deselect*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14724 return signal_connect_data(&this, cast(char*)"deselect",
14725 cast(GObject2.Callback)cb, data, null, cf);
14727 extern (C) alias static void function (Item* this_, void* user_data=null) signal_select;
14728 ulong signal_connect(string name:"select", CB/*:signal_select*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14729 return signal_connect_data(&this, cast(char*)"select",
14730 cast(GObject2.Callback)cb, data, null, cf);
14732 extern (C) alias static void function (Item* this_, void* user_data=null) signal_toggle;
14733 ulong signal_connect(string name:"toggle", CB/*:signal_toggle*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14734 return signal_connect_data(&this, cast(char*)"toggle",
14735 cast(GObject2.Callback)cb, data, null, cf);
14739 struct ItemClass {
14740 BinClass parent_class;
14741 extern (C) void function (Item* item) select;
14742 extern (C) void function (Item* item) deselect;
14743 extern (C) void function (Item* item) toggle;
14744 extern (C) void function () _gtk_reserved1;
14745 extern (C) void function () _gtk_reserved2;
14746 extern (C) void function () _gtk_reserved3;
14747 extern (C) void function () _gtk_reserved4;
14750 struct ItemFactory /* : Object */ {
14751 alias object this;
14752 alias object super_;
14753 Object object;
14754 char* path;
14755 AccelGroup* accel_group;
14756 Widget* widget;
14757 GLib2.SList* items;
14758 TranslateFunc translate_func;
14759 void* translate_data;
14760 GLib2.DestroyNotify translate_notify;
14763 // Creates a new #GtkItemFactory.
14764 // Beware that the returned object does not have a floating reference.
14765 // RETURNS: a new #GtkItemFactory
14766 // <container_type>: the kind of menu to create; can be #GTK_TYPE_MENU_BAR, #GTK_TYPE_MENU or #GTK_TYPE_OPTION_MENU
14767 // <path>: the factory path of the new item factory, a string of the form <literal>"&lt;name&gt;"</literal>
14768 // <accel_group>: a #GtkAccelGroup to which the accelerators for the menu items will be added, or %NULL to create a new one
14769 static ItemFactory* new_(Type container_type, char* path, AccelGroup* accel_group=null) {
14770 return gtk_item_factory_new(container_type, path, accel_group);
14773 // Installs an accelerator for @accel_widget in @accel_group, that causes
14774 // the ::activate signal to be emitted if the accelerator is activated.
14775 // This function can be used to make widgets participate in the accel
14776 // saving/restoring functionality provided by gtk_accel_map_save() and
14777 // gtk_accel_map_load(), even if they haven't been created by an item
14778 // factory.
14779 // gtk_menu_item_set_accel_path() and gtk_widget_set_accel_path(); don't
14780 // use gtk_item_factory_add_foreign() in new code, since it is likely to
14781 // be removed in the future.
14782 // <accel_widget>: widget to install an accelerator on
14783 // <accel_group>: the accelerator group to install the accelerator in
14784 // <keyval>: key value of the accelerator
14785 // <modifiers>: modifier combination of the accelerator
14786 static void add_foreign(Widget* accel_widget, char* full_path, AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifiers) {
14787 gtk_item_factory_add_foreign(accel_widget, full_path, accel_group, keyval, modifiers);
14790 // Creates the menu items from the @entries.
14791 // <n_entries>: the length of @entries
14792 // <entries>: an array of #GtkMenuEntry<!-- -->s
14793 static void create_menu_entries(uint n_entries, MenuEntry* entries) {
14794 gtk_item_factory_create_menu_entries(n_entries, entries);
14797 // Unintrospectable function: from_path() / gtk_item_factory_from_path()
14798 // Finds an item factory which has been constructed using the
14799 // <literal>"&lt;name&gt;"</literal> prefix of @path as the @path argument
14800 // for gtk_item_factory_new().
14801 // RETURNS: the #GtkItemFactory created for the given factory path, or %NULL
14802 // <path>: a string starting with a factory path of the form <literal>"&lt;name&gt;"</literal>
14803 static ItemFactory* from_path(char* path) {
14804 return gtk_item_factory_from_path(path);
14807 // Unintrospectable function: from_widget() / gtk_item_factory_from_widget()
14808 // Obtains the item factory from which a widget was created.
14809 // RETURNS: the item factory from which @widget was created, or %NULL
14810 // <widget>: a widget
14811 static ItemFactory* from_widget(Widget* widget) {
14812 return gtk_item_factory_from_widget(widget);
14815 // If @widget has been created by an item factory, returns the full path
14816 // to it. (The full path of a widget is the concatenation of the factory
14817 // path specified in gtk_item_factory_new() with the path specified in the
14818 // #GtkItemFactoryEntry from which the widget was created.)
14819 // RETURNS: the full path to @widget if it has been created by an item factory, %NULL otherwise. This value is owned by GTK+ and must not be modified or freed.
14820 // <widget>: a widget
14821 static char* path_from_widget(Widget* widget) {
14822 return gtk_item_factory_path_from_widget(widget);
14825 // Unintrospectable function: popup_data_from_widget() / gtk_item_factory_popup_data_from_widget()
14826 // Obtains the @popup_data which was passed to
14827 // gtk_item_factory_popup_with_data(). This data is available until the menu
14828 // is popped down again.
14829 // RETURNS: @popup_data associated with the item factory from which @widget was created, or %NULL if @widget wasn't created by an item factory
14830 // <widget>: a widget
14831 static void* popup_data_from_widget(Widget* widget) {
14832 return gtk_item_factory_popup_data_from_widget(widget);
14835 // Initializes an item factory.
14836 // <container_type>: the kind of menu to create; can be #GTK_TYPE_MENU_BAR, #GTK_TYPE_MENU or #GTK_TYPE_OPTION_MENU
14837 // <path>: the factory path of @ifactory, a string of the form <literal>"&lt;name&gt;"</literal>
14838 // <accel_group>: a #GtkAccelGroup to which the accelerators for the menu items will be added, or %NULL to create a new one
14839 void construct(Type container_type, char* path, AccelGroup* accel_group) {
14840 gtk_item_factory_construct(&this, container_type, path, accel_group);
14843 // Creates an item for @entry.
14844 // <entry>: the #GtkItemFactoryEntry to create an item for
14845 // <callback_data>: data passed to the callback function of @entry
14846 // <callback_type>: 1 if the callback function of @entry is of type #GtkItemFactoryCallback1, 2 if it is of type #GtkItemFactoryCallback2
14847 void create_item(ItemFactoryEntry* entry, void* callback_data, uint callback_type) {
14848 gtk_item_factory_create_item(&this, entry, callback_data, callback_type);
14851 // Creates the menu items from the @entries.
14852 // <n_entries>: the length of @entries
14853 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s whose @callback members must by of type #GtkItemFactoryCallback1
14854 // <callback_data>: data passed to the callback functions of all entries
14855 void create_items(uint n_entries, ItemFactoryEntry* entries, void* callback_data) {
14856 gtk_item_factory_create_items(&this, n_entries, entries, callback_data);
14859 // Creates the menu items from the @entries.
14860 // <n_entries>: the length of @entries
14861 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s
14862 // <callback_data>: data passed to the callback functions of all entries
14863 // <callback_type>: 1 if the callback functions in @entries are of type #GtkItemFactoryCallback1, 2 if they are of type #GtkItemFactoryCallback2
14864 void create_items_ac(uint n_entries, ItemFactoryEntry* entries, void* callback_data, uint callback_type) {
14865 gtk_item_factory_create_items_ac(&this, n_entries, entries, callback_data, callback_type);
14868 // Deletes the menu items which were created from the @entries by the given
14869 // item factory.
14870 // <n_entries>: the length of @entries
14871 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s
14872 void delete_entries(uint n_entries, ItemFactoryEntry* entries) {
14873 gtk_item_factory_delete_entries(&this, n_entries, entries);
14876 // Deletes the menu item which was created from @entry by the given
14877 // item factory.
14878 // <entry>: a #GtkItemFactoryEntry
14879 void delete_entry(ItemFactoryEntry* entry) {
14880 gtk_item_factory_delete_entry(&this, entry);
14883 // Deletes the menu item which was created for @path by the given
14884 // item factory.
14885 // <path>: a path
14886 void delete_item(char* path) {
14887 gtk_item_factory_delete_item(&this, path);
14890 // Unintrospectable method: get_item() / gtk_item_factory_get_item()
14891 // Obtains the menu item which corresponds to @path.
14892 // If the widget corresponding to @path is a menu item which opens a
14893 // submenu, then the item is returned. If you are interested in the submenu,
14894 // use gtk_item_factory_get_widget() instead.
14895 // RETURNS: the menu item for the given path, or %NULL if @path doesn't lead to a menu item
14896 // <path>: the path to the menu item
14897 Widget* get_item(char* path) {
14898 return gtk_item_factory_get_item(&this, path);
14901 // Unintrospectable method: get_item_by_action() / gtk_item_factory_get_item_by_action()
14902 // Obtains the menu item which was constructed from the first
14903 // #GtkItemFactoryEntry with the given @action.
14904 // RETURNS: the menu item which corresponds to the given action, or %NULL if no menu item was found
14905 // <action>: an action as specified in the @callback_action field of #GtkItemFactoryEntry
14906 Widget* get_item_by_action(uint action) {
14907 return gtk_item_factory_get_item_by_action(&this, action);
14910 // Unintrospectable method: get_widget() / gtk_item_factory_get_widget()
14911 // Obtains the widget which corresponds to @path.
14912 // If the widget corresponding to @path is a menu item which opens a
14913 // submenu, then the submenu is returned. If you are interested in the menu
14914 // item, use gtk_item_factory_get_item() instead.
14915 // RETURNS: the widget for the given path, or %NULL if @path doesn't lead to a widget
14916 // <path>: the path to the widget
14917 Widget* get_widget(char* path) {
14918 return gtk_item_factory_get_widget(&this, path);
14921 // Unintrospectable method: get_widget_by_action() / gtk_item_factory_get_widget_by_action()
14922 // Obtains the widget which was constructed from the #GtkItemFactoryEntry
14923 // with the given @action.
14924 // If there are multiple items with the same action, the result is
14925 // undefined.
14926 // RETURNS: the widget which corresponds to the given action, or %NULL if no widget was found
14927 // <action>: an action as specified in the @callback_action field of #GtkItemFactoryEntry
14928 Widget* get_widget_by_action(uint action) {
14929 return gtk_item_factory_get_widget_by_action(&this, action);
14932 // Pops up the menu constructed from the item factory at (@x, @y).
14933 // The @mouse_button parameter should be the mouse button pressed to initiate
14934 // the menu popup. If the menu popup was initiated by something other than
14935 // a mouse button press, such as a mouse button release or a keypress,
14936 // The @time_ parameter should be the time stamp of the event that
14937 // initiated the popup. If such an event is not available, use
14938 // gtk_get_current_event_time() instead.
14939 // The operation of the @mouse_button and the @time_ parameter is the same
14940 // as the @button and @activation_time parameters for gtk_menu_popup().
14941 // <x>: the x position
14942 // <y>: the y position
14943 // <mouse_button>: the mouse button which was pressed to initiate the popup
14944 // <time_>: the time at which the activation event occurred
14945 void popup(uint x, uint y, uint mouse_button, uint time_) {
14946 gtk_item_factory_popup(&this, x, y, mouse_button, time_);
14949 // Unintrospectable method: popup_data() / gtk_item_factory_popup_data()
14950 // Obtains the @popup_data which was passed to
14951 // gtk_item_factory_popup_with_data(). This data is available until the menu
14952 // is popped down again.
14953 // RETURNS: @popup_data associated with @ifactory
14954 void* popup_data() {
14955 return gtk_item_factory_popup_data(&this);
14958 // Pops up the menu constructed from the item factory at (@x, @y). Callbacks
14959 // can access the @popup_data while the menu is posted via
14960 // gtk_item_factory_popup_data() and gtk_item_factory_popup_data_from_widget().
14961 // The @mouse_button parameter should be the mouse button pressed to initiate
14962 // the menu popup. If the menu popup was initiated by something other than
14963 // a mouse button press, such as a mouse button release or a keypress,
14964 // The @time_ parameter should be the time stamp of the event that
14965 // initiated the popup. If such an event is not available, use
14966 // gtk_get_current_event_time() instead.
14967 // The operation of the @mouse_button and the @time_ parameters is the same
14968 // as the @button and @activation_time parameters for gtk_menu_popup().
14969 // <popup_data>: data available for callbacks while the menu is posted
14970 // <destroy>: a #GDestroyNotify function to be called on @popup_data when the menu is unposted
14971 // <x>: the x position
14972 // <y>: the y position
14973 // <mouse_button>: the mouse button which was pressed to initiate the popup
14974 // <time_>: the time at which the activation event occurred
14975 void popup_with_data(void* popup_data, GLib2.DestroyNotify destroy, uint x, uint y, uint mouse_button, uint time_) {
14976 gtk_item_factory_popup_with_data(&this, popup_data, destroy, x, y, mouse_button, time_);
14979 // Sets a function to be used for translating the path elements before they
14980 // are displayed.
14981 // <func>: the #GtkTranslateFunc function to be used to translate path elements
14982 // <data>: data to pass to @func and @notify
14983 // <notify>: a #GDestroyNotify function to be called when @ifactory is destroyed and when the translation function is changed again
14984 void set_translate_func(TranslateFunc func, void* data, GLib2.DestroyNotify notify) {
14985 gtk_item_factory_set_translate_func(&this, func, data, notify);
14989 extern (C) alias void function () ItemFactoryCallback;
14991 extern (C) alias void function (void* callback_data, uint callback_action, Widget* widget) ItemFactoryCallback1;
14993 extern (C) alias void function (Widget* widget, void* callback_data, uint callback_action) ItemFactoryCallback2;
14995 struct ItemFactoryClass {
14996 ObjectClass object_class;
14997 GLib2.HashTable* item_ht;
14998 extern (C) void function () _gtk_reserved1;
14999 extern (C) void function () _gtk_reserved2;
15000 extern (C) void function () _gtk_reserved3;
15001 extern (C) void function () _gtk_reserved4;
15004 struct ItemFactoryEntry {
15005 char* path, accelerator;
15006 ItemFactoryCallback callback;
15007 uint callback_action;
15008 char* item_type;
15009 const(void)* extra_data;
15012 struct ItemFactoryItem {
15013 char* path;
15014 GLib2.SList* widgets;
15017 enum Justification {
15018 LEFT = 0,
15019 RIGHT = 1,
15020 CENTER = 2,
15021 FILL = 3
15023 extern (C) alias int function (Widget* grab_widget, Gdk2.EventKey* event, void* func_data) KeySnoopFunc;
15025 struct Label /* : Misc */ {
15026 alias misc this;
15027 alias misc super_;
15028 Misc misc;
15029 private char* label;
15030 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
15031 uint, "jtype", 2,
15032 uint, "wrap", 1,
15033 uint, "use_underline", 1,
15034 uint, "use_markup", 1,
15035 uint, "ellipsize", 3,
15036 uint, "single_line_mode", 1,
15037 uint, "have_transform", 1,
15038 uint, "in_click", 1,
15039 uint, "wrap_mode", 3,
15040 uint, "pattern_set", 1,
15041 uint, "track_links", 1,
15042 uint, "__dummy32A", 16));
15043 private uint mnemonic_keyval;
15044 private char* text;
15045 private Pango.AttrList* attrs, effective_attrs;
15046 private Pango.Layout* layout;
15047 private Widget* mnemonic_widget;
15048 private Window* mnemonic_window;
15049 private LabelSelectionInfo* select_info;
15052 // Creates a new label with the given text inside it. You can
15053 // pass %NULL to get an empty label widget.
15054 // RETURNS: the new #GtkLabel
15055 // <str>: The text of the label
15056 static Label* new_(char* str) {
15057 return gtk_label_new(str);
15060 // Creates a new #GtkLabel, containing the text in @str.
15061 // If characters in @str are preceded by an underscore, they are
15062 // underlined. If you need a literal underscore character in a label, use
15063 // '__' (two underscores). The first underlined character represents a
15064 // keyboard accelerator called a mnemonic. The mnemonic key can be used
15065 // to activate another widget, chosen automatically, or explicitly using
15066 // gtk_label_set_mnemonic_widget().
15067 // If gtk_label_set_mnemonic_widget() is not called, then the first
15068 // activatable ancestor of the #GtkLabel will be chosen as the mnemonic
15069 // widget. For instance, if the label is inside a button or menu item,
15070 // the button or menu item will automatically become the mnemonic widget
15071 // and be activated by the mnemonic.
15072 // RETURNS: the new #GtkLabel
15073 // <str>: The text of the label, with an underscore in front of the mnemonic character
15074 static Label* new_with_mnemonic(char* str) {
15075 return gtk_label_new_with_mnemonic(str);
15077 void get(char** str) {
15078 gtk_label_get(&this, str);
15081 // Gets the angle of rotation for the label. See
15082 // gtk_label_set_angle().
15083 // RETURNS: the angle of rotation for the label
15084 double get_angle() {
15085 return gtk_label_get_angle(&this);
15088 // Gets the attribute list that was set on the label using
15089 // gtk_label_set_attributes(), if any. This function does
15090 // not reflect attributes that come from the labels markup
15091 // (see gtk_label_set_markup()). If you want to get the
15092 // effective attributes for the label, use
15093 // pango_layout_get_attribute (gtk_label_get_layout (label)).
15094 // if none was set.
15095 // RETURNS: the attribute list, or %NULL
15096 Pango.AttrList* get_attributes() {
15097 return gtk_label_get_attributes(&this);
15100 // Returns the URI for the currently active link in the label.
15101 // The active link is the one under the mouse pointer or, in a
15102 // selectable label, the link in which the text cursor is currently
15103 // positioned.
15104 // This function is intended for use in a #GtkLabel::activate-link handler
15105 // or for use in a #GtkWidget::query-tooltip handler.
15106 // not be freed or modified.
15107 // RETURNS: the currently active URI. The string is owned by GTK+ and must
15108 char* get_current_uri() {
15109 return gtk_label_get_current_uri(&this);
15112 // Returns the ellipsizing position of the label. See gtk_label_set_ellipsize().
15113 // RETURNS: #PangoEllipsizeMode
15114 Pango.EllipsizeMode get_ellipsize() {
15115 return gtk_label_get_ellipsize(&this);
15118 // Returns the justification of the label. See gtk_label_set_justify().
15119 // RETURNS: #GtkJustification
15120 Justification get_justify() {
15121 return gtk_label_get_justify(&this);
15124 // Fetches the text from a label widget including any embedded
15125 // underlines indicating mnemonics and Pango markup. (See
15126 // gtk_label_get_text()).
15127 // owned by the widget and must not be modified or freed.
15128 // RETURNS: the text of the label widget. This string is
15129 char* get_label() {
15130 return gtk_label_get_label(&this);
15133 // Gets the #PangoLayout used to display the label.
15134 // The layout is useful to e.g. convert text positions to
15135 // pixel positions, in combination with gtk_label_get_layout_offsets().
15136 // The returned layout is owned by the label so need not be
15137 // freed by the caller.
15138 // RETURNS: the #PangoLayout for this label
15139 Pango.Layout* get_layout() {
15140 return gtk_label_get_layout(&this);
15143 // Obtains the coordinates where the label will draw the #PangoLayout
15144 // representing the text in the label; useful to convert mouse events
15145 // into coordinates inside the #PangoLayout, e.g. to take some action
15146 // if some part of the label is clicked. Of course you will need to
15147 // create a #GtkEventBox to receive the events, and pack the label
15148 // inside it, since labels are a #GTK_NO_WINDOW widget. Remember
15149 // when using the #PangoLayout functions you need to convert to
15150 // and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
15151 // <x>: location to store X offset of layout, or %NULL
15152 // <y>: location to store Y offset of layout, or %NULL
15153 void get_layout_offsets(/*out*/ int* x=null, /*out*/ int* y=null) {
15154 gtk_label_get_layout_offsets(&this, x, y);
15157 // Returns whether lines in the label are automatically wrapped.
15158 // See gtk_label_set_line_wrap().
15159 // RETURNS: %TRUE if the lines of the label are automatically wrapped.
15160 int get_line_wrap() {
15161 return gtk_label_get_line_wrap(&this);
15164 // Returns line wrap mode used by the label. See gtk_label_set_line_wrap_mode().
15165 // RETURNS: %TRUE if the lines of the label are automatically wrapped.
15166 Pango.WrapMode get_line_wrap_mode() {
15167 return gtk_label_get_line_wrap_mode(&this);
15170 // Retrieves the desired maximum width of @label, in characters. See
15171 // gtk_label_set_width_chars().
15172 // RETURNS: the maximum width of the label in characters.
15173 int get_max_width_chars() {
15174 return gtk_label_get_max_width_chars(&this);
15177 // If the label has been set so that it has an mnemonic key this function
15178 // returns the keyval used for the mnemonic accelerator. If there is no
15179 // mnemonic set up it returns #GDK_VoidSymbol.
15180 // RETURNS: GDK keyval usable for accelerators, or #GDK_VoidSymbol
15181 uint get_mnemonic_keyval() {
15182 return gtk_label_get_mnemonic_keyval(&this);
15185 // Retrieves the target of the mnemonic (keyboard shortcut) of this
15186 // label. See gtk_label_set_mnemonic_widget().
15187 // or %NULL if none has been set and the default algorithm will be used.
15188 // RETURNS: the target of the label's mnemonic,
15189 Widget* get_mnemonic_widget() {
15190 return gtk_label_get_mnemonic_widget(&this);
15193 // Gets the value set by gtk_label_set_selectable().
15194 // RETURNS: %TRUE if the user can copy text from the label
15195 int get_selectable() {
15196 return gtk_label_get_selectable(&this);
15199 // Gets the selected range of characters in the label, returning %TRUE
15200 // if there's a selection.
15201 // RETURNS: %TRUE if selection is non-empty
15202 // <start>: return location for start of selection, as a character offset
15203 // <end>: return location for end of selection, as a character offset
15204 int get_selection_bounds(/*out*/ int* start, /*out*/ int* end) {
15205 return gtk_label_get_selection_bounds(&this, start, end);
15208 // Returns whether the label is in single line mode.
15209 // RETURNS: %TRUE when the label is in single line mode.
15210 int get_single_line_mode() {
15211 return gtk_label_get_single_line_mode(&this);
15214 // Fetches the text from a label widget, as displayed on the
15215 // screen. This does not include any embedded underlines
15216 // indicating mnemonics or Pango markup. (See gtk_label_get_label())
15217 // string used by the label, and must not be modified.
15218 // RETURNS: the text in the label widget. This is the internal
15219 char* get_text() {
15220 return gtk_label_get_text(&this);
15223 // Returns whether the label is currently keeping track
15224 // of clicked links.
15225 // RETURNS: %TRUE if clicked links are remembered
15226 int get_track_visited_links() {
15227 return gtk_label_get_track_visited_links(&this);
15230 // Returns whether the label's text is interpreted as marked up with
15231 // the <link linkend="PangoMarkupFormat">Pango text markup
15232 // language</link>. See gtk_label_set_use_markup ().
15233 // RETURNS: %TRUE if the label's text will be parsed for markup.
15234 int get_use_markup() {
15235 return gtk_label_get_use_markup(&this);
15238 // Returns whether an embedded underline in the label indicates a
15239 // mnemonic. See gtk_label_set_use_underline().
15240 // the mnemonic accelerator keys.
15241 // RETURNS: %TRUE whether an embedded underline in the label indicates
15242 int get_use_underline() {
15243 return gtk_label_get_use_underline(&this);
15246 // Retrieves the desired width of @label, in characters. See
15247 // gtk_label_set_width_chars().
15248 // RETURNS: the width of the label in characters.
15249 int get_width_chars() {
15250 return gtk_label_get_width_chars(&this);
15252 uint parse_uline(char* string_) {
15253 return gtk_label_parse_uline(&this, string_);
15256 // Selects a range of characters in the label, if the label is selectable.
15257 // See gtk_label_set_selectable(). If the label is not selectable,
15258 // this function has no effect. If @start_offset or
15259 // <start_offset>: start offset (in characters not bytes)
15260 // <end_offset>: end offset (in characters not bytes)
15261 void select_region(int start_offset, int end_offset) {
15262 gtk_label_select_region(&this, start_offset, end_offset);
15265 // Sets the angle of rotation for the label. An angle of 90 reads from
15266 // from bottom to top, an angle of 270, from top to bottom. The angle
15267 // setting for the label is ignored if the label is selectable,
15268 // wrapped, or ellipsized.
15269 // <angle>: the angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise
15270 void set_angle(double angle) {
15271 gtk_label_set_angle(&this, angle);
15274 // Sets a #PangoAttrList; the attributes in the list are applied to the
15275 // label text.
15276 // <note><para>The attributes set with this function will be applied
15277 // and merged with any other attributes previously effected by way
15278 // of the #GtkLabel:use-underline or #GtkLabel:use-markup properties.
15279 // While it is not recommended to mix markup strings with manually set
15280 // attributes, if you must; know that the attributes will be applied
15281 // to the label after the markup string is parsed.</para></note>
15282 // <attrs>: a #PangoAttrList
15283 void set_attributes(Pango.AttrList* attrs) {
15284 gtk_label_set_attributes(&this, attrs);
15287 // if there is not enough space to render the entire string.
15288 // <mode>: a #PangoEllipsizeMode
15289 void set_ellipsize(Pango.EllipsizeMode mode) {
15290 gtk_label_set_ellipsize(&this, mode);
15293 // Sets the alignment of the lines in the text of the label relative to
15294 // each other. %GTK_JUSTIFY_LEFT is the default value when the
15295 // widget is first created with gtk_label_new(). If you instead want
15296 // to set the alignment of the label as a whole, use
15297 // gtk_misc_set_alignment() instead. gtk_label_set_justify() has no
15298 // effect on labels containing only a single line.
15299 // <jtype>: a #GtkJustification
15300 void set_justify(Justification jtype) {
15301 gtk_label_set_justify(&this, jtype);
15304 // Sets the text of the label. The label is interpreted as
15305 // including embedded underlines and/or Pango markup depending
15306 // on the values of the #GtkLabel:use-underline" and
15307 // #GtkLabel:use-markup properties.
15308 // <str>: the new text to set for the label
15309 void set_label(char* str) {
15310 gtk_label_set_label(&this, str);
15313 // Toggles line wrapping within the #GtkLabel widget. %TRUE makes it break
15314 // lines if text exceeds the widget's size. %FALSE lets the text get cut off
15315 // by the edge of the widget if it exceeds the widget size.
15316 // Note that setting line wrapping to %TRUE does not make the label
15317 // wrap at its parent container's width, because GTK+ widgets
15318 // conceptually can't make their requisition depend on the parent
15319 // container's size. For a label that wraps at a specific position,
15320 // set the label's width using gtk_widget_set_size_request().
15321 // <wrap>: the setting
15322 void set_line_wrap(int wrap) {
15323 gtk_label_set_line_wrap(&this, wrap);
15326 // If line wrapping is on (see gtk_label_set_line_wrap()) this controls how
15327 // the line wrapping is done. The default is %PANGO_WRAP_WORD which means
15328 // wrap on word boundaries.
15329 // <wrap_mode>: the line wrapping mode
15330 void set_line_wrap_mode(Pango.WrapMode wrap_mode) {
15331 gtk_label_set_line_wrap_mode(&this, wrap_mode);
15334 // Parses @str which is marked up with the <link
15335 // linkend="PangoMarkupFormat">Pango text markup language</link>, setting the
15336 // label's text and attribute list based on the parse results. If the @str is
15337 // external data, you may need to escape it with g_markup_escape_text() or
15338 // g_markup_printf_escaped()<!-- -->:
15339 // |[
15340 // char *markup;
15341 // markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str);
15342 // gtk_label_set_markup (GTK_LABEL (label), markup);
15343 // g_free (markup);
15344 // ]|
15345 // <str>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
15346 void set_markup(char* str) {
15347 gtk_label_set_markup(&this, str);
15350 // Parses @str which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>,
15351 // setting the label's text and attribute list based on the parse results.
15352 // If characters in @str are preceded by an underscore, they are underlined
15353 // indicating that they represent a keyboard accelerator called a mnemonic.
15354 // The mnemonic key can be used to activate another widget, chosen
15355 // automatically, or explicitly using gtk_label_set_mnemonic_widget().
15356 // <str>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
15357 void set_markup_with_mnemonic(char* str) {
15358 gtk_label_set_markup_with_mnemonic(&this, str);
15361 // Sets the desired maximum width in characters of @label to @n_chars.
15362 // <n_chars>: the new desired maximum width, in characters.
15363 void set_max_width_chars(int n_chars) {
15364 gtk_label_set_max_width_chars(&this, n_chars);
15367 // If the label has been set so that it has an mnemonic key (using
15368 // i.e. gtk_label_set_markup_with_mnemonic(),
15369 // gtk_label_set_text_with_mnemonic(), gtk_label_new_with_mnemonic()
15370 // or the "use_underline" property) the label can be associated with a
15371 // widget that is the target of the mnemonic. When the label is inside
15372 // a widget (like a #GtkButton or a #GtkNotebook tab) it is
15373 // automatically associated with the correct widget, but sometimes
15374 // (i.e. when the target is a #GtkEntry next to the label) you need to
15375 // set it explicitly using this function.
15376 // The target widget will be accelerated by emitting the
15377 // GtkWidget::mnemonic-activate signal on it. The default handler for
15378 // this signal will activate the widget if there are no mnemonic collisions
15379 // and toggle focus between the colliding widgets otherwise.
15380 // <widget>: the target #GtkWidget
15381 void set_mnemonic_widget(Widget* widget=null) {
15382 gtk_label_set_mnemonic_widget(&this, widget);
15384 void set_pattern(char* pattern) {
15385 gtk_label_set_pattern(&this, pattern);
15388 // Selectable labels allow the user to select text from the label, for
15389 // copy-and-paste.
15390 // <setting>: %TRUE to allow selecting text in the label
15391 void set_selectable(int setting) {
15392 gtk_label_set_selectable(&this, setting);
15395 // Sets whether the label is in single line mode.
15396 // <single_line_mode>: %TRUE if the label should be in single line mode
15397 void set_single_line_mode(int single_line_mode) {
15398 gtk_label_set_single_line_mode(&this, single_line_mode);
15401 // Sets the text within the #GtkLabel widget. It overwrites any text that
15402 // was there before.
15403 // This will also clear any previously set mnemonic accelerators.
15404 // <str>: The text you want to set
15405 void set_text(char* str) {
15406 gtk_label_set_text(&this, str);
15409 // Sets the label's text from the string @str.
15410 // If characters in @str are preceded by an underscore, they are underlined
15411 // indicating that they represent a keyboard accelerator called a mnemonic.
15412 // The mnemonic key can be used to activate another widget, chosen
15413 // automatically, or explicitly using gtk_label_set_mnemonic_widget().
15414 // <str>: a string
15415 void set_text_with_mnemonic(char* str) {
15416 gtk_label_set_text_with_mnemonic(&this, str);
15419 // Sets whether the label should keep track of clicked
15420 // links (and use a different color for them).
15421 // <track_links>: %TRUE to track visited links
15422 void set_track_visited_links(int track_links) {
15423 gtk_label_set_track_visited_links(&this, track_links);
15426 // Sets whether the text of the label contains markup in <link
15427 // linkend="PangoMarkupFormat">Pango's text markup
15428 // language</link>. See gtk_label_set_markup().
15429 // <setting>: %TRUE if the label's text should be parsed for markup.
15430 void set_use_markup(int setting) {
15431 gtk_label_set_use_markup(&this, setting);
15434 // If true, an underline in the text indicates the next character should be
15435 // used for the mnemonic accelerator key.
15436 // <setting>: %TRUE if underlines in the text indicate mnemonics
15437 void set_use_underline(int setting) {
15438 gtk_label_set_use_underline(&this, setting);
15441 // Sets the desired width in characters of @label to @n_chars.
15442 // <n_chars>: the new desired width, in characters.
15443 void set_width_chars(int n_chars) {
15444 gtk_label_set_width_chars(&this, n_chars);
15447 // A <link linkend="keybinding-signals">keybinding signal</link>
15448 // which gets emitted when the user activates a link in the label.
15449 // Applications may also emit the signal with g_signal_emit_by_name()
15450 // if they need to control activation of URIs programmatically.
15451 // The default bindings for this signal are all forms of the Enter key.
15452 extern (C) alias static void function (Label* this_, void* user_data=null) signal_activate_current_link;
15454 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15455 return super_.signal_connect!name(cb, data, cf);
15458 ulong signal_connect(string name:"activate-current-link", CB/*:signal_activate_current_link*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15459 return signal_connect_data(&this, cast(char*)"activate-current-link",
15460 cast(GObject2.Callback)cb, data, null, cf);
15463 // The signal which gets emitted to activate a URI.
15464 // Applications may connect to it to override the default behaviour,
15465 // which is to call gtk_show_uri().
15466 // RETURNS: %TRUE if the link has been activated
15467 // <uri>: the URI that is activated
15468 extern (C) alias static c_int function (Label* this_, char* uri, void* user_data=null) signal_activate_link;
15469 ulong signal_connect(string name:"activate-link", CB/*:signal_activate_link*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15470 return signal_connect_data(&this, cast(char*)"activate-link",
15471 cast(GObject2.Callback)cb, data, null, cf);
15474 // The ::copy-clipboard signal is a
15475 // <link linkend="keybinding-signals">keybinding signal</link>
15476 // which gets emitted to copy the selection to the clipboard.
15477 // The default binding for this signal is Ctrl-c.
15478 extern (C) alias static void function (Label* this_, void* user_data=null) signal_copy_clipboard;
15479 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15480 return signal_connect_data(&this, cast(char*)"copy-clipboard",
15481 cast(GObject2.Callback)cb, data, null, cf);
15484 // The ::move-cursor signal is a
15485 // <link linkend="keybinding-signals">keybinding signal</link>
15486 // which gets emitted when the user initiates a cursor movement.
15487 // If the cursor is not visible in @entry, this signal causes
15488 // the viewport to be moved instead.
15489 // Applications should not connect to it, but may emit it with
15490 // g_signal_emit_by_name() if they need to control the cursor
15491 // programmatically.
15492 // The default bindings for this signal come in two variants,
15493 // the variant with the Shift modifier extends the selection,
15494 // the variant without the Shift modifer does not.
15495 // There are too many key combinations to list them all here.
15496 // <itemizedlist>
15497 // <listitem>Arrow keys move by individual characters/lines</listitem>
15498 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
15499 // <listitem>Home/End keys move to the ends of the buffer</listitem>
15500 // </itemizedlist>
15501 // <step>: the granularity of the move, as a #GtkMovementStep
15502 // <count>: the number of @step units to move
15503 // <extend_selection>: %TRUE if the move should extend the selection
15504 extern (C) alias static void function (Label* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) signal_move_cursor;
15505 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15506 return signal_connect_data(&this, cast(char*)"move-cursor",
15507 cast(GObject2.Callback)cb, data, null, cf);
15510 // The ::populate-popup signal gets emitted before showing the
15511 // context menu of the label. Note that only selectable labels
15512 // have context menus.
15513 // If you need to add items to the context menu, connect
15514 // to this signal and append your menuitems to the @menu.
15515 // <menu>: the menu that is being populated
15516 extern (C) alias static void function (Label* this_, Menu* menu, void* user_data=null) signal_populate_popup;
15517 ulong signal_connect(string name:"populate-popup", CB/*:signal_populate_popup*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15518 return signal_connect_data(&this, cast(char*)"populate-popup",
15519 cast(GObject2.Callback)cb, data, null, cf);
15523 struct LabelClass {
15524 MiscClass parent_class;
15525 extern (C) void function (Label* label, MovementStep step, int count, int extend_selection) move_cursor;
15526 extern (C) void function (Label* label) copy_clipboard;
15527 extern (C) void function (Label* label, Menu* menu) populate_popup;
15528 extern (C) int function (Label* label, char* uri) activate_link;
15529 extern (C) void function () _gtk_reserved1;
15530 extern (C) void function () _gtk_reserved2;
15531 extern (C) void function () _gtk_reserved3;
15534 struct LabelSelectionInfo {
15537 struct Layout /* : Container */ {
15538 alias container this;
15539 alias container super_;
15540 Container container;
15541 GLib2.List* children;
15542 uint width, height;
15543 Adjustment* hadjustment, vadjustment;
15544 Gdk2.Window* bin_window;
15545 private Gdk2.VisibilityState visibility;
15546 private int scroll_x, scroll_y;
15547 private uint freeze_count;
15550 // Creates a new #GtkLayout. Unless you have a specific adjustment
15551 // you'd like the layout to use for scrolling, pass %NULL for
15552 // RETURNS: a new #GtkLayout
15553 // <hadjustment>: horizontal scroll adjustment, or %NULL
15554 // <vadjustment>: vertical scroll adjustment, or %NULL
15555 static Layout* new_(Adjustment* hadjustment=null, Adjustment* vadjustment=null) {
15556 return gtk_layout_new(hadjustment, vadjustment);
15558 // This is a deprecated function, it doesn't do anything useful.
15559 void freeze() {
15560 gtk_layout_freeze(&this);
15563 // Retrieve the bin window of the layout used for drawing operations.
15564 // RETURNS: a #GdkWindow
15565 Gdk2.Window* get_bin_window() {
15566 return gtk_layout_get_bin_window(&this);
15569 // This function should only be called after the layout has been
15570 // placed in a #GtkScrolledWindow or otherwise configured for
15571 // scrolling. It returns the #GtkAdjustment used for communication
15572 // between the horizontal scrollbar and @layout.
15573 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
15574 // RETURNS: horizontal scroll adjustment
15575 Adjustment* get_hadjustment() {
15576 return gtk_layout_get_hadjustment(&this);
15579 // Gets the size that has been set on the layout, and that determines
15580 // the total extents of the layout's scrollbar area. See
15581 // gtk_layout_set_size ().
15582 // <width>: location to store the width set on
15583 // <height>: location to store the height set on
15584 void get_size(/*out*/ uint* width=null, /*out*/ uint* height=null) {
15585 gtk_layout_get_size(&this, width, height);
15588 // This function should only be called after the layout has been
15589 // placed in a #GtkScrolledWindow or otherwise configured for
15590 // scrolling. It returns the #GtkAdjustment used for communication
15591 // between the vertical scrollbar and @layout.
15592 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
15593 // RETURNS: vertical scroll adjustment
15594 Adjustment* get_vadjustment() {
15595 return gtk_layout_get_vadjustment(&this);
15598 // Moves a current child of @layout to a new position.
15599 // <child_widget>: a current child of @layout
15600 // <x>: X position to move to
15601 // <y>: Y position to move to
15602 void move(Widget* child_widget, int x, int y) {
15603 gtk_layout_move(&this, child_widget, x, y);
15606 // Adds @child_widget to @layout, at position (@x,@y).
15607 // <child_widget>: child widget
15608 // <x>: X position of child widget
15609 // <y>: Y position of child widget
15610 void put(Widget* child_widget, int x, int y) {
15611 gtk_layout_put(&this, child_widget, x, y);
15614 // Sets the horizontal scroll adjustment for the layout.
15615 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
15616 // <adjustment>: new scroll adjustment
15617 void set_hadjustment(Adjustment* adjustment=null) {
15618 gtk_layout_set_hadjustment(&this, adjustment);
15621 // Sets the size of the scrollable area of the layout.
15622 // <width>: width of entire scrollable area
15623 // <height>: height of entire scrollable area
15624 void set_size(uint width, uint height) {
15625 gtk_layout_set_size(&this, width, height);
15628 // Sets the vertical scroll adjustment for the layout.
15629 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
15630 // <adjustment>: new scroll adjustment
15631 void set_vadjustment(Adjustment* adjustment=null) {
15632 gtk_layout_set_vadjustment(&this, adjustment);
15634 // This is a deprecated function, it doesn't do anything useful.
15635 void thaw() {
15636 gtk_layout_thaw(&this);
15639 // Set the scroll adjustments for the layout. Usually scrolled containers
15640 // like #GtkScrolledWindow will emit this signal to connect two instances
15641 // of #GtkScrollbar to the scroll directions of the #GtkLayout.
15642 extern (C) alias static void function (Layout* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
15644 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15645 return super_.signal_connect!name(cb, data, cf);
15648 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15649 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
15650 cast(GObject2.Callback)cb, data, null, cf);
15654 struct LayoutClass {
15655 ContainerClass parent_class;
15656 extern (C) void function (Layout* layout, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
15657 extern (C) void function () _gtk_reserved1;
15658 extern (C) void function () _gtk_reserved2;
15659 extern (C) void function () _gtk_reserved3;
15660 extern (C) void function () _gtk_reserved4;
15663 struct LinkButton /* : Button */ {
15664 alias parent_instance this;
15665 alias parent_instance super_;
15666 alias parent_instance button;
15667 Button parent_instance;
15668 LinkButtonPrivate* priv;
15671 // Creates a new #GtkLinkButton with the URI as its text.
15672 // RETURNS: a new link button widget.
15673 // <uri>: a valid URI
15674 static LinkButton* new_(char* uri) {
15675 return gtk_link_button_new(uri);
15678 // Creates a new #GtkLinkButton containing a label.
15679 // RETURNS: a new link button widget.
15680 // <uri>: a valid URI
15681 // <label>: the text of the button
15682 static LinkButton* new_with_label(char* uri, char* label=null) {
15683 return gtk_link_button_new_with_label(uri, label);
15686 // Unintrospectable function: set_uri_hook() / gtk_link_button_set_uri_hook()
15687 // Sets @func as the function that should be invoked every time a user clicks
15688 // a #GtkLinkButton. This function is called before every callback registered
15689 // for the "clicked" signal.
15690 // If no uri hook has been set, GTK+ defaults to calling gtk_show_uri().
15691 // RETURNS: the previously set hook function.
15692 // <func>: a function called each time a #GtkLinkButton is clicked, or %NULL
15693 // <data>: user data to be passed to @func, or %NULL
15694 // <destroy>: a #GDestroyNotify that gets called when @data is no longer needed, or %NULL
15695 static LinkButtonUriFunc set_uri_hook(LinkButtonUriFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) {
15696 return gtk_link_button_set_uri_hook(func, data, destroy);
15699 // Retrieves the URI set using gtk_link_button_set_uri().
15700 // and should not be modified or freed.
15701 // RETURNS: a valid URI. The returned string is owned by the link button
15702 char* get_uri() {
15703 return gtk_link_button_get_uri(&this);
15706 // Retrieves the 'visited' state of the URI where the #GtkLinkButton
15707 // points. The button becomes visited when it is clicked. If the URI
15708 // is changed on the button, the 'visited' state is unset again.
15709 // The state may also be changed using gtk_link_button_set_visited().
15710 // RETURNS: %TRUE if the link has been visited, %FALSE otherwise
15711 int get_visited() {
15712 return gtk_link_button_get_visited(&this);
15715 // Sets @uri as the URI where the #GtkLinkButton points. As a side-effect
15716 // this unsets the 'visited' state of the button.
15717 // <uri>: a valid URI
15718 void set_uri(char* uri) {
15719 gtk_link_button_set_uri(&this, uri);
15722 // Sets the 'visited' state of the URI where the #GtkLinkButton
15723 // points. See gtk_link_button_get_visited() for more details.
15724 // <visited>: the new 'visited' state
15725 void set_visited(int visited) {
15726 gtk_link_button_set_visited(&this, visited);
15730 struct LinkButtonClass {
15731 ButtonClass parent_class;
15732 extern (C) void function () _gtk_padding1;
15733 extern (C) void function () _gtk_padding2;
15734 extern (C) void function () _gtk_padding3;
15735 extern (C) void function () _gtk_padding4;
15738 struct LinkButtonPrivate {
15741 extern (C) alias void function (LinkButton* button, char* link_, void* user_data) LinkButtonUriFunc;
15743 struct List /* : Container */ {
15744 alias container this;
15745 alias container super_;
15746 Container container;
15747 GLib2.List* children, selection, undo_selection_, undo_unselection;
15748 Widget* last_focus_child, undo_focus_child;
15749 uint htimer, vtimer;
15750 int anchor, drag_pos;
15751 StateType anchor_state;
15752 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
15753 uint, "selection_mode", 2,
15754 uint, "drag_selection", 1,
15755 uint, "add_mode", 1,
15756 uint, "__dummy32A", 28));
15758 static List* new_() {
15759 return gtk_list_new();
15761 void append_items(GLib2.List* items) {
15762 gtk_list_append_items(&this, items);
15764 int child_position(Widget* child) {
15765 return gtk_list_child_position(&this, child);
15767 void clear_items(int start, int end) {
15768 gtk_list_clear_items(&this, start, end);
15770 void end_drag_selection() {
15771 gtk_list_end_drag_selection(&this);
15773 void end_selection() {
15774 gtk_list_end_selection(&this);
15776 void extend_selection(ScrollType scroll_type, float position, int auto_start_selection) {
15777 gtk_list_extend_selection(&this, scroll_type, position, auto_start_selection);
15779 void insert_items(GLib2.List* items, int position) {
15780 gtk_list_insert_items(&this, items, position);
15782 void prepend_items(GLib2.List* items) {
15783 gtk_list_prepend_items(&this, items);
15785 void remove_items(GLib2.List* items) {
15786 gtk_list_remove_items(&this, items);
15788 void remove_items_no_unref(GLib2.List* items) {
15789 gtk_list_remove_items_no_unref(&this, items);
15791 void scroll_horizontal(ScrollType scroll_type, float position) {
15792 gtk_list_scroll_horizontal(&this, scroll_type, position);
15794 void scroll_vertical(ScrollType scroll_type, float position) {
15795 gtk_list_scroll_vertical(&this, scroll_type, position);
15797 void select_all() {
15798 gtk_list_select_all(&this);
15800 void select_child(Widget* child) {
15801 gtk_list_select_child(&this, child);
15803 void select_item(int item) {
15804 gtk_list_select_item(&this, item);
15806 void set_selection_mode(SelectionMode mode) {
15807 gtk_list_set_selection_mode(&this, mode);
15809 void start_selection() {
15810 gtk_list_start_selection(&this);
15812 void toggle_add_mode() {
15813 gtk_list_toggle_add_mode(&this);
15815 void toggle_focus_row() {
15816 gtk_list_toggle_focus_row(&this);
15818 void toggle_row(Widget* item) {
15819 gtk_list_toggle_row(&this, item);
15821 void undo_selection() {
15822 gtk_list_undo_selection(&this);
15824 void unselect_all() {
15825 gtk_list_unselect_all(&this);
15827 void unselect_child(Widget* child) {
15828 gtk_list_unselect_child(&this, child);
15830 void unselect_item(int item) {
15831 gtk_list_unselect_item(&this, item);
15833 extern (C) alias static void function (List* this_, Widget* object, void* user_data=null) signal_select_child;
15835 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15836 return super_.signal_connect!name(cb, data, cf);
15839 ulong signal_connect(string name:"select-child", CB/*:signal_select_child*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15840 return signal_connect_data(&this, cast(char*)"select-child",
15841 cast(GObject2.Callback)cb, data, null, cf);
15843 extern (C) alias static void function (List* this_, void* user_data=null) signal_selection_changed;
15844 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15845 return signal_connect_data(&this, cast(char*)"selection-changed",
15846 cast(GObject2.Callback)cb, data, null, cf);
15848 extern (C) alias static void function (List* this_, Widget* object, void* user_data=null) signal_unselect_child;
15849 ulong signal_connect(string name:"unselect-child", CB/*:signal_unselect_child*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15850 return signal_connect_data(&this, cast(char*)"unselect-child",
15851 cast(GObject2.Callback)cb, data, null, cf);
15855 struct ListClass {
15856 ContainerClass parent_class;
15857 extern (C) void function (List* list) selection_changed;
15858 extern (C) void function (List* list, Widget* child) select_child;
15859 extern (C) void function (List* list, Widget* child) unselect_child;
15862 struct ListItem /* : Item */ {
15863 alias item this;
15864 alias item super_;
15865 Item item;
15867 static ListItem* new_() {
15868 return gtk_list_item_new();
15870 static ListItem* new_with_label(char* label) {
15871 return gtk_list_item_new_with_label(label);
15873 void deselect() {
15874 gtk_list_item_deselect(&this);
15876 void select() {
15877 gtk_list_item_select(&this);
15879 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_end_selection;
15881 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15882 return super_.signal_connect!name(cb, data, cf);
15885 ulong signal_connect(string name:"end-selection", CB/*:signal_end_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15886 return signal_connect_data(&this, cast(char*)"end-selection",
15887 cast(GObject2.Callback)cb, data, null, cf);
15889 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, c_int p1, void* user_data=null) signal_extend_selection;
15890 ulong signal_connect(string name:"extend-selection", CB/*:signal_extend_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15891 return signal_connect_data(&this, cast(char*)"extend-selection",
15892 cast(GObject2.Callback)cb, data, null, cf);
15894 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_horizontal;
15895 ulong signal_connect(string name:"scroll-horizontal", CB/*:signal_scroll_horizontal*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15896 return signal_connect_data(&this, cast(char*)"scroll-horizontal",
15897 cast(GObject2.Callback)cb, data, null, cf);
15899 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_vertical;
15900 ulong signal_connect(string name:"scroll-vertical", CB/*:signal_scroll_vertical*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15901 return signal_connect_data(&this, cast(char*)"scroll-vertical",
15902 cast(GObject2.Callback)cb, data, null, cf);
15904 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_select_all;
15905 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15906 return signal_connect_data(&this, cast(char*)"select-all",
15907 cast(GObject2.Callback)cb, data, null, cf);
15909 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_start_selection;
15910 ulong signal_connect(string name:"start-selection", CB/*:signal_start_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15911 return signal_connect_data(&this, cast(char*)"start-selection",
15912 cast(GObject2.Callback)cb, data, null, cf);
15914 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_toggle_add_mode;
15915 ulong signal_connect(string name:"toggle-add-mode", CB/*:signal_toggle_add_mode*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15916 return signal_connect_data(&this, cast(char*)"toggle-add-mode",
15917 cast(GObject2.Callback)cb, data, null, cf);
15919 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_toggle_focus_row;
15920 ulong signal_connect(string name:"toggle-focus-row", CB/*:signal_toggle_focus_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15921 return signal_connect_data(&this, cast(char*)"toggle-focus-row",
15922 cast(GObject2.Callback)cb, data, null, cf);
15924 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_undo_selection;
15925 ulong signal_connect(string name:"undo-selection", CB/*:signal_undo_selection*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15926 return signal_connect_data(&this, cast(char*)"undo-selection",
15927 cast(GObject2.Callback)cb, data, null, cf);
15929 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_unselect_all;
15930 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15931 return signal_connect_data(&this, cast(char*)"unselect-all",
15932 cast(GObject2.Callback)cb, data, null, cf);
15936 struct ListItemClass {
15937 ItemClass parent_class;
15938 extern (C) void function (ListItem* list_item) toggle_focus_row;
15939 extern (C) void function (ListItem* list_item) select_all;
15940 extern (C) void function (ListItem* list_item) unselect_all;
15941 extern (C) void function (ListItem* list_item) undo_selection;
15942 extern (C) void function (ListItem* list_item) start_selection;
15943 extern (C) void function (ListItem* list_item) end_selection;
15944 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position, int auto_start_selection) extend_selection;
15945 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position) scroll_horizontal;
15946 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position) scroll_vertical;
15947 extern (C) void function (ListItem* list_item) toggle_add_mode;
15950 struct ListStore /* : GObject.Object */ {
15951 alias parent this;
15952 alias parent super_;
15953 alias parent object;
15954 GObject2.Object parent;
15955 private int stamp;
15956 private void* seq, _gtk_reserved1;
15957 private GLib2.List* sort_list;
15958 private int n_columns, sort_column_id;
15959 private SortType order;
15960 private Type* column_headers;
15961 private int length;
15962 private TreeIterCompareFunc default_sort_func;
15963 private void* default_sort_data;
15964 private GLib2.DestroyNotify default_sort_destroy;
15965 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
15966 uint, "columns_dirty", 1,
15967 uint, "__dummy32A", 31));
15970 // Unintrospectable constructor: new() / gtk_list_store_new()
15971 // Creates a new list store as with @n_columns columns each of the types passed
15972 // in. Note that only types derived from standard GObject fundamental types
15973 // are supported.
15974 // As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
15975 // GDK_TYPE_PIXBUF);</literal> will create a new #GtkListStore with three columns, of type
15976 // int, string and #GdkPixbuf respectively.
15977 // RETURNS: a new #GtkListStore
15978 // <n_columns>: number of columns in the list store
15979 alias gtk_list_store_new new_; // Variadic
15981 // Non-vararg creation function. Used primarily by language bindings.
15982 // RETURNS: a new #GtkListStore
15983 // <n_columns>: number of columns in the list store
15984 // <types>: an array of #GType types for the columns, from first to last
15985 static ListStore* newv(int n_columns, Type* types) {
15986 return gtk_list_store_newv(n_columns, types);
15989 // Appends a new row to @list_store. @iter will be changed to point to this new
15990 // row. The row will be empty after this function is called. To fill in
15991 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
15992 // <iter>: An unset #GtkTreeIter to set to the appended row
15993 void append(/*out*/ TreeIter* iter) {
15994 gtk_list_store_append(&this, iter);
15996 // Removes all rows from the list store.
15997 void clear() {
15998 gtk_list_store_clear(&this);
16001 // Creates a new row at @position. @iter will be changed to point to this new
16002 // row. If @position is larger than the number of rows on the list, then the
16003 // new row will be appended to the list. The row will be empty after this
16004 // function is called. To fill in values, you need to call
16005 // gtk_list_store_set() or gtk_list_store_set_value().
16006 // <iter>: An unset #GtkTreeIter to set to the new row
16007 // <position>: position to insert the new row
16008 void insert(/*out*/ TreeIter* iter, int position) {
16009 gtk_list_store_insert(&this, iter, position);
16012 // Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
16013 // prepended to the beginning of the list. @iter will be changed to point to
16014 // this new row. The row will be empty after this function is called. To fill
16015 // in values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
16016 // <iter>: An unset #GtkTreeIter to set to the new row
16017 // <sibling>: A valid #GtkTreeIter, or %NULL
16018 void insert_after(/*out*/ TreeIter* iter, TreeIter* sibling=null) {
16019 gtk_list_store_insert_after(&this, iter, sibling);
16022 // Inserts a new row before @sibling. If @sibling is %NULL, then the row will
16023 // be appended to the end of the list. @iter will be changed to point to this
16024 // new row. The row will be empty after this function is called. To fill in
16025 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
16026 // <iter>: An unset #GtkTreeIter to set to the new row
16027 // <sibling>: A valid #GtkTreeIter, or %NULL
16028 void insert_before(/*out*/ TreeIter* iter, TreeIter* sibling=null) {
16029 gtk_list_store_insert_before(&this, iter, sibling);
16032 // Unintrospectable method: insert_with_values() / gtk_list_store_insert_with_values()
16033 // Creates a new row at @position. @iter will be changed to point to this new
16034 // row. If @position is larger than the number of rows on the list, then the
16035 // new row will be appended to the list. The row will be filled with the
16036 // values given to this function.
16037 // Calling
16038 // <literal>gtk_list_store_insert_with_values(list_store, iter, position...)</literal>
16039 // has the same effect as calling
16040 // |[
16041 // gtk_list_store_insert (list_store, iter, position);
16042 // gtk_list_store_set (list_store, iter, ...);
16043 // ]|
16044 // with the difference that the former will only emit a row_inserted signal,
16045 // while the latter will emit row_inserted, row_changed and, if the list store
16046 // is sorted, rows_reordered. Since emitting the rows_reordered signal
16047 // repeatedly can affect the performance of the program,
16048 // gtk_list_store_insert_with_values() should generally be preferred when
16049 // inserting rows in a sorted list store.
16050 // <iter>: An unset #GtkTreeIter to set to the new row, or %NULL.
16051 // <position>: position to insert the new row
16052 /+ Not available -- variadic methods unsupported - use the C function directly.
16053 alias gtk_list_store_insert_with_values insert_with_values; // Variadic
16056 // A variant of gtk_list_store_insert_with_values() which
16057 // takes the columns and values as two arrays, instead of
16058 // varargs. This function is mainly intended for
16059 // language-bindings.
16060 // <iter>: An unset #GtkTreeIter to set to the new row, or %NULL.
16061 // <position>: position to insert the new row
16062 // <columns>: an array of column numbers
16063 // <values>: an array of GValues
16064 // <n_values>: the length of the @columns and @values arrays
16065 void insert_with_valuesv(/*out*/ TreeIter* iter, int position, int* columns, GObject2.Value* values, int n_values) {
16066 gtk_list_store_insert_with_valuesv(&this, iter, position, columns, values, n_values);
16069 // <warning>This function is slow. Only use it for debugging and/or testing
16070 // purposes.</warning>
16071 // Checks if the given iter is a valid iter for this #GtkListStore.
16072 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
16073 // <iter>: A #GtkTreeIter.
16074 int iter_is_valid(TreeIter* iter) {
16075 return gtk_list_store_iter_is_valid(&this, iter);
16078 // Moves @iter in @store to the position after @position. Note that this
16079 // function only works with unsorted stores. If @position is %NULL, @iter
16080 // will be moved to the start of the list.
16081 // <iter>: A #GtkTreeIter.
16082 // <position>: A #GtkTreeIter or %NULL.
16083 void move_after(TreeIter* iter, TreeIter* position=null) {
16084 gtk_list_store_move_after(&this, iter, position);
16087 // Moves @iter in @store to the position before @position. Note that this
16088 // function only works with unsorted stores. If @position is %NULL, @iter
16089 // will be moved to the end of the list.
16090 // <iter>: A #GtkTreeIter.
16091 // <position>: A #GtkTreeIter, or %NULL.
16092 void move_before(TreeIter* iter, TreeIter* position=null) {
16093 gtk_list_store_move_before(&this, iter, position);
16096 // Prepends a new row to @list_store. @iter will be changed to point to this new
16097 // row. The row will be empty after this function is called. To fill in
16098 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
16099 // <iter>: An unset #GtkTreeIter to set to the prepend row
16100 void prepend(/*out*/ TreeIter* iter) {
16101 gtk_list_store_prepend(&this, iter);
16104 // Removes the given row from the list store. After being removed,
16105 // to the last row in @list_store.
16106 // RETURNS: %TRUE if @iter is valid, %FALSE if not.
16107 // <iter>: A valid #GtkTreeIter
16108 int remove(TreeIter* iter) {
16109 return gtk_list_store_remove(&this, iter);
16112 // Reorders @store to follow the order indicated by @new_order. Note that
16113 // this function only works with unsorted stores.
16114 // <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<literal>[newpos] = oldpos</literal>.
16115 void reorder(int* new_order) {
16116 gtk_list_store_reorder(&this, new_order);
16119 // Unintrospectable method: set() / gtk_list_store_set()
16120 // Sets the value of one or more cells in the row referenced by @iter.
16121 // The variable argument list should contain integer column numbers,
16122 // each column number followed by the value to be set.
16123 // The list is terminated by a -1. For example, to set column 0 with type
16124 // %G_TYPE_STRING to "Foo", you would write <literal>gtk_list_store_set (store, iter,
16125 // 0, "Foo", -1)</literal>.
16126 // The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
16127 // will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
16128 // <iter>: row iterator
16129 /+ Not available -- variadic methods unsupported - use the C function directly.
16130 alias gtk_list_store_set set; // Variadic
16133 // This function is meant primarily for #GObjects that inherit from #GtkListStore,
16134 // and should only be used when constructing a new #GtkListStore. It will not
16135 // function after a row has been added, or a method on the #GtkTreeModel
16136 // interface is called.
16137 // <n_columns>: Number of columns for the list store
16138 // <types>: An array length n of #GTypes
16139 void set_column_types(int n_columns, Type* types) {
16140 gtk_list_store_set_column_types(&this, n_columns, types);
16143 // Unintrospectable method: set_valist() / gtk_list_store_set_valist()
16144 // See gtk_list_store_set(); this version takes a va_list for use by language
16145 // bindings.
16146 // <iter>: A valid #GtkTreeIter for the row being modified
16147 // <var_args>: va_list of column/value pairs
16148 void set_valist(TreeIter* iter, va_list var_args) {
16149 gtk_list_store_set_valist(&this, iter, var_args);
16152 // Sets the data in the cell specified by @iter and @column.
16153 // The type of @value must be convertible to the type of the
16154 // column.
16155 // <iter>: A valid #GtkTreeIter for the row being modified
16156 // <column>: column number to modify
16157 // <value>: new value for the cell
16158 void set_value(TreeIter* iter, int column, GObject2.Value* value) {
16159 gtk_list_store_set_value(&this, iter, column, value);
16162 // A variant of gtk_list_store_set_valist() which
16163 // takes the columns and values as two arrays, instead of
16164 // varargs. This function is mainly intended for
16165 // language-bindings and in case the number of columns to
16166 // change is not known until run-time.
16167 // <iter>: A valid #GtkTreeIter for the row being modified
16168 // <columns>: an array of column numbers
16169 // <values>: an array of GValues
16170 // <n_values>: the length of the @columns and @values arrays
16171 void set_valuesv(TreeIter* iter, int* columns, GObject2.Value* values, int n_values) {
16172 gtk_list_store_set_valuesv(&this, iter, columns, values, n_values);
16175 // Swaps @a and @b in @store. Note that this function only works with
16176 // unsorted stores.
16177 // <a>: A #GtkTreeIter.
16178 // <b>: Another #GtkTreeIter.
16179 void swap(TreeIter* a, TreeIter* b) {
16180 gtk_list_store_swap(&this, a, b);
16184 struct ListStoreClass {
16185 GObject2.ObjectClass parent_class;
16186 extern (C) void function () _gtk_reserved1;
16187 extern (C) void function () _gtk_reserved2;
16188 extern (C) void function () _gtk_reserved3;
16189 extern (C) void function () _gtk_reserved4;
16192 enum int MAJOR_VERSION = 2;
16193 enum int MAX_COMPOSE_LEN = 7;
16194 enum int MICRO_VERSION = 8;
16195 enum int MINOR_VERSION = 24;
16196 enum MatchType {
16197 ALL = 0,
16198 ALL_TAIL = 1,
16199 HEAD = 2,
16200 TAIL = 3,
16201 EXACT = 4,
16202 LAST = 5
16204 struct Menu /* : MenuShell */ {
16205 alias menu_shell this;
16206 alias menu_shell super_;
16207 alias menu_shell menushell;
16208 MenuShell menu_shell;
16209 Widget* parent_menu_item, old_active_menu_item;
16210 AccelGroup* accel_group;
16211 char* accel_path;
16212 MenuPositionFunc position_func;
16213 void* position_func_data;
16214 uint toggle_size;
16215 Widget* toplevel, tearoff_window, tearoff_hbox, tearoff_scrollbar;
16216 Adjustment* tearoff_adjustment;
16217 Gdk2.Window* view_window, bin_window;
16218 int scroll_offset, saved_scroll_offset, scroll_step;
16219 uint timeout_id;
16220 Gdk2.Region* navigation_region;
16221 uint navigation_timeout;
16222 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16223 uint, "needs_destruction_ref_count", 1,
16224 uint, "torn_off", 1,
16225 uint, "tearoff_active", 1,
16226 uint, "scroll_fast", 1,
16227 uint, "upper_arrow_visible", 1,
16228 uint, "lower_arrow_visible", 1,
16229 uint, "upper_arrow_prelight", 1,
16230 uint, "lower_arrow_prelight", 1,
16231 uint, "__dummy32A", 24));
16233 static Menu* new_() {
16234 return gtk_menu_new();
16237 // Returns a list of the menus which are attached to this widget.
16238 // This list is owned by GTK+ and must not be modified.
16239 // RETURNS: the list of menus attached to his widget.
16240 // <widget>: a #GtkWidget
16241 static GLib2.List* get_for_attach_widget(Widget* widget) {
16242 return gtk_menu_get_for_attach_widget(widget);
16245 // Adds a new #GtkMenuItem to a (table) menu. The number of 'cells' that
16246 // an item will occupy is specified by @left_attach, @right_attach,
16247 // rightmost, uppermost and lower column and row numbers of the table.
16248 // (Columns and rows are indexed from zero).
16249 // Note that this function is not related to gtk_menu_detach().
16250 // <child>: a #GtkMenuItem.
16251 // <left_attach>: The column number to attach the left side of the item to.
16252 // <right_attach>: The column number to attach the right side of the item to.
16253 // <top_attach>: The row number to attach the top of the item to.
16254 // <bottom_attach>: The row number to attach the bottom of the item to.
16255 void attach(Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) {
16256 gtk_menu_attach(&this, child, left_attach, right_attach, top_attach, bottom_attach);
16258 // Unintrospectable method: attach_to_widget() / gtk_menu_attach_to_widget()
16259 void attach_to_widget(Widget* attach_widget, MenuDetachFunc detacher) {
16260 gtk_menu_attach_to_widget(&this, attach_widget, detacher);
16262 void detach() {
16263 gtk_menu_detach(&this);
16266 // Gets the #GtkAccelGroup which holds global accelerators for the
16267 // menu. See gtk_menu_set_accel_group().
16268 // RETURNS: the #GtkAccelGroup associated with the menu.
16269 AccelGroup* get_accel_group() {
16270 return gtk_menu_get_accel_group(&this);
16273 // Retrieves the accelerator path set on the menu.
16274 // RETURNS: the accelerator path set on the menu.
16275 char* get_accel_path() {
16276 return gtk_menu_get_accel_path(&this);
16279 // Returns the selected menu item from the menu. This is used by the
16280 // #GtkOptionMenu.
16281 // in the menu. If a selection has not yet been made, the
16282 // first menu item is selected.
16283 // RETURNS: the #GtkMenuItem that was last selected
16284 Widget* get_active() {
16285 return gtk_menu_get_active(&this);
16288 // Returns the #GtkWidget that the menu is attached to.
16289 // RETURNS: the #GtkWidget that the menu is attached to
16290 Widget* get_attach_widget() {
16291 return gtk_menu_get_attach_widget(&this);
16294 // Retrieves the number of the monitor on which to show the menu.
16295 // be popped up or -1, if no monitor has been set
16296 // RETURNS: the number of the monitor on which the menu should
16297 int get_monitor() {
16298 return gtk_menu_get_monitor(&this);
16301 // Returns whether the menu reserves space for toggles and
16302 // icons, regardless of their actual presence.
16303 // RETURNS: Whether the menu reserves toggle space
16304 int get_reserve_toggle_size() {
16305 return gtk_menu_get_reserve_toggle_size(&this);
16308 // Returns whether the menu is torn off. See
16309 // gtk_menu_set_tearoff_state ().
16310 // RETURNS: %TRUE if the menu is currently torn off.
16311 int get_tearoff_state() {
16312 return gtk_menu_get_tearoff_state(&this);
16315 // Returns the title of the menu. See gtk_menu_set_title().
16316 // title set on it. This string is owned by the widget and should
16317 // not be modified or freed.
16318 // RETURNS: the title of the menu, or %NULL if the menu has no
16319 char* get_title() {
16320 return gtk_menu_get_title(&this);
16322 void popdown() {
16323 gtk_menu_popdown(&this);
16326 // Unintrospectable method: popup() / gtk_menu_popup()
16327 // Displays a menu and makes it available for selection. Applications can use
16328 // this function to display context-sensitive menus, and will typically supply
16329 // %NULL for the @parent_menu_shell, @parent_menu_item, @func and @data
16330 // parameters. The default menu positioning function will position the menu
16331 // at the current mouse cursor position.
16332 // The @button parameter should be the mouse button pressed to initiate
16333 // the menu popup. If the menu popup was initiated by something other than
16334 // a mouse button press, such as a mouse button release or a keypress,
16335 // The @activate_time parameter is used to conflict-resolve initiation of
16336 // concurrent requests for mouse/keyboard grab requests. To function
16337 // properly, this needs to be the time stamp of the user event (such as
16338 // a mouse click or key press) that caused the initiation of the popup.
16339 // Only if no such event is available, gtk_get_current_event_time() can
16340 // be used instead.
16341 // <parent_menu_shell>: the menu shell containing the triggering menu item, or %NULL
16342 // <parent_menu_item>: the menu item whose activation triggered the popup, or %NULL
16343 // <func>: a user supplied function used to position the menu, or %NULL
16344 // <data>: user supplied data to be passed to @func.
16345 // <button>: the mouse button which was pressed to initiate the event.
16346 // <activate_time>: the time at which the activation event occurred.
16347 void popup(Widget* parent_menu_shell, Widget* parent_menu_item, MenuPositionFunc func, void* data, uint button, uint activate_time) {
16348 gtk_menu_popup(&this, parent_menu_shell, parent_menu_item, func, data, button, activate_time);
16350 void reorder_child(Widget* child, int position) {
16351 gtk_menu_reorder_child(&this, child, position);
16353 void reposition() {
16354 gtk_menu_reposition(&this);
16356 void set_accel_group(AccelGroup* accel_group=null) {
16357 gtk_menu_set_accel_group(&this, accel_group);
16360 // Sets an accelerator path for this menu from which accelerator paths
16361 // for its immediate children, its menu items, can be constructed.
16362 // The main purpose of this function is to spare the programmer the
16363 // inconvenience of having to call gtk_menu_item_set_accel_path() on
16364 // each menu item that should support runtime user changable accelerators.
16365 // Instead, by just calling gtk_menu_set_accel_path() on their parent,
16366 // each menu item of this menu, that contains a label describing its purpose,
16367 // automatically gets an accel path assigned. For example, a menu containing
16368 // menu items "New" and "Exit", will, after
16369 // <literal>gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</literal>
16370 // has been called, assign its items the accel paths:
16371 // <literal>"&lt;Gnumeric-Sheet&gt;/File/New"</literal> and <literal>"&lt;Gnumeric-Sheet&gt;/File/Exit"</literal>.
16372 // Assigning accel paths to menu items then enables the user to change
16373 // their accelerators at runtime. More details about accelerator paths
16374 // and their default setups can be found at gtk_accel_map_add_entry().
16375 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
16376 // pass a static string, you can save some memory by interning it first with
16377 // g_intern_static_string().
16378 // <accel_path>: a valid accelerator path
16379 void set_accel_path(char* accel_path=null) {
16380 gtk_menu_set_accel_path(&this, accel_path);
16382 void set_active(uint index_) {
16383 gtk_menu_set_active(&this, index_);
16386 // Informs GTK+ on which monitor a menu should be popped up.
16387 // See gdk_screen_get_monitor_geometry().
16388 // This function should be called from a #GtkMenuPositionFunc if the
16389 // menu should not appear on the same monitor as the pointer. This
16390 // information can't be reliably inferred from the coordinates returned
16391 // by a #GtkMenuPositionFunc, since, for very long menus, these coordinates
16392 // may extend beyond the monitor boundaries or even the screen boundaries.
16393 // <monitor_num>: the number of the monitor on which the menu should be popped up
16394 void set_monitor(int monitor_num) {
16395 gtk_menu_set_monitor(&this, monitor_num);
16398 // Sets whether the menu should reserve space for drawing toggles
16399 // or icons, regardless of their actual presence.
16400 // <reserve_toggle_size>: whether to reserve size for toggles
16401 void set_reserve_toggle_size(int reserve_toggle_size) {
16402 gtk_menu_set_reserve_toggle_size(&this, reserve_toggle_size);
16405 // Sets the #GdkScreen on which the menu will be displayed.
16406 // <screen>: a #GdkScreen, or %NULL if the screen should be determined by the widget the menu is attached to.
16407 void set_screen(Gdk2.Screen* screen=null) {
16408 gtk_menu_set_screen(&this, screen);
16410 void set_tearoff_state(int torn_off) {
16411 gtk_menu_set_tearoff_state(&this, torn_off);
16414 // Sets the title string for the menu. The title is displayed when the menu
16415 // is shown as a tearoff menu. If @title is %NULL, the menu will see if it is
16416 // attached to a parent menu item, and if so it will try to use the same text as
16417 // that menu item's label.
16418 // <title>: a string containing the title for the menu.
16419 void set_title(char* title) {
16420 gtk_menu_set_title(&this, title);
16422 extern (C) alias static void function (Menu* this_, ScrollType* object, void* user_data=null) signal_move_scroll;
16424 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16425 return super_.signal_connect!name(cb, data, cf);
16428 ulong signal_connect(string name:"move-scroll", CB/*:signal_move_scroll*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16429 return signal_connect_data(&this, cast(char*)"move-scroll",
16430 cast(GObject2.Callback)cb, data, null, cf);
16434 struct MenuBar /* : MenuShell */ {
16435 alias menu_shell this;
16436 alias menu_shell super_;
16437 alias menu_shell menushell;
16438 MenuShell menu_shell;
16440 static MenuBar* new_() {
16441 return gtk_menu_bar_new();
16444 // Retrieves the current child pack direction of the menubar.
16445 // See gtk_menu_bar_set_child_pack_direction().
16446 // RETURNS: the child pack direction
16447 PackDirection get_child_pack_direction() {
16448 return gtk_menu_bar_get_child_pack_direction(&this);
16451 // Retrieves the current pack direction of the menubar.
16452 // See gtk_menu_bar_set_pack_direction().
16453 // RETURNS: the pack direction
16454 PackDirection get_pack_direction() {
16455 return gtk_menu_bar_get_pack_direction(&this);
16458 // Sets how widgets should be packed inside the children of a menubar.
16459 // <child_pack_dir>: a new #GtkPackDirection
16460 void set_child_pack_direction(PackDirection child_pack_dir) {
16461 gtk_menu_bar_set_child_pack_direction(&this, child_pack_dir);
16464 // Sets how items should be packed inside a menubar.
16465 // <pack_dir>: a new #GtkPackDirection
16466 void set_pack_direction(PackDirection pack_dir) {
16467 gtk_menu_bar_set_pack_direction(&this, pack_dir);
16471 struct MenuBarClass {
16472 MenuShellClass parent_class;
16473 extern (C) void function () _gtk_reserved1;
16474 extern (C) void function () _gtk_reserved2;
16475 extern (C) void function () _gtk_reserved3;
16476 extern (C) void function () _gtk_reserved4;
16479 extern (C) alias void function (Widget* widget, void* user_data) MenuCallback;
16481 struct MenuClass {
16482 MenuShellClass parent_class;
16483 extern (C) void function () _gtk_reserved1;
16484 extern (C) void function () _gtk_reserved2;
16485 extern (C) void function () _gtk_reserved3;
16486 extern (C) void function () _gtk_reserved4;
16489 extern (C) alias void function (Widget* attach_widget, Menu* menu) MenuDetachFunc;
16491 enum MenuDirectionType {
16492 PARENT = 0,
16493 CHILD = 1,
16494 NEXT = 2,
16495 PREV = 3
16497 struct MenuEntry {
16498 char* path, accelerator;
16499 MenuCallback callback;
16500 void* callback_data;
16501 Widget* widget;
16504 struct MenuItem /* : Item */ {
16505 alias item this;
16506 alias item super_;
16507 Item item;
16508 Widget* submenu;
16509 Gdk2.Window* event_window;
16510 ushort toggle_size, accelerator_width;
16511 char* accel_path;
16512 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16513 uint, "show_submenu_indicator", 1,
16514 uint, "submenu_placement", 1,
16515 uint, "submenu_direction", 1,
16516 uint, "right_justify", 1,
16517 uint, "timer_from_keypress", 1,
16518 uint, "from_menubar", 1,
16519 uint, "__dummy32A", 26));
16520 uint timer;
16522 static MenuItem* new_() {
16523 return gtk_menu_item_new();
16525 static MenuItem* new_with_label(char* label) {
16526 return gtk_menu_item_new_with_label(label);
16529 // Creates a new #GtkMenuItem containing a label. The label
16530 // will be created using gtk_label_new_with_mnemonic(), so underscores
16531 // in @label indicate the mnemonic for the menu item.
16532 // RETURNS: a new #GtkMenuItem
16533 // <label>: The text of the button, with an underscore in front of the mnemonic character
16534 static MenuItem* new_with_mnemonic(char* label) {
16535 return gtk_menu_item_new_with_mnemonic(label);
16537 void activate() {
16538 gtk_menu_item_activate(&this);
16540 void deselect() {
16541 gtk_menu_item_deselect(&this);
16544 // Retrieve the accelerator path that was previously set on @menu_item.
16545 // See gtk_menu_item_set_accel_path() for details.
16546 // functionality, or %NULL if not set
16547 // RETURNS: the accelerator path corresponding to this menu item's
16548 char* get_accel_path() {
16549 return gtk_menu_item_get_accel_path(&this);
16552 // Sets @text on the @menu_item label
16553 // string used by the label, and must not be modified.
16554 // RETURNS: The text in the @menu_item label. This is the internal
16555 char* get_label() {
16556 return gtk_menu_item_get_label(&this);
16559 // Gets whether the menu item appears justified at the right
16560 // side of the menu bar.
16561 // far right if added to a menu bar.
16562 // RETURNS: %TRUE if the menu item will appear at the
16563 int get_right_justified() {
16564 return gtk_menu_item_get_right_justified(&this);
16567 // Gets the submenu underneath this menu item, if any.
16568 // See gtk_menu_item_set_submenu().
16569 // RETURNS: submenu for this menu item, or %NULL if none.
16570 Widget* get_submenu() {
16571 return gtk_menu_item_get_submenu(&this);
16574 // Checks if an underline in the text indicates the next character should be
16575 // used for the mnemonic accelerator key.
16576 // the mnemonic accelerator key.
16577 // RETURNS: %TRUE if an embedded underline in the label indicates
16578 int get_use_underline() {
16579 return gtk_menu_item_get_use_underline(&this);
16582 // Removes the widget's submenu.
16583 // should not be used in newly written code. Use
16584 // gtk_menu_item_set_submenu() instead.
16585 void remove_submenu() {
16586 gtk_menu_item_remove_submenu(&this);
16588 void select() {
16589 gtk_menu_item_select(&this);
16592 // Set the accelerator path on @menu_item, through which runtime changes of the
16593 // menu item's accelerator caused by the user can be identified and saved to
16594 // persistant storage (see gtk_accel_map_save() on this).
16595 // To setup a default accelerator for this menu item, call
16596 // gtk_accel_map_add_entry() with the same @accel_path.
16597 // See also gtk_accel_map_add_entry() on the specifics of accelerator paths,
16598 // and gtk_menu_set_accel_path() for a more convenient variant of this function.
16599 // This function is basically a convenience wrapper that handles calling
16600 // gtk_widget_set_accel_path() with the appropriate accelerator group for
16601 // the menu item.
16602 // Note that you do need to set an accelerator on the parent menu with
16603 // gtk_menu_set_accel_group() for this to work.
16604 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
16605 // pass a static string, you can save some memory by interning it first with
16606 // g_intern_static_string().
16607 // <accel_path>: accelerator path, corresponding to this menu item's functionality, or %NULL to unset the current path.
16608 void set_accel_path(char* accel_path=null) {
16609 gtk_menu_item_set_accel_path(&this, accel_path);
16612 // Sets @text on the @menu_item label
16613 // <label>: the text you want to set
16614 void set_label(char* label) {
16615 gtk_menu_item_set_label(&this, label);
16618 // Sets whether the menu item appears justified at the right
16619 // side of a menu bar. This was traditionally done for "Help" menu
16620 // items, but is now considered a bad idea. (If the widget
16621 // layout is reversed for a right-to-left language like Hebrew
16622 // or Arabic, right-justified-menu-items appear at the left.)
16623 // <right_justified>: if %TRUE the menu item will appear at the far right if added to a menu bar.
16624 void set_right_justified(int right_justified) {
16625 gtk_menu_item_set_right_justified(&this, right_justified);
16628 // Sets or replaces the menu item's submenu, or removes it when a %NULL
16629 // submenu is passed.
16630 // <submenu>: the submenu, or %NULL
16631 void set_submenu(Widget* submenu=null) {
16632 gtk_menu_item_set_submenu(&this, submenu);
16635 // If true, an underline in the text indicates the next character should be
16636 // used for the mnemonic accelerator key.
16637 // <setting>: %TRUE if underlines in the text indicate mnemonics
16638 void set_use_underline(int setting) {
16639 gtk_menu_item_set_use_underline(&this, setting);
16641 void toggle_size_allocate(int allocation) {
16642 gtk_menu_item_toggle_size_allocate(&this, allocation);
16644 void toggle_size_request(int* requisition) {
16645 gtk_menu_item_toggle_size_request(&this, requisition);
16647 extern (C) alias static void function (MenuItem* this_, void* user_data=null) signal_activate;
16649 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16650 return super_.signal_connect!name(cb, data, cf);
16653 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16654 return signal_connect_data(&this, cast(char*)"activate",
16655 cast(GObject2.Callback)cb, data, null, cf);
16657 extern (C) alias static void function (MenuItem* this_, void* user_data=null) signal_activate_item;
16658 ulong signal_connect(string name:"activate-item", CB/*:signal_activate_item*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16659 return signal_connect_data(&this, cast(char*)"activate-item",
16660 cast(GObject2.Callback)cb, data, null, cf);
16662 extern (C) alias static void function (MenuItem* this_, int object, void* user_data=null) signal_toggle_size_allocate;
16663 ulong signal_connect(string name:"toggle-size-allocate", CB/*:signal_toggle_size_allocate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16664 return signal_connect_data(&this, cast(char*)"toggle-size-allocate",
16665 cast(GObject2.Callback)cb, data, null, cf);
16667 extern (C) alias static void function (MenuItem* this_, void* object, void* user_data=null) signal_toggle_size_request;
16668 ulong signal_connect(string name:"toggle-size-request", CB/*:signal_toggle_size_request*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16669 return signal_connect_data(&this, cast(char*)"toggle-size-request",
16670 cast(GObject2.Callback)cb, data, null, cf);
16674 struct MenuItemClass {
16675 ItemClass parent_class;
16676 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16677 uint, "hide_on_activate", 1,
16678 uint, "__dummy32A", 31));
16679 extern (C) void function (MenuItem* menu_item) activate;
16680 extern (C) void function (MenuItem* menu_item) activate_item;
16681 extern (C) void function (MenuItem* menu_item, int* requisition) toggle_size_request;
16682 extern (C) void function (MenuItem* menu_item, int allocation) toggle_size_allocate;
16683 // <label>: the text you want to set
16684 extern (C) void function (MenuItem* menu_item, char* label) set_label;
16685 // RETURNS: The text in the @menu_item label. This is the internal
16686 extern (C) char* function (MenuItem* menu_item) get_label;
16687 extern (C) void function () _gtk_reserved1;
16688 extern (C) void function () _gtk_reserved2;
16691 extern (C) alias void function (Menu* menu, int* x, int* y, int* push_in, void* user_data) MenuPositionFunc;
16693 struct MenuShell /* : Container */ {
16694 alias container this;
16695 alias container super_;
16696 Container container;
16697 GLib2.List* children;
16698 Widget* active_menu_item, parent_menu_shell;
16699 uint button;
16700 uint activate_time;
16701 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16702 uint, "active", 1,
16703 uint, "have_grab", 1,
16704 uint, "have_xgrab", 1,
16705 uint, "ignore_leave", 1,
16706 uint, "menu_flag", 1,
16707 uint, "ignore_enter", 1,
16708 uint, "keyboard_mode", 1,
16709 uint, "__dummy32A", 25));
16711 void activate_item(Widget* menu_item, int force_deactivate) {
16712 gtk_menu_shell_activate_item(&this, menu_item, force_deactivate);
16714 void append(Widget* child) {
16715 gtk_menu_shell_append(&this, child);
16717 // Cancels the selection within the menu shell.
16718 void cancel() {
16719 gtk_menu_shell_cancel(&this);
16721 void deactivate() {
16722 gtk_menu_shell_deactivate(&this);
16724 void deselect() {
16725 gtk_menu_shell_deselect(&this);
16728 // Returns %TRUE if the menu shell will take the keyboard focus on popup.
16729 // RETURNS: %TRUE if the menu shell will take the keyboard focus on popup.
16730 int get_take_focus() {
16731 return gtk_menu_shell_get_take_focus(&this);
16733 void insert(Widget* child, int position) {
16734 gtk_menu_shell_insert(&this, child, position);
16736 void prepend(Widget* child) {
16737 gtk_menu_shell_prepend(&this, child);
16740 // Select the first visible or selectable child of the menu shell;
16741 // don't select tearoff items unless the only item is a tearoff
16742 // item.
16743 // <search_sensitive>: if %TRUE, search for the first selectable menu item, otherwise select nothing if the first item isn't sensitive. This should be %FALSE if the menu is being popped up initially.
16744 void select_first(int search_sensitive) {
16745 gtk_menu_shell_select_first(&this, search_sensitive);
16747 void select_item(Widget* menu_item) {
16748 gtk_menu_shell_select_item(&this, menu_item);
16751 // If @take_focus is %TRUE (the default) the menu shell will take the keyboard
16752 // focus so that it will receive all keyboard events which is needed to enable
16753 // keyboard navigation in menus.
16754 // Setting @take_focus to %FALSE is useful only for special applications
16755 // like virtual keyboard implementations which should not take keyboard
16756 // focus.
16757 // The @take_focus state of a menu or menu bar is automatically propagated
16758 // to submenus whenever a submenu is popped up, so you don't have to worry
16759 // about recursively setting it for your entire menu hierarchy. Only when
16760 // programmatically picking a submenu and popping it up manually, the
16761 // Note that setting it to %FALSE has side-effects:
16762 // If the focus is in some other app, it keeps the focus and keynav in
16763 // the menu doesn't work. Consequently, keynav on the menu will only
16764 // work if the focus is on some toplevel owned by the onscreen keyboard.
16765 // To avoid confusing the user, menus with @take_focus set to %FALSE
16766 // should not display mnemonics or accelerators, since it cannot be
16767 // guaranteed that they will work.
16768 // See also gdk_keyboard_grab()
16769 // <take_focus>: %TRUE if the menu shell should take the keyboard focus on popup.
16770 void set_take_focus(int take_focus) {
16771 gtk_menu_shell_set_take_focus(&this, take_focus);
16773 extern (C) alias static void function (MenuShell* this_, c_int object, void* user_data=null) signal_activate_current;
16775 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16776 return super_.signal_connect!name(cb, data, cf);
16779 ulong signal_connect(string name:"activate-current", CB/*:signal_activate_current*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16780 return signal_connect_data(&this, cast(char*)"activate-current",
16781 cast(GObject2.Callback)cb, data, null, cf);
16783 extern (C) alias static void function (MenuShell* this_, void* user_data=null) signal_cancel;
16784 ulong signal_connect(string name:"cancel", CB/*:signal_cancel*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16785 return signal_connect_data(&this, cast(char*)"cancel",
16786 cast(GObject2.Callback)cb, data, null, cf);
16788 extern (C) alias static void function (MenuShell* this_, DirectionType* object, void* user_data=null) signal_cycle_focus;
16789 ulong signal_connect(string name:"cycle-focus", CB/*:signal_cycle_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16790 return signal_connect_data(&this, cast(char*)"cycle-focus",
16791 cast(GObject2.Callback)cb, data, null, cf);
16793 extern (C) alias static void function (MenuShell* this_, void* user_data=null) signal_deactivate;
16794 ulong signal_connect(string name:"deactivate", CB/*:signal_deactivate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16795 return signal_connect_data(&this, cast(char*)"deactivate",
16796 cast(GObject2.Callback)cb, data, null, cf);
16798 extern (C) alias static void function (MenuShell* this_, MenuDirectionType* object, void* user_data=null) signal_move_current;
16799 ulong signal_connect(string name:"move-current", CB/*:signal_move_current*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16800 return signal_connect_data(&this, cast(char*)"move-current",
16801 cast(GObject2.Callback)cb, data, null, cf);
16804 // The ::move-selected signal is emitted to move the selection to
16805 // another item.
16806 // RETURNS: %TRUE to stop the signal emission, %FALSE to continue
16807 // <distance>: +1 to move to the next item, -1 to move to the previous
16808 extern (C) alias static c_int function (MenuShell* this_, int distance, void* user_data=null) signal_move_selected;
16809 ulong signal_connect(string name:"move-selected", CB/*:signal_move_selected*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16810 return signal_connect_data(&this, cast(char*)"move-selected",
16811 cast(GObject2.Callback)cb, data, null, cf);
16813 extern (C) alias static void function (MenuShell* this_, void* user_data=null) signal_selection_done;
16814 ulong signal_connect(string name:"selection-done", CB/*:signal_selection_done*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16815 return signal_connect_data(&this, cast(char*)"selection-done",
16816 cast(GObject2.Callback)cb, data, null, cf);
16820 struct MenuShellClass {
16821 ContainerClass parent_class;
16822 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16823 uint, "submenu_placement", 1,
16824 uint, "__dummy32A", 31));
16825 extern (C) void function (MenuShell* menu_shell) deactivate;
16826 extern (C) void function (MenuShell* menu_shell) selection_done;
16827 extern (C) void function (MenuShell* menu_shell, MenuDirectionType direction) move_current;
16828 extern (C) void function (MenuShell* menu_shell, int force_hide) activate_current;
16829 extern (C) void function (MenuShell* menu_shell) cancel;
16830 extern (C) void function (MenuShell* menu_shell, Widget* menu_item) select_item;
16831 extern (C) void function (MenuShell* menu_shell, Widget* child, int position) insert;
16832 extern (C) int function (MenuShell* menu_shell) get_popup_delay;
16833 extern (C) int function (MenuShell* menu_shell, int distance) move_selected;
16834 extern (C) void function () _gtk_reserved1;
16835 extern (C) void function () _gtk_reserved2;
16838 struct MenuToolButton /* : ToolButton */ {
16839 alias parent this;
16840 alias parent super_;
16841 alias parent toolbutton;
16842 ToolButton parent;
16843 private MenuToolButtonPrivate* priv;
16846 // Creates a new #GtkMenuToolButton using @icon_widget as icon and
16847 // RETURNS: the new #GtkMenuToolButton
16848 // <icon_widget>: a widget that will be used as icon widget, or %NULL
16849 // <label>: a string that will be used as label, or %NULL
16850 static MenuToolButton* new_(Widget* icon_widget=null, char* label=null) {
16851 return gtk_menu_tool_button_new(icon_widget, label);
16854 // Creates a new #GtkMenuToolButton.
16855 // The new #GtkMenuToolButton will contain an icon and label from
16856 // the stock item indicated by @stock_id.
16857 // RETURNS: the new #GtkMenuToolButton
16858 // <stock_id>: the name of a stock item
16859 static MenuToolButton* new_from_stock(char* stock_id) {
16860 return gtk_menu_tool_button_new_from_stock(stock_id);
16863 // Gets the #GtkMenu associated with #GtkMenuToolButton.
16864 // with #GtkMenuToolButton
16865 // RETURNS: the #GtkMenu associated
16866 Widget* get_menu() {
16867 return gtk_menu_tool_button_get_menu(&this);
16870 // Sets the #GtkTooltips object to be used for arrow button which
16871 // pops up the menu. See gtk_tool_item_set_tooltip() for setting
16872 // a tooltip on the whole #GtkMenuToolButton.
16873 // instead.
16874 // <tooltips>: the #GtkTooltips object to be used
16875 // <tip_text>: text to be used as tooltip text for tool_item
16876 // <tip_private>: text to be used as private tooltip text
16877 void set_arrow_tooltip(Tooltips* tooltips, char* tip_text=null, char* tip_private=null) {
16878 gtk_menu_tool_button_set_arrow_tooltip(&this, tooltips, tip_text, tip_private);
16881 // Sets the tooltip markup text to be used as tooltip for the arrow button
16882 // which pops up the menu. See gtk_tool_item_set_tooltip() for setting a
16883 // tooltip on the whole #GtkMenuToolButton.
16884 // <markup>: markup text to be used as tooltip text for button's arrow button
16885 void set_arrow_tooltip_markup(char* markup) {
16886 gtk_menu_tool_button_set_arrow_tooltip_markup(&this, markup);
16889 // Sets the tooltip text to be used as tooltip for the arrow button which
16890 // pops up the menu. See gtk_tool_item_set_tooltip() for setting a tooltip
16891 // on the whole #GtkMenuToolButton.
16892 // <text>: text to be used as tooltip text for button's arrow button
16893 void set_arrow_tooltip_text(char* text) {
16894 gtk_menu_tool_button_set_arrow_tooltip_text(&this, text);
16897 // Sets the #GtkMenu that is popped up when the user clicks on the arrow.
16898 // If @menu is NULL, the arrow button becomes insensitive.
16899 // <menu>: the #GtkMenu associated with #GtkMenuToolButton
16900 void set_menu(Widget* menu) {
16901 gtk_menu_tool_button_set_menu(&this, menu);
16904 // The ::show-menu signal is emitted before the menu is shown.
16905 // It can be used to populate the menu on demand, using
16906 // gtk_menu_tool_button_get_menu().
16907 // Note that even if you populate the menu dynamically in this way,
16908 // you must set an empty menu on the #GtkMenuToolButton beforehand,
16909 // since the arrow is made insensitive if the menu is not set.
16910 extern (C) alias static void function (MenuToolButton* this_, void* user_data=null) signal_show_menu;
16912 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16913 return super_.signal_connect!name(cb, data, cf);
16916 ulong signal_connect(string name:"show-menu", CB/*:signal_show_menu*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16917 return signal_connect_data(&this, cast(char*)"show-menu",
16918 cast(GObject2.Callback)cb, data, null, cf);
16922 struct MenuToolButtonClass {
16923 ToolButtonClass parent_class;
16924 extern (C) void function (MenuToolButton* button) show_menu;
16925 extern (C) void function () _gtk_reserved1;
16926 extern (C) void function () _gtk_reserved2;
16927 extern (C) void function () _gtk_reserved3;
16928 extern (C) void function () _gtk_reserved4;
16931 struct MenuToolButtonPrivate {
16935 // #GtkMessageDialog presents a dialog with an image representing the type of
16936 // message (Error, Question, etc.) alongside some message text. It's simply a
16937 // convenience widget; you could construct the equivalent of #GtkMessageDialog
16938 // from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
16939 // The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
16940 // you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
16941 // makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
16942 // returns when any dialog button is clicked.
16943 // <example>
16944 // <title>A modal dialog.</title>
16945 // <programlisting>
16946 // dialog = gtk_message_dialog_new (main_application_window,
16947 // GTK_DIALOG_DESTROY_WITH_PARENT,
16948 // GTK_MESSAGE_ERROR,
16949 // GTK_BUTTONS_CLOSE,
16950 // "Error loading file '&percnt;s': &percnt;s",
16951 // filename, g_strerror (errno));
16952 // gtk_dialog_run (GTK_DIALOG (dialog));
16953 // gtk_widget_destroy (dialog);
16954 // </programlisting>
16955 // </example>
16956 // You might do a non-modal #GtkMessageDialog as follows:
16957 // <example>
16958 // <title>A non-modal dialog.</title>
16959 // <programlisting>
16960 // dialog = gtk_message_dialog_new (main_application_window,
16961 // GTK_DIALOG_DESTROY_WITH_PARENT,
16962 // GTK_MESSAGE_ERROR,
16963 // GTK_BUTTONS_CLOSE,
16964 // "Error loading file '&percnt;s': &percnt;s",
16965 // filename, g_strerror (errno));
16966 // /&ast; Destroy the dialog when the user responds to it (e.g. clicks a button) &ast;/
16967 // g_signal_connect_swapped (dialog, "response",
16968 // G_CALLBACK (gtk_widget_destroy),
16969 // dialog);
16970 // </programlisting>
16971 // </example>
16972 // <refsect2 id="GtkMessageDialog-BUILDER-UI">
16973 // <title>GtkMessageDialog as GtkBuildable</title>
16974 // <para>
16975 // The GtkMessageDialog implementation of the GtkBuildable interface exposes
16976 // the message area as an internal child with the name "message_area".
16977 // </para>
16978 // </refsect2>
16979 struct MessageDialog /* : Dialog */ {
16980 alias parent_instance this;
16981 alias parent_instance super_;
16982 alias parent_instance dialog;
16983 Dialog parent_instance;
16984 private Widget* image, label;
16987 // Unintrospectable constructor: new() / gtk_message_dialog_new()
16988 // Creates a new message dialog, which is a simple dialog with an icon
16989 // indicating the dialog type (error, warning, etc.) and some text the
16990 // user may want to see. When the user clicks a button a "response"
16991 // signal is emitted with response IDs from #GtkResponseType. See
16992 // #GtkDialog for more details.
16993 // RETURNS: a new #GtkMessageDialog
16994 // <parent>: transient parent, or %NULL for none
16995 // <flags>: flags
16996 // <type>: type of message
16997 // <buttons>: set of buttons to use
16998 // <message_format>: printf()-style format string, or %NULL
16999 alias gtk_message_dialog_new new_; // Variadic
17001 // Unintrospectable constructor: new_with_markup() / gtk_message_dialog_new_with_markup()
17002 // Creates a new message dialog, which is a simple dialog with an icon
17003 // indicating the dialog type (error, warning, etc.) and some text which
17004 // is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
17005 // When the user clicks a button a "response" signal is emitted with
17006 // response IDs from #GtkResponseType. See #GtkDialog for more details.
17007 // Special XML characters in the printf() arguments passed to this
17008 // function will automatically be escaped as necessary.
17009 // (See g_markup_printf_escaped() for how this is implemented.)
17010 // Usually this is what you want, but if you have an existing
17011 // Pango markup string that you want to use literally as the
17012 // label, then you need to use gtk_message_dialog_set_markup()
17013 // instead, since you can't pass the markup string either
17014 // as the format (it might contain '%' characters) or as a string
17015 // argument.
17016 // |[
17017 // GtkWidget *dialog;
17018 // dialog = gtk_message_dialog_new (main_application_window,
17019 // GTK_DIALOG_DESTROY_WITH_PARENT,
17020 // GTK_MESSAGE_ERROR,
17021 // GTK_BUTTONS_CLOSE,
17022 // NULL);
17023 // gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
17024 // markup);
17025 // ]|
17026 // RETURNS: a new #GtkMessageDialog
17027 // <parent>: transient parent, or %NULL for none
17028 // <flags>: flags
17029 // <type>: type of message
17030 // <buttons>: set of buttons to use
17031 // <message_format>: printf()-style format string, or %NULL
17032 alias gtk_message_dialog_new_with_markup new_with_markup; // Variadic
17034 // Unintrospectable method: format_secondary_markup() / gtk_message_dialog_format_secondary_markup()
17035 // Sets the secondary text of the message dialog to be @message_format (with
17036 // printf()-style), which is marked up with the
17037 // <link linkend="PangoMarkupFormat">Pango text markup language</link>.
17038 // Note that setting a secondary text makes the primary text become
17039 // bold, unless you have provided explicit markup.
17040 // Due to an oversight, this function does not escape special XML characters
17041 // like gtk_message_dialog_new_with_markup() does. Thus, if the arguments
17042 // may contain special XML characters, you should use g_markup_printf_escaped()
17043 // to escape it.
17044 // <informalexample><programlisting>
17045 // gchar *msg;
17046 // msg = g_markup_printf_escaped (message_format, ...);
17047 // gtk_message_dialog_format_secondary_markup (message_dialog, "&percnt;s", msg);
17048 // g_free (msg);
17049 // </programlisting></informalexample>
17050 // <message_format>: printf()-style markup string (see
17051 /+ Not available -- variadic methods unsupported - use the C function directly.
17052 alias gtk_message_dialog_format_secondary_markup format_secondary_markup; // Variadic
17055 // Unintrospectable method: format_secondary_text() / gtk_message_dialog_format_secondary_text()
17056 // Sets the secondary text of the message dialog to be @message_format
17057 // (with printf()-style).
17058 // Note that setting a secondary text makes the primary text become
17059 // bold, unless you have provided explicit markup.
17060 // <message_format>: printf()-style format string, or %NULL
17061 /+ Not available -- variadic methods unsupported - use the C function directly.
17062 alias gtk_message_dialog_format_secondary_text format_secondary_text; // Variadic
17065 // Gets the dialog's image.
17066 // RETURNS: the dialog's image
17067 Widget* get_image() {
17068 return gtk_message_dialog_get_image(&this);
17071 // Returns the message area of the dialog. This is the box where the
17072 // dialog's primary and secondary labels are packed. You can add your
17073 // own extra content to that box and it will appear below those labels,
17074 // on the right side of the dialog's image (or on the left for right-to-left
17075 // languages). See gtk_dialog_get_content_area() for the corresponding
17076 // function in the parent #GtkDialog.
17077 // "message area" in the @message_dialog.
17078 // RETURNS: A #GtkVBox corresponding to the
17079 Widget* get_message_area() {
17080 return gtk_message_dialog_get_message_area(&this);
17083 // Sets the dialog's image to @image.
17084 // <image>: the image
17085 void set_image(Widget* image) {
17086 gtk_message_dialog_set_image(&this, image);
17089 // Sets the text of the message dialog to be @str, which is marked
17090 // up with the <link linkend="PangoMarkupFormat">Pango text markup
17091 // language</link>.
17092 // <str>: markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
17093 void set_markup(char* str) {
17094 gtk_message_dialog_set_markup(&this, str);
17098 struct MessageDialogClass {
17099 DialogClass parent_class;
17100 extern (C) void function () _gtk_reserved1;
17101 extern (C) void function () _gtk_reserved2;
17102 extern (C) void function () _gtk_reserved3;
17103 extern (C) void function () _gtk_reserved4;
17106 // The type of message being displayed in the dialog.
17107 enum MessageType {
17108 INFO = 0,
17109 WARNING = 1,
17110 QUESTION = 2,
17111 ERROR = 3,
17112 OTHER = 4
17114 enum MetricType {
17115 PIXELS = 0,
17116 INCHES = 1,
17117 CENTIMETERS = 2
17119 struct Misc /* : Widget */ {
17120 alias widget this;
17121 alias widget super_;
17122 Widget widget;
17123 float xalign, yalign;
17124 ushort xpad, ypad;
17127 // Gets the X and Y alignment of the widget within its allocation.
17128 // See gtk_misc_set_alignment().
17129 // <xalign>: location to store X alignment of @misc, or %NULL
17130 // <yalign>: location to store Y alignment of @misc, or %NULL
17131 void get_alignment(/*out*/ float* xalign=null, /*out*/ float* yalign=null) {
17132 gtk_misc_get_alignment(&this, xalign, yalign);
17135 // Gets the padding in the X and Y directions of the widget.
17136 // See gtk_misc_set_padding().
17137 // <xpad>: location to store padding in the X direction, or %NULL
17138 // <ypad>: location to store padding in the Y direction, or %NULL
17139 void get_padding(/*out*/ int* xpad=null, /*out*/ int* ypad=null) {
17140 gtk_misc_get_padding(&this, xpad, ypad);
17142 void set_alignment(float xalign, float yalign) {
17143 gtk_misc_set_alignment(&this, xalign, yalign);
17145 void set_padding(int xpad, int ypad) {
17146 gtk_misc_set_padding(&this, xpad, ypad);
17150 struct MiscClass {
17151 WidgetClass parent_class;
17154 extern (C) alias void function (Gdk2.Display* display) ModuleDisplayInitFunc;
17156 extern (C) alias void function (int* argc, char*** argv) ModuleInitFunc;
17158 // This should not be accessed directly. Use the accessor functions below.
17159 struct MountOperation /* : Gio.MountOperation */ {
17160 alias parent_instance this;
17161 alias parent_instance super_;
17162 alias parent_instance mountoperation;
17163 Gio2.MountOperation parent_instance;
17164 MountOperationPrivate* priv;
17167 // Creates a new #GtkMountOperation
17168 // RETURNS: a new #GtkMountOperation
17169 // <parent>: transient parent of the window, or %NULL
17170 static MountOperation* /*new*/ new_(Window* parent=null) {
17171 return gtk_mount_operation_new(parent);
17174 // Gets the transient parent used by the #GtkMountOperation
17175 // RETURNS: the transient parent for windows shown by @op
17176 Window* get_parent() {
17177 return gtk_mount_operation_get_parent(&this);
17180 // Gets the screen on which windows of the #GtkMountOperation
17181 // will be shown.
17182 // RETURNS: the screen on which windows of @op are shown
17183 Gdk2.Screen* get_screen() {
17184 return gtk_mount_operation_get_screen(&this);
17187 // Returns whether the #GtkMountOperation is currently displaying
17188 // a window.
17189 // RETURNS: %TRUE if @op is currently displaying a window
17190 int is_showing() {
17191 return gtk_mount_operation_is_showing(&this);
17194 // Sets the transient parent for windows shown by the
17195 // #GtkMountOperation.
17196 // <parent>: transient parent of the window, or %NULL
17197 void set_parent(Window* parent=null) {
17198 gtk_mount_operation_set_parent(&this, parent);
17201 // Sets the screen to show windows of the #GtkMountOperation on.
17202 // <screen>: a #GdkScreen
17203 void set_screen(Gdk2.Screen* screen) {
17204 gtk_mount_operation_set_screen(&this, screen);
17208 struct MountOperationClass {
17209 Gio2.MountOperationClass parent_class;
17210 extern (C) void function () _gtk_reserved1;
17211 extern (C) void function () _gtk_reserved2;
17212 extern (C) void function () _gtk_reserved3;
17213 extern (C) void function () _gtk_reserved4;
17216 struct MountOperationPrivate {
17219 enum MovementStep {
17220 LOGICAL_POSITIONS = 0,
17221 VISUAL_POSITIONS = 1,
17222 WORDS = 2,
17223 DISPLAY_LINES = 3,
17224 DISPLAY_LINE_ENDS = 4,
17225 PARAGRAPHS = 5,
17226 PARAGRAPH_ENDS = 6,
17227 PAGES = 7,
17228 BUFFER_ENDS = 8,
17229 HORIZONTAL_PAGES = 9
17231 enum int NO_TEXT_INPUT_MOD_MASK = 0;
17232 struct Notebook /* : Container */ {
17233 alias container this;
17234 alias container super_;
17235 Container container;
17236 NotebookPage* cur_page;
17237 GLib2.List* children, first_tab, focus_tab;
17238 Widget* menu;
17239 Gdk2.Window* event_window;
17240 uint timer;
17241 ushort tab_hborder, tab_vborder;
17242 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17243 uint, "show_tabs", 1,
17244 uint, "homogeneous", 1,
17245 uint, "show_border", 1,
17246 uint, "tab_pos", 2,
17247 uint, "scrollable", 1,
17248 uint, "in_child", 3,
17249 uint, "click_child", 3,
17250 uint, "button", 2,
17251 uint, "need_timer", 1,
17252 uint, "child_has_focus", 1,
17253 uint, "have_visible_child", 1,
17254 uint, "focus_out", 1,
17255 uint, "has_before_previous", 1,
17256 uint, "has_before_next", 1,
17257 uint, "has_after_previous", 1,
17258 uint, "has_after_next", 1,
17259 uint, "__dummy32A", 10));
17262 // Creates a new #GtkNotebook widget with no pages.
17263 // RETURNS: the newly created #GtkNotebook
17264 static Notebook* new_() {
17265 return gtk_notebook_new();
17268 // Unintrospectable function: set_window_creation_hook() / gtk_notebook_set_window_creation_hook()
17269 // Installs a global function used to create a window
17270 // when a detached tab is dropped in an empty area.
17271 // <func>: the #GtkNotebookWindowCreationFunc, or %NULL
17272 // <data>: user data for @func
17273 // <destroy>: Destroy notifier for @data, or %NULL
17274 static void set_window_creation_hook(NotebookWindowCreationFunc func, void* data, GLib2.DestroyNotify destroy=null) {
17275 gtk_notebook_set_window_creation_hook(func, data, destroy);
17278 // Appends a page to @notebook.
17279 // page in the notebook, or -1 if function fails
17280 // RETURNS: the index (starting from 0) of the appended
17281 // <child>: the #GtkWidget to use as the contents of the page.
17282 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
17283 int append_page(Widget* child, Widget* tab_label=null) {
17284 return gtk_notebook_append_page(&this, child, tab_label);
17287 // Appends a page to @notebook, specifying the widget to use as the
17288 // label in the popup menu.
17289 // page in the notebook, or -1 if function fails
17290 // RETURNS: the index (starting from 0) of the appended
17291 // <child>: the #GtkWidget to use as the contents of the page.
17292 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
17293 // <menu_label>: the widget to use as a label for the page-switch menu, if that is enabled. If %NULL, and @tab_label is a #GtkLabel or %NULL, then the menu label will be a newly created label with the same text as @tab_label; If @tab_label is not a #GtkLabel, @menu_label must be specified if the page-switch menu is to be used.
17294 int append_page_menu(Widget* child, Widget* tab_label=null, Widget* menu_label=null) {
17295 return gtk_notebook_append_page_menu(&this, child, tab_label, menu_label);
17298 // Gets one of the action widgets. See gtk_notebook_set_action_widget().
17299 // or %NULL when this action widget has not been set
17300 // RETURNS: The action widget with the given @pack_type
17301 // <pack_type>: pack type of the action widget to receive
17302 Widget* get_action_widget(PackType pack_type) {
17303 return gtk_notebook_get_action_widget(&this, pack_type);
17306 // Returns the page number of the current page.
17307 // page in the notebook. If the notebook has no pages, then
17308 // -1 will be returned.
17309 // RETURNS: the index (starting from 0) of the current
17310 int get_current_page() {
17311 return gtk_notebook_get_current_page(&this);
17314 // Gets the current group identificator pointer for @notebook.
17315 // or %NULL if none is set.
17316 // RETURNS: the group identificator,
17317 void* get_group() {
17318 return gtk_notebook_get_group(&this);
17321 // Gets the current group identificator for @notebook.
17322 // RETURNS: the group identificator, or -1 if none is set.
17323 int get_group_id() {
17324 return gtk_notebook_get_group_id(&this);
17327 // Gets the current group name for @notebook.
17328 // Note that this funtion can emphasis not be used
17329 // together with gtk_notebook_set_group() or
17330 // gtk_notebook_set_group_id().
17331 // or %NULL if none is set.
17332 char* get_group_name() {
17333 return gtk_notebook_get_group_name(&this);
17336 // Retrieves the menu label widget of the page containing @child.
17337 // notebook page does not have a menu label other than the
17338 // default (the tab label).
17339 // RETURNS: the menu label, or %NULL if the
17340 // <child>: a widget contained in a page of @notebook
17341 Widget* get_menu_label(Widget* child) {
17342 return gtk_notebook_get_menu_label(&this, child);
17345 // Retrieves the text of the menu label for the page containing
17346 // widget does not have a menu label other than
17347 // the default menu label, or the menu label widget
17348 // is not a #GtkLabel. The string is owned by
17349 // the widget and must not be freed.
17350 // RETURNS: the text of the tab label, or %NULL if the
17351 // <child>: the child widget of a page of the notebook.
17352 char* get_menu_label_text(Widget* child) {
17353 return gtk_notebook_get_menu_label_text(&this, child);
17356 // Gets the number of pages in a notebook.
17357 // RETURNS: the number of pages in the notebook.
17358 int get_n_pages() {
17359 return gtk_notebook_get_n_pages(&this);
17362 // Returns the child widget contained in page number @page_num.
17363 // out of bounds.
17364 // RETURNS: the child widget, or %NULL if @page_num is
17365 // <page_num>: the index of a page in the notebook, or -1 to get the last page.
17366 Widget* get_nth_page(int page_num) {
17367 return gtk_notebook_get_nth_page(&this, page_num);
17370 // Returns whether the tab label area has arrows for scrolling. See
17371 // gtk_notebook_set_scrollable().
17372 // RETURNS: %TRUE if arrows for scrolling are present
17373 int get_scrollable() {
17374 return gtk_notebook_get_scrollable(&this);
17377 // Returns whether a bevel will be drawn around the notebook pages. See
17378 // gtk_notebook_set_show_border().
17379 // RETURNS: %TRUE if the bevel is drawn
17380 int get_show_border() {
17381 return gtk_notebook_get_show_border(&this);
17384 // Returns whether the tabs of the notebook are shown. See
17385 // gtk_notebook_set_show_tabs().
17386 // RETURNS: %TRUE if the tabs are shown
17387 int get_show_tabs() {
17388 return gtk_notebook_get_show_tabs(&this);
17391 // Returns whether the tab contents can be detached from @notebook.
17392 // RETURNS: TRUE if the tab is detachable.
17393 // <child>: a child #GtkWidget
17394 int get_tab_detachable(Widget* child) {
17395 return gtk_notebook_get_tab_detachable(&this, child);
17398 // Returns the horizontal width of a tab border.
17399 // RETURNS: horizontal width of a tab border
17400 ushort get_tab_hborder() {
17401 return gtk_notebook_get_tab_hborder(&this);
17404 // Returns the tab label widget for the page @child. %NULL is returned
17405 // if @child is not in @notebook or if no tab label has specifically
17406 // been set for @child.
17407 // RETURNS: the tab label
17408 // <child>: the page
17409 Widget* get_tab_label(Widget* child) {
17410 return gtk_notebook_get_tab_label(&this, child);
17413 // Retrieves the text of the tab label for the page containing
17414 // tab label widget is not a #GtkLabel. The
17415 // string is owned by the widget and must not
17416 // be freed.
17417 // RETURNS: the text of the tab label, or %NULL if the
17418 // <child>: a widget contained in a page of @notebook
17419 char* get_tab_label_text(Widget* child) {
17420 return gtk_notebook_get_tab_label_text(&this, child);
17423 // Gets the edge at which the tabs for switching pages in the
17424 // notebook are drawn.
17425 // RETURNS: the edge at which the tabs are drawn
17426 PositionType get_tab_pos() {
17427 return gtk_notebook_get_tab_pos(&this);
17430 // Gets whether the tab can be reordered via drag and drop or not.
17431 // RETURNS: %TRUE if the tab is reorderable.
17432 // <child>: a child #GtkWidget
17433 int get_tab_reorderable(Widget* child) {
17434 return gtk_notebook_get_tab_reorderable(&this, child);
17437 // Returns the vertical width of a tab border.
17438 // RETURNS: vertical width of a tab border
17439 ushort get_tab_vborder() {
17440 return gtk_notebook_get_tab_vborder(&this);
17443 // Insert a page into @notebook at the given position.
17444 // page in the notebook, or -1 if function fails
17445 // RETURNS: the index (starting from 0) of the inserted
17446 // <child>: the #GtkWidget to use as the contents of the page.
17447 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
17448 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
17449 int insert_page(Widget* child, Widget* tab_label, int position) {
17450 return gtk_notebook_insert_page(&this, child, tab_label, position);
17453 // Insert a page into @notebook at the given position, specifying
17454 // the widget to use as the label in the popup menu.
17455 // page in the notebook
17456 // RETURNS: the index (starting from 0) of the inserted
17457 // <child>: the #GtkWidget to use as the contents of the page.
17458 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
17459 // <menu_label>: the widget to use as a label for the page-switch menu, if that is enabled. If %NULL, and @tab_label is a #GtkLabel or %NULL, then the menu label will be a newly created label with the same text as @tab_label; If @tab_label is not a #GtkLabel, @menu_label must be specified if the page-switch menu is to be used.
17460 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
17461 int insert_page_menu(Widget* child, Widget* tab_label, Widget* menu_label, int position) {
17462 return gtk_notebook_insert_page_menu(&this, child, tab_label, menu_label, position);
17465 // Switches to the next page. Nothing happens if the current page is
17466 // the last page.
17467 void next_page() {
17468 gtk_notebook_next_page(&this);
17471 // Finds the index of the page which contains the given child
17472 // widget.
17473 // -1 if @child is not in the notebook.
17474 // RETURNS: the index of the page containing @child, or
17475 // <child>: a #GtkWidget
17476 int page_num(Widget* child) {
17477 return gtk_notebook_page_num(&this, child);
17479 // Disables the popup menu.
17480 void popup_disable() {
17481 gtk_notebook_popup_disable(&this);
17483 // the tab labels, a menu with all the pages will be popped up.
17484 void popup_enable() {
17485 gtk_notebook_popup_enable(&this);
17488 // Prepends a page to @notebook.
17489 // page in the notebook, or -1 if function fails
17490 // RETURNS: the index (starting from 0) of the prepended
17491 // <child>: the #GtkWidget to use as the contents of the page.
17492 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
17493 int prepend_page(Widget* child, Widget* tab_label=null) {
17494 return gtk_notebook_prepend_page(&this, child, tab_label);
17497 // Prepends a page to @notebook, specifying the widget to use as the
17498 // label in the popup menu.
17499 // page in the notebook, or -1 if function fails
17500 // RETURNS: the index (starting from 0) of the prepended
17501 // <child>: the #GtkWidget to use as the contents of the page.
17502 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
17503 // <menu_label>: the widget to use as a label for the page-switch menu, if that is enabled. If %NULL, and @tab_label is a #GtkLabel or %NULL, then the menu label will be a newly created label with the same text as @tab_label; If @tab_label is not a #GtkLabel, @menu_label must be specified if the page-switch menu is to be used.
17504 int prepend_page_menu(Widget* child, Widget* tab_label=null, Widget* menu_label=null) {
17505 return gtk_notebook_prepend_page_menu(&this, child, tab_label, menu_label);
17508 // Switches to the previous page. Nothing happens if the current page
17509 // is the first page.
17510 void prev_page() {
17511 gtk_notebook_prev_page(&this);
17514 // Query the packing attributes for the tab label of the page
17515 // containing @child.
17516 // #GtkNotebook:tab-fill child properties instead.
17517 // <child>: the page
17518 // <expand>: location to store the expand value (or NULL)
17519 // <fill>: location to store the fill value (or NULL)
17520 // <pack_type>: location to store the pack_type (or NULL)
17521 void query_tab_label_packing(Widget* child, int* expand, int* fill, PackType* pack_type) {
17522 gtk_notebook_query_tab_label_packing(&this, child, expand, fill, pack_type);
17525 // Removes a page from the notebook given its index
17526 // in the notebook.
17527 // <page_num>: the index of a notebook page, starting from 0. If -1, the last page will be removed.
17528 void remove_page(int page_num) {
17529 gtk_notebook_remove_page(&this, page_num);
17532 // Reorders the page containing @child, so that it appears in position
17533 // children in the list or negative, @child will be moved to the end
17534 // of the list.
17535 // <child>: the child to move
17536 // <position>: the new position, or -1 to move to the end
17537 void reorder_child(Widget* child, int position) {
17538 gtk_notebook_reorder_child(&this, child, position);
17541 // Sets @widget as one of the action widgets. Depending on the pack type
17542 // the widget will be placed before or after the tabs. You can use
17543 // a #GtkBox if you need to pack more than one widget on the same side.
17544 // Note that action widgets are "internal" children of the notebook and thus
17545 // not included in the list returned from gtk_container_foreach().
17546 // <widget>: a #GtkWidget
17547 // <pack_type>: pack type of the action widget
17548 void set_action_widget(Widget* widget, PackType pack_type) {
17549 gtk_notebook_set_action_widget(&this, widget, pack_type);
17552 // Switches to the page number @page_num.
17553 // Note that due to historical reasons, GtkNotebook refuses
17554 // to switch to a page unless the child widget is visible.
17555 // Therefore, it is recommended to show child widgets before
17556 // adding them to a notebook.
17557 // <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.
17558 void set_current_page(int page_num) {
17559 gtk_notebook_set_current_page(&this, page_num);
17562 // Sets a group identificator pointer for @notebook, notebooks sharing
17563 // the same group identificator pointer will be able to exchange tabs
17564 // via drag and drop. A notebook with a %NULL group identificator will
17565 // not be able to exchange tabs with any other notebook.
17566 // <group>: a pointer to identify the notebook group, or %NULL to unset it
17567 void set_group(void* group=null) {
17568 gtk_notebook_set_group(&this, group);
17571 // Sets an group identificator for @notebook, notebooks sharing
17572 // the same group identificator will be able to exchange tabs
17573 // via drag and drop. A notebook with group identificator -1 will
17574 // not be able to exchange tabs with any other notebook.
17575 // <group_id>: a group identificator, or -1 to unset it
17576 void set_group_id(int group_id) {
17577 gtk_notebook_set_group_id(&this, group_id);
17580 // Sets a group name for @notebook.
17581 // Notebooks with the same name will be able to exchange tabs
17582 // via drag and drop. A notebook with a %NULL group name will
17583 // not be able to exchange tabs with any other notebook.
17584 void set_group_name(char* group_name) {
17585 gtk_notebook_set_group_name(&this, group_name);
17588 // Sets whether the tabs must have all the same size or not.
17589 // <homogeneous>: %TRUE if all tabs should be the same size.
17590 void set_homogeneous_tabs(int homogeneous) {
17591 gtk_notebook_set_homogeneous_tabs(&this, homogeneous);
17594 // Changes the menu label for the page containing @child.
17595 // <child>: the child widget
17596 // <menu_label>: the menu label, or NULL for default
17597 void set_menu_label(Widget* child, Widget* menu_label=null) {
17598 gtk_notebook_set_menu_label(&this, child, menu_label);
17601 // Creates a new label and sets it as the menu label of @child.
17602 // <child>: the child widget
17603 // <menu_text>: the label text
17604 void set_menu_label_text(Widget* child, char* menu_text) {
17605 gtk_notebook_set_menu_label_text(&this, child, menu_text);
17608 // Sets whether the tab label area will have arrows for scrolling if
17609 // there are too many tabs to fit in the area.
17610 // <scrollable>: %TRUE if scroll arrows should be added
17611 void set_scrollable(int scrollable) {
17612 gtk_notebook_set_scrollable(&this, scrollable);
17615 // Sets whether a bevel will be drawn around the notebook pages.
17616 // This only has a visual effect when the tabs are not shown.
17617 // See gtk_notebook_set_show_tabs().
17618 // <show_border>: %TRUE if a bevel should be drawn around the notebook.
17619 void set_show_border(int show_border) {
17620 gtk_notebook_set_show_border(&this, show_border);
17623 // Sets whether to show the tabs for the notebook or not.
17624 // <show_tabs>: %TRUE if the tabs should be shown.
17625 void set_show_tabs(int show_tabs) {
17626 gtk_notebook_set_show_tabs(&this, show_tabs);
17629 // Sets the width the border around the tab labels
17630 // in a notebook. This is equivalent to calling
17631 // gtk_notebook_set_tab_hborder (@notebook, @border_width) followed
17632 // by gtk_notebook_set_tab_vborder (@notebook, @border_width).
17633 // <border_width>: width of the border around the tab labels.
17634 void set_tab_border(uint border_width) {
17635 gtk_notebook_set_tab_border(&this, border_width);
17638 // Sets whether the tab can be detached from @notebook to another
17639 // notebook or widget.
17640 // Note that 2 notebooks must share a common group identificator
17641 // (see gtk_notebook_set_group_id ()) to allow automatic tabs
17642 // interchange between them.
17643 // If you want a widget to interact with a notebook through DnD
17644 // (i.e.: accept dragged tabs from it) it must be set as a drop
17645 // destination and accept the target "GTK_NOTEBOOK_TAB". The notebook
17646 // will fill the selection with a GtkWidget** pointing to the child
17647 // widget that corresponds to the dropped tab.
17648 // |[
17649 // static void
17650 // on_drop_zone_drag_data_received (GtkWidget *widget,
17651 // GdkDragContext *context,
17652 // gint x,
17653 // gint y,
17654 // GtkSelectionData *selection_data,
17655 // guint info,
17656 // guint time,
17657 // gpointer user_data)
17658 // {
17659 // GtkWidget *notebook;
17660 // GtkWidget **child;
17661 // notebook = gtk_drag_get_source_widget (context);
17662 // child = (void*) selection_data->data;
17663 // process_widget (*child);
17664 // gtk_container_remove (GTK_CONTAINER (notebook), *child);
17665 // }
17666 // ]|
17667 // If you want a notebook to accept drags from other widgets,
17668 // you will have to set your own DnD code to do it.
17669 // <child>: a child #GtkWidget
17670 // <detachable>: whether the tab is detachable or not
17671 void set_tab_detachable(Widget* child, int detachable) {
17672 gtk_notebook_set_tab_detachable(&this, child, detachable);
17675 // Sets the width of the horizontal border of tab labels.
17676 // <tab_hborder>: width of the horizontal border of tab labels.
17677 void set_tab_hborder(uint tab_hborder) {
17678 gtk_notebook_set_tab_hborder(&this, tab_hborder);
17681 // Changes the tab label for @child. If %NULL is specified
17682 // for @tab_label, then the page will have the label 'page N'.
17683 // <child>: the page
17684 // <tab_label>: the tab label widget to use, or %NULL for default tab label.
17685 void set_tab_label(Widget* child, Widget* tab_label=null) {
17686 gtk_notebook_set_tab_label(&this, child, tab_label);
17689 // Sets the packing parameters for the tab label of the page
17690 // containing @child. See gtk_box_pack_start() for the exact meaning
17691 // of the parameters.
17692 // #GtkNotebook:tab-fill child properties instead.
17693 // Modifying the packing of the tab label is a deprecated feature and
17694 // shouldn't be done anymore.
17695 // <child>: the child widget
17696 // <expand>: whether to expand the tab label or not
17697 // <fill>: whether the tab label should fill the allocated area or not
17698 // <pack_type>: the position of the tab label
17699 void set_tab_label_packing(Widget* child, int expand, int fill, PackType pack_type) {
17700 gtk_notebook_set_tab_label_packing(&this, child, expand, fill, pack_type);
17703 // Creates a new label and sets it as the tab label for the page
17704 // containing @child.
17705 // <child>: the page
17706 // <tab_text>: the label text
17707 void set_tab_label_text(Widget* child, char* tab_text) {
17708 gtk_notebook_set_tab_label_text(&this, child, tab_text);
17711 // Sets the edge at which the tabs for switching pages in the
17712 // notebook are drawn.
17713 // <pos>: the edge to draw the tabs at.
17714 void set_tab_pos(PositionType pos) {
17715 gtk_notebook_set_tab_pos(&this, pos);
17718 // Sets whether the notebook tab can be reordered
17719 // via drag and drop or not.
17720 // <child>: a child #GtkWidget
17721 // <reorderable>: whether the tab is reorderable or not.
17722 void set_tab_reorderable(Widget* child, int reorderable) {
17723 gtk_notebook_set_tab_reorderable(&this, child, reorderable);
17726 // Sets the width of the vertical border of tab labels.
17727 // <tab_vborder>: width of the vertical border of tab labels.
17728 void set_tab_vborder(uint tab_vborder) {
17729 gtk_notebook_set_tab_vborder(&this, tab_vborder);
17731 extern (C) alias static c_int function (Notebook* this_, int object, void* user_data=null) signal_change_current_page;
17733 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17734 return super_.signal_connect!name(cb, data, cf);
17737 ulong signal_connect(string name:"change-current-page", CB/*:signal_change_current_page*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17738 return signal_connect_data(&this, cast(char*)"change-current-page",
17739 cast(GObject2.Callback)cb, data, null, cf);
17742 // The ::create-window signal is emitted when a detachable
17743 // tab is dropped on the root window.
17744 // A handler for this signal can create a window containing
17745 // a notebook where the tab will be attached. It is also
17746 // responsible for moving/resizing the window and adding the
17747 // necessary properties to the notebook (e.g. the
17748 // #GtkNotebook:group ).
17749 // The default handler uses the global window creation hook,
17750 // if one has been set with gtk_notebook_set_window_creation_hook().
17751 // added to, or %NULL.
17752 // RETURNS: a #GtkNotebook that @page should be
17753 // <page>: the tab of @notebook that is being detached
17754 // <x>: the X coordinate where the drop happens
17755 // <y>: the Y coordinate where the drop happens
17756 extern (C) alias static Notebook* function (Notebook* this_, Widget* page, int x, int y, void* user_data=null) signal_create_window;
17757 ulong signal_connect(string name:"create-window", CB/*:signal_create_window*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17758 return signal_connect_data(&this, cast(char*)"create-window",
17759 cast(GObject2.Callback)cb, data, null, cf);
17761 extern (C) alias static c_int function (Notebook* this_, NotebookTab* object, void* user_data=null) signal_focus_tab;
17762 ulong signal_connect(string name:"focus-tab", CB/*:signal_focus_tab*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17763 return signal_connect_data(&this, cast(char*)"focus-tab",
17764 cast(GObject2.Callback)cb, data, null, cf);
17766 extern (C) alias static void function (Notebook* this_, DirectionType* object, void* user_data=null) signal_move_focus_out;
17767 ulong signal_connect(string name:"move-focus-out", CB/*:signal_move_focus_out*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17768 return signal_connect_data(&this, cast(char*)"move-focus-out",
17769 cast(GObject2.Callback)cb, data, null, cf);
17772 // the ::page-added signal is emitted in the notebook
17773 // right after a page is added to the notebook.
17774 // <child>: the child #GtkWidget affected
17775 // <page_num>: the new page number for @child
17776 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) signal_page_added;
17777 ulong signal_connect(string name:"page-added", CB/*:signal_page_added*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17778 return signal_connect_data(&this, cast(char*)"page-added",
17779 cast(GObject2.Callback)cb, data, null, cf);
17782 // the ::page-removed signal is emitted in the notebook
17783 // right after a page is removed from the notebook.
17784 // <child>: the child #GtkWidget affected
17785 // <page_num>: the @child page number
17786 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) signal_page_removed;
17787 ulong signal_connect(string name:"page-removed", CB/*:signal_page_removed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17788 return signal_connect_data(&this, cast(char*)"page-removed",
17789 cast(GObject2.Callback)cb, data, null, cf);
17792 // the ::page-reordered signal is emitted in the notebook
17793 // right after a page has been reordered.
17794 // <child>: the child #GtkWidget affected
17795 // <page_num>: the new page number for @child
17796 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) signal_page_reordered;
17797 ulong signal_connect(string name:"page-reordered", CB/*:signal_page_reordered*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17798 return signal_connect_data(&this, cast(char*)"page-reordered",
17799 cast(GObject2.Callback)cb, data, null, cf);
17801 extern (C) alias static c_int function (Notebook* this_, DirectionType* object, c_int p0, void* user_data=null) signal_reorder_tab;
17802 ulong signal_connect(string name:"reorder-tab", CB/*:signal_reorder_tab*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17803 return signal_connect_data(&this, cast(char*)"reorder-tab",
17804 cast(GObject2.Callback)cb, data, null, cf);
17806 extern (C) alias static c_int function (Notebook* this_, c_int object, void* user_data=null) signal_select_page;
17807 ulong signal_connect(string name:"select-page", CB/*:signal_select_page*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17808 return signal_connect_data(&this, cast(char*)"select-page",
17809 cast(GObject2.Callback)cb, data, null, cf);
17811 extern (C) alias static void function (Notebook* this_, void* object, c_uint p0, void* user_data=null) signal_switch_page;
17812 ulong signal_connect(string name:"switch-page", CB/*:signal_switch_page*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17813 return signal_connect_data(&this, cast(char*)"switch-page",
17814 cast(GObject2.Callback)cb, data, null, cf);
17818 struct NotebookClass {
17819 ContainerClass parent_class;
17820 extern (C) void function (Notebook* notebook, NotebookPage* page, uint page_num) switch_page;
17821 extern (C) int function (Notebook* notebook, int move_focus) select_page;
17822 extern (C) int function (Notebook* notebook, NotebookTab type) focus_tab;
17823 extern (C) int function (Notebook* notebook, int offset) change_current_page;
17824 extern (C) void function (Notebook* notebook, DirectionType direction) move_focus_out;
17825 extern (C) int function (Notebook* notebook, DirectionType direction, int move_to_last) reorder_tab;
17826 extern (C) int function (Notebook* notebook, Widget* child, Widget* tab_label, Widget* menu_label, int position) insert_page;
17827 // Unintrospectable functionp: create_window() / ()
17828 extern (C) Notebook* function (Notebook* notebook, Widget* page, int x, int y) create_window;
17829 extern (C) void function () _gtk_reserved1;
17832 struct NotebookPage {
17835 enum NotebookTab {
17836 FIRST = 0,
17837 LAST = 1
17839 // Unintrospectable callback: NotebookWindowCreationFunc() / ()
17840 extern (C) alias Notebook* function (Notebook* source, Widget* page, int x, int y, void* data) NotebookWindowCreationFunc;
17842 enum NumberUpLayout {
17843 GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM = 0,
17844 GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP = 1,
17845 GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM = 2,
17846 GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP = 3,
17847 GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT = 4,
17848 GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT = 5,
17849 GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT = 6,
17850 GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT = 7
17852 struct Object /* : GObject.InitiallyUnowned */ {
17853 alias parent_instance this;
17854 alias parent_instance super_;
17855 alias parent_instance initiallyunowned;
17856 GObject2.InitiallyUnowned parent_instance;
17857 uint flags;
17859 // Unintrospectable constructor: new() / gtk_object_new()
17860 alias gtk_object_new new_; // Variadic
17861 static void add_arg_type(char* arg_name, Type arg_type, uint arg_flags, uint arg_id) {
17862 gtk_object_add_arg_type(arg_name, arg_type, arg_flags, arg_id);
17864 void destroy() {
17865 gtk_object_destroy(&this);
17867 // Unintrospectable method: get() / gtk_object_get()
17868 /+ Not available -- variadic methods unsupported - use the C function directly.
17869 alias gtk_object_get get; // Variadic
17871 // Unintrospectable method: get_data() / gtk_object_get_data()
17872 void* get_data(char* key) {
17873 return gtk_object_get_data(&this, key);
17875 // Unintrospectable method: get_data_by_id() / gtk_object_get_data_by_id()
17876 void* get_data_by_id(GLib2.Quark data_id) {
17877 return gtk_object_get_data_by_id(&this, data_id);
17879 // Unintrospectable method: get_user_data() / gtk_object_get_user_data()
17880 void* get_user_data() {
17881 return gtk_object_get_user_data(&this);
17883 // Unintrospectable method: ref() / gtk_object_ref()
17884 Object* ref_() {
17885 return gtk_object_ref(&this);
17887 void remove_data(char* key) {
17888 gtk_object_remove_data(&this, key);
17890 void remove_data_by_id(GLib2.Quark data_id) {
17891 gtk_object_remove_data_by_id(&this, data_id);
17893 void remove_no_notify(char* key) {
17894 gtk_object_remove_no_notify(&this, key);
17896 void remove_no_notify_by_id(GLib2.Quark key_id) {
17897 gtk_object_remove_no_notify_by_id(&this, key_id);
17899 // Unintrospectable method: set() / gtk_object_set()
17900 /+ Not available -- variadic methods unsupported - use the C function directly.
17901 alias gtk_object_set set; // Variadic
17903 void set_data(char* key, void* data) {
17904 gtk_object_set_data(&this, key, data);
17906 void set_data_by_id(GLib2.Quark data_id, void* data) {
17907 gtk_object_set_data_by_id(&this, data_id, data);
17909 void set_data_by_id_full(GLib2.Quark data_id, void* data, GLib2.DestroyNotify destroy) {
17910 gtk_object_set_data_by_id_full(&this, data_id, data, destroy);
17912 void set_data_full(char* key, void* data, GLib2.DestroyNotify destroy) {
17913 gtk_object_set_data_full(&this, key, data, destroy);
17915 void set_user_data(void* data) {
17916 gtk_object_set_user_data(&this, data);
17918 void sink() {
17919 gtk_object_sink(&this);
17921 void unref() {
17922 gtk_object_unref(&this);
17924 void weakref(GLib2.DestroyNotify notify, void* data) {
17925 gtk_object_weakref(&this, notify, data);
17927 void weakunref(GLib2.DestroyNotify notify, void* data) {
17928 gtk_object_weakunref(&this, notify, data);
17930 extern (C) alias static void function (Object* this_, void* user_data=null) signal_destroy;
17932 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17933 return super_.signal_connect!name(cb, data, cf);
17936 ulong signal_connect(string name:"destroy", CB/*:signal_destroy*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17937 return signal_connect_data(&this, cast(char*)"destroy",
17938 cast(GObject2.Callback)cb, data, null, cf);
17942 struct ObjectClass {
17943 GObject2.InitiallyUnownedClass parent_class;
17944 extern (C) void function (Object* object, Arg* arg, uint arg_id) set_arg;
17945 extern (C) void function (Object* object, Arg* arg, uint arg_id) get_arg;
17946 extern (C) void function (Object* object) destroy;
17949 enum ObjectFlags {
17950 IN_DESTRUCTION = 1,
17951 FLOATING = 2,
17952 RESERVED_1 = 4,
17953 RESERVED_2 = 8
17956 // #GtkOffscreenWindow is strictly intended to be used for obtaining
17957 // snapshots of widgets that are not part of a normal widget hierarchy.
17958 // It differs from gtk_widget_get_snapshot() in that the widget you
17959 // want to get a snapshot of need not be displayed on the user's screen
17960 // as a part of a widget hierarchy. However, since #GtkOffscreenWindow
17961 // is a toplevel widget you cannot obtain snapshots of a full window
17962 // with it since you cannot pack a toplevel widget in another toplevel.
17963 // The idea is to take a widget and manually set the state of it,
17964 // add it to a #GtkOffscreenWindow and then retrieve the snapshot
17965 // as a #GdkPixmap or #GdkPixbuf.
17966 // #GtkOffscreenWindow derives from #GtkWindow only as an implementation
17967 // detail. Applications should not use any API specific to #GtkWindow
17968 // to operate on this object. It should be treated as a #GtkBin that
17969 // has no parent widget.
17970 // When contained offscreen widgets are redrawn, #GtkOffscreenWindow
17971 // will emit a #GtkWidget::damage-event signal.
17972 struct OffscreenWindow /* : Window */ {
17973 alias parent_object this;
17974 alias parent_object super_;
17975 alias parent_object window;
17976 Window parent_object;
17979 // Creates a toplevel container widget that is used to retrieve
17980 // snapshots of widgets without showing them on the screen. For
17981 // widgets that are on the screen and part of a normal widget
17982 // hierarchy, gtk_widget_get_snapshot() can be used instead.
17983 // RETURNS: A pointer to a #GtkWidget
17984 static OffscreenWindow* new_() {
17985 return gtk_offscreen_window_new();
17988 // Retrieves a snapshot of the contained widget in the form of
17989 // a #GdkPixbuf. This is a new pixbuf with a reference count of 1,
17990 // and the application should unreference it once it is no longer
17991 // needed.
17992 // RETURNS: A #GdkPixbuf pointer, or %NULL.
17993 GdkPixbuf2.Pixbuf* /*new*/ get_pixbuf() {
17994 return gtk_offscreen_window_get_pixbuf(&this);
17997 // Retrieves a snapshot of the contained widget in the form of
17998 // a #GdkPixmap. If you need to keep this around over window
17999 // resizes then you should add a reference to it.
18000 // or %NULL.
18001 // RETURNS: A #GdkPixmap pointer to the offscreen pixmap,
18002 Gdk2.Pixmap* get_pixmap() {
18003 return gtk_offscreen_window_get_pixmap(&this);
18007 struct OffscreenWindowClass {
18008 WindowClass parent_class;
18011 struct OldEditable /* : Widget */ {
18012 alias widget this;
18013 alias widget super_;
18014 Widget widget;
18015 uint current_pos, selection_start_pos, selection_end_pos;
18016 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18017 uint, "has_selection", 1,
18018 uint, "editable", 1,
18019 uint, "visible", 1,
18020 uint, "__dummy32A", 29));
18021 private char* clipboard_text;
18023 // Emits the ::changed signal on @old_editable.
18024 void changed() {
18025 gtk_old_editable_changed(&this);
18028 // Claims or gives up ownership of the selection.
18029 // <claim>: if %TRUE, claim ownership of the selection, if %FALSE, give up ownership
18030 // <time_>: timestamp for this operation
18031 void claim_selection(int claim, uint time_) {
18032 gtk_old_editable_claim_selection(&this, claim, time_);
18034 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_activate;
18036 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18037 return super_.signal_connect!name(cb, data, cf);
18040 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18041 return signal_connect_data(&this, cast(char*)"activate",
18042 cast(GObject2.Callback)cb, data, null, cf);
18044 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_copy_clipboard;
18045 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18046 return signal_connect_data(&this, cast(char*)"copy-clipboard",
18047 cast(GObject2.Callback)cb, data, null, cf);
18049 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_cut_clipboard;
18050 ulong signal_connect(string name:"cut-clipboard", CB/*:signal_cut_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18051 return signal_connect_data(&this, cast(char*)"cut-clipboard",
18052 cast(GObject2.Callback)cb, data, null, cf);
18054 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_kill_char;
18055 ulong signal_connect(string name:"kill-char", CB/*:signal_kill_char*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18056 return signal_connect_data(&this, cast(char*)"kill-char",
18057 cast(GObject2.Callback)cb, data, null, cf);
18059 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_kill_line;
18060 ulong signal_connect(string name:"kill-line", CB/*:signal_kill_line*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18061 return signal_connect_data(&this, cast(char*)"kill-line",
18062 cast(GObject2.Callback)cb, data, null, cf);
18064 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_kill_word;
18065 ulong signal_connect(string name:"kill-word", CB/*:signal_kill_word*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18066 return signal_connect_data(&this, cast(char*)"kill-word",
18067 cast(GObject2.Callback)cb, data, null, cf);
18069 extern (C) alias static void function (OldEditable* this_, int object, int p0, void* user_data=null) signal_move_cursor;
18070 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18071 return signal_connect_data(&this, cast(char*)"move-cursor",
18072 cast(GObject2.Callback)cb, data, null, cf);
18074 extern (C) alias static void function (OldEditable* this_, int object, int p0, void* user_data=null) signal_move_page;
18075 ulong signal_connect(string name:"move-page", CB/*:signal_move_page*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18076 return signal_connect_data(&this, cast(char*)"move-page",
18077 cast(GObject2.Callback)cb, data, null, cf);
18079 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_move_to_column;
18080 ulong signal_connect(string name:"move-to-column", CB/*:signal_move_to_column*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18081 return signal_connect_data(&this, cast(char*)"move-to-column",
18082 cast(GObject2.Callback)cb, data, null, cf);
18084 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_move_to_row;
18085 ulong signal_connect(string name:"move-to-row", CB/*:signal_move_to_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18086 return signal_connect_data(&this, cast(char*)"move-to-row",
18087 cast(GObject2.Callback)cb, data, null, cf);
18089 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_move_word;
18090 ulong signal_connect(string name:"move-word", CB/*:signal_move_word*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18091 return signal_connect_data(&this, cast(char*)"move-word",
18092 cast(GObject2.Callback)cb, data, null, cf);
18094 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_paste_clipboard;
18095 ulong signal_connect(string name:"paste-clipboard", CB/*:signal_paste_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18096 return signal_connect_data(&this, cast(char*)"paste-clipboard",
18097 cast(GObject2.Callback)cb, data, null, cf);
18099 extern (C) alias static void function (OldEditable* this_, c_int object, void* user_data=null) signal_set_editable;
18100 ulong signal_connect(string name:"set-editable", CB/*:signal_set_editable*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18101 return signal_connect_data(&this, cast(char*)"set-editable",
18102 cast(GObject2.Callback)cb, data, null, cf);
18106 struct OldEditableClass {
18107 WidgetClass parent_class;
18108 extern (C) void function (OldEditable* editable) activate;
18109 extern (C) void function (OldEditable* editable, int is_editable) set_editable;
18110 extern (C) void function (OldEditable* editable, int x, int y) move_cursor;
18111 extern (C) void function (OldEditable* editable, int n) move_word;
18112 extern (C) void function (OldEditable* editable, int x, int y) move_page;
18113 extern (C) void function (OldEditable* editable, int row) move_to_row;
18114 extern (C) void function (OldEditable* editable, int row) move_to_column;
18115 extern (C) void function (OldEditable* editable, int direction) kill_char;
18116 extern (C) void function (OldEditable* editable, int direction) kill_word;
18117 extern (C) void function (OldEditable* editable, int direction) kill_line;
18118 extern (C) void function (OldEditable* editable) cut_clipboard;
18119 extern (C) void function (OldEditable* editable) copy_clipboard;
18120 extern (C) void function (OldEditable* editable) paste_clipboard;
18121 extern (C) void function (OldEditable* editable, int start_pos, int end_pos) update_text;
18122 extern (C) char* /*new*/ function (OldEditable* editable, int start_pos, int end_pos) get_chars;
18123 extern (C) void function (OldEditable* editable, int start_pos, int end_pos) set_selection;
18124 extern (C) void function (OldEditable* editable, int position) set_position;
18127 struct OptionMenu /* : Button */ {
18128 alias button this;
18129 alias button super_;
18130 Button button;
18131 Widget* menu, menu_item;
18132 ushort width, height;
18134 static OptionMenu* new_() {
18135 return gtk_option_menu_new();
18138 // Retrieves the index of the currently selected menu item. The menu
18139 // items are numbered from top to bottom, starting with 0.
18140 // RETURNS: index of the selected menu item, or -1 if there are no menu items
18141 int get_history() {
18142 return gtk_option_menu_get_history(&this);
18144 // Unintrospectable method: get_menu() / gtk_option_menu_get_menu()
18145 Widget* get_menu() {
18146 return gtk_option_menu_get_menu(&this);
18148 void remove_menu() {
18149 gtk_option_menu_remove_menu(&this);
18151 void set_history(uint index_) {
18152 gtk_option_menu_set_history(&this, index_);
18154 void set_menu(Widget* menu) {
18155 gtk_option_menu_set_menu(&this, menu);
18157 extern (C) alias static void function (OptionMenu* this_, void* user_data=null) signal_changed;
18159 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18160 return super_.signal_connect!name(cb, data, cf);
18163 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18164 return signal_connect_data(&this, cast(char*)"changed",
18165 cast(GObject2.Callback)cb, data, null, cf);
18169 struct OptionMenuClass {
18170 ButtonClass parent_class;
18171 extern (C) void function (OptionMenu* option_menu) changed;
18172 extern (C) void function () _gtk_reserved1;
18173 extern (C) void function () _gtk_reserved2;
18174 extern (C) void function () _gtk_reserved3;
18175 extern (C) void function () _gtk_reserved4;
18178 struct Orientable {
18180 // Retrieves the orientation of the @orientable.
18181 // RETURNS: the orientation of the @orientable.
18182 Orientation get_orientation() {
18183 return gtk_orientable_get_orientation(&this);
18186 // Sets the orientation of the @orientable.
18187 // <orientation>: the orientable's new orientation.
18188 void set_orientation(Orientation orientation) {
18189 gtk_orientable_set_orientation(&this, orientation);
18193 struct OrientableIface {
18194 GObject2.TypeInterface base_iface;
18197 enum Orientation {
18198 HORIZONTAL = 0,
18199 VERTICAL = 1
18201 enum PAPER_NAME_A3 = "iso_a3";
18202 enum PAPER_NAME_A4 = "iso_a4";
18203 enum PAPER_NAME_A5 = "iso_a5";
18204 enum PAPER_NAME_B5 = "iso_b5";
18205 enum PAPER_NAME_EXECUTIVE = "na_executive";
18206 enum PAPER_NAME_LEGAL = "na_legal";
18207 enum PAPER_NAME_LETTER = "na_letter";
18208 enum int PARAM_READABLE = 0;
18209 enum int PARAM_READWRITE = 0;
18210 enum int PARAM_WRITABLE = 0;
18211 enum int PATH_PRIO_MASK = 15;
18212 enum PRINT_SETTINGS_COLLATE = "collate";
18213 enum PRINT_SETTINGS_DEFAULT_SOURCE = "default-source";
18214 enum PRINT_SETTINGS_DITHER = "dither";
18215 enum PRINT_SETTINGS_DUPLEX = "duplex";
18216 enum PRINT_SETTINGS_FINISHINGS = "finishings";
18217 enum PRINT_SETTINGS_MEDIA_TYPE = "media-type";
18218 enum PRINT_SETTINGS_NUMBER_UP = "number-up";
18219 enum PRINT_SETTINGS_NUMBER_UP_LAYOUT = "number-up-layout";
18220 enum PRINT_SETTINGS_N_COPIES = "n-copies";
18221 enum PRINT_SETTINGS_ORIENTATION = "orientation";
18222 enum PRINT_SETTINGS_OUTPUT_BIN = "output-bin";
18223 enum PRINT_SETTINGS_OUTPUT_FILE_FORMAT = "output-file-format";
18224 enum PRINT_SETTINGS_OUTPUT_URI = "output-uri";
18225 enum PRINT_SETTINGS_PAGE_RANGES = "page-ranges";
18226 enum PRINT_SETTINGS_PAGE_SET = "page-set";
18227 enum PRINT_SETTINGS_PAPER_FORMAT = "paper-format";
18228 enum PRINT_SETTINGS_PAPER_HEIGHT = "paper-height";
18229 enum PRINT_SETTINGS_PAPER_WIDTH = "paper-width";
18230 enum PRINT_SETTINGS_PRINTER = "printer";
18231 enum PRINT_SETTINGS_PRINTER_LPI = "printer-lpi";
18232 enum PRINT_SETTINGS_PRINT_PAGES = "print-pages";
18233 enum PRINT_SETTINGS_QUALITY = "quality";
18234 enum PRINT_SETTINGS_RESOLUTION = "resolution";
18235 enum PRINT_SETTINGS_RESOLUTION_X = "resolution-x";
18236 enum PRINT_SETTINGS_RESOLUTION_Y = "resolution-y";
18237 enum PRINT_SETTINGS_REVERSE = "reverse";
18238 enum PRINT_SETTINGS_SCALE = "scale";
18239 enum PRINT_SETTINGS_USE_COLOR = "use-color";
18240 enum PRINT_SETTINGS_WIN32_DRIVER_EXTRA = "win32-driver-extra";
18241 enum PRINT_SETTINGS_WIN32_DRIVER_VERSION = "win32-driver-version";
18242 enum int PRIORITY_REDRAW = 20;
18243 enum int PRIORITY_RESIZE = 10;
18244 enum PackDirection {
18245 LTR = 0,
18246 RTL = 1,
18247 TTB = 2,
18248 BTT = 3
18250 enum PackType {
18251 START = 0,
18252 END = 1
18254 enum PageOrientation {
18255 PORTRAIT = 0,
18256 LANDSCAPE = 1,
18257 REVERSE_PORTRAIT = 2,
18258 REVERSE_LANDSCAPE = 3
18260 struct PageRange {
18261 int start, end;
18264 enum PageSet {
18265 ALL = 0,
18266 EVEN = 1,
18267 ODD = 2
18269 struct PageSetup /* : GObject.Object */ {
18270 alias method_parent this;
18271 alias method_parent super_;
18272 alias method_parent object;
18273 GObject2.Object method_parent;
18276 // Creates a new #GtkPageSetup.
18277 // RETURNS: a new #GtkPageSetup.
18278 static PageSetup* /*new*/ new_() {
18279 return gtk_page_setup_new();
18282 // Reads the page setup from the file @file_name. Returns a
18283 // new #GtkPageSetup object with the restored page setup,
18284 // or %NULL if an error occurred. See gtk_page_setup_to_file().
18285 // RETURNS: the restored #GtkPageSetup
18286 // <file_name>: the filename to read the page setup from
18287 static PageSetup* /*new*/ new_from_file(char* file_name, GLib2.Error** error=null) {
18288 return gtk_page_setup_new_from_file(file_name, error);
18291 // Reads the page setup from the group @group_name in the key file
18292 // page setup, or %NULL if an error occurred.
18293 // RETURNS: the restored #GtkPageSetup
18294 // <key_file>: the #GKeyFile to retrieve the page_setup from
18295 // <group_name>: the name of the group in the key_file to read, or %NULL to use the default name "Page Setup"
18296 static PageSetup* /*new*/ new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
18297 return gtk_page_setup_new_from_key_file(key_file, group_name, error);
18300 // Copies a #GtkPageSetup.
18301 // RETURNS: a copy of @other
18302 PageSetup* /*new*/ copy() {
18303 return gtk_page_setup_copy(&this);
18306 // Gets the bottom margin in units of @unit.
18307 // RETURNS: the bottom margin
18308 // <unit>: the unit for the return value
18309 double get_bottom_margin(Unit unit) {
18310 return gtk_page_setup_get_bottom_margin(&this, unit);
18313 // Gets the left margin in units of @unit.
18314 // RETURNS: the left margin
18315 // <unit>: the unit for the return value
18316 double get_left_margin(Unit unit) {
18317 return gtk_page_setup_get_left_margin(&this, unit);
18320 // Gets the page orientation of the #GtkPageSetup.
18321 // RETURNS: the page orientation
18322 PageOrientation get_orientation() {
18323 return gtk_page_setup_get_orientation(&this);
18326 // Returns the page height in units of @unit.
18327 // Note that this function takes orientation and
18328 // margins into consideration.
18329 // See gtk_page_setup_get_paper_height().
18330 // RETURNS: the page height.
18331 // <unit>: the unit for the return value
18332 double get_page_height(Unit unit) {
18333 return gtk_page_setup_get_page_height(&this, unit);
18336 // Returns the page width in units of @unit.
18337 // Note that this function takes orientation and
18338 // margins into consideration.
18339 // See gtk_page_setup_get_paper_width().
18340 // RETURNS: the page width.
18341 // <unit>: the unit for the return value
18342 double get_page_width(Unit unit) {
18343 return gtk_page_setup_get_page_width(&this, unit);
18346 // Returns the paper height in units of @unit.
18347 // Note that this function takes orientation, but
18348 // not margins into consideration.
18349 // See gtk_page_setup_get_page_height().
18350 // RETURNS: the paper height.
18351 // <unit>: the unit for the return value
18352 double get_paper_height(Unit unit) {
18353 return gtk_page_setup_get_paper_height(&this, unit);
18356 // Gets the paper size of the #GtkPageSetup.
18357 // RETURNS: the paper size
18358 PaperSize* /*new*/ get_paper_size() {
18359 return gtk_page_setup_get_paper_size(&this);
18362 // Returns the paper width in units of @unit.
18363 // Note that this function takes orientation, but
18364 // not margins into consideration.
18365 // See gtk_page_setup_get_page_width().
18366 // RETURNS: the paper width.
18367 // <unit>: the unit for the return value
18368 double get_paper_width(Unit unit) {
18369 return gtk_page_setup_get_paper_width(&this, unit);
18372 // Gets the right margin in units of @unit.
18373 // RETURNS: the right margin
18374 // <unit>: the unit for the return value
18375 double get_right_margin(Unit unit) {
18376 return gtk_page_setup_get_right_margin(&this, unit);
18379 // Gets the top margin in units of @unit.
18380 // RETURNS: the top margin
18381 // <unit>: the unit for the return value
18382 double get_top_margin(Unit unit) {
18383 return gtk_page_setup_get_top_margin(&this, unit);
18386 // Reads the page setup from the file @file_name.
18387 // See gtk_page_setup_to_file().
18388 // RETURNS: %TRUE on success
18389 // <file_name>: the filename to read the page setup from
18390 int load_file(char* file_name, GLib2.Error** error=null) {
18391 return gtk_page_setup_load_file(&this, file_name, error);
18394 // Reads the page setup from the group @group_name in the key file
18395 // RETURNS: %TRUE on success
18396 // <key_file>: the #GKeyFile to retrieve the page_setup from
18397 // <group_name>: the name of the group in the key_file to read, or %NULL to use the default name "Page Setup"
18398 int load_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
18399 return gtk_page_setup_load_key_file(&this, key_file, group_name, error);
18402 // Sets the bottom margin of the #GtkPageSetup.
18403 // <margin>: the new bottom margin in units of @unit
18404 // <unit>: the units for @margin
18405 void set_bottom_margin(double margin, Unit unit) {
18406 gtk_page_setup_set_bottom_margin(&this, margin, unit);
18409 // Sets the left margin of the #GtkPageSetup.
18410 // <margin>: the new left margin in units of @unit
18411 // <unit>: the units for @margin
18412 void set_left_margin(double margin, Unit unit) {
18413 gtk_page_setup_set_left_margin(&this, margin, unit);
18416 // Sets the page orientation of the #GtkPageSetup.
18417 // <orientation>: a #GtkPageOrientation value
18418 void set_orientation(PageOrientation orientation) {
18419 gtk_page_setup_set_orientation(&this, orientation);
18422 // Sets the paper size of the #GtkPageSetup without
18423 // changing the margins. See
18424 // gtk_page_setup_set_paper_size_and_default_margins().
18425 // <size>: a #GtkPaperSize
18426 void set_paper_size(PaperSize* size) {
18427 gtk_page_setup_set_paper_size(&this, size);
18430 // Sets the paper size of the #GtkPageSetup and modifies
18431 // the margins according to the new paper size.
18432 // <size>: a #GtkPaperSize
18433 void set_paper_size_and_default_margins(PaperSize* size) {
18434 gtk_page_setup_set_paper_size_and_default_margins(&this, size);
18437 // Sets the right margin of the #GtkPageSetup.
18438 // <margin>: the new right margin in units of @unit
18439 // <unit>: the units for @margin
18440 void set_right_margin(double margin, Unit unit) {
18441 gtk_page_setup_set_right_margin(&this, margin, unit);
18444 // Sets the top margin of the #GtkPageSetup.
18445 // <margin>: the new top margin in units of @unit
18446 // <unit>: the units for @margin
18447 void set_top_margin(double margin, Unit unit) {
18448 gtk_page_setup_set_top_margin(&this, margin, unit);
18451 // This function saves the information from @setup to @file_name.
18452 // RETURNS: %TRUE on success
18453 // <file_name>: the file to save to
18454 int to_file(char* file_name, GLib2.Error** error=null) {
18455 return gtk_page_setup_to_file(&this, file_name, error);
18458 // This function adds the page setup from @setup to @key_file.
18459 // <key_file>: the #GKeyFile to save the page setup to
18460 // <group_name>: the group to add the settings to in @key_file, or %NULL to use the default name "Page Setup"
18461 void to_key_file(GLib2.KeyFile* key_file, char* group_name) {
18462 gtk_page_setup_to_key_file(&this, key_file, group_name);
18466 extern (C) alias void function (PageSetup* page_setup, void* data) PageSetupDoneFunc;
18468 struct Paned /* : Container */ {
18469 alias container this;
18470 alias container super_;
18471 Container container;
18472 Widget* child1, child2;
18473 Gdk2.Window* handle;
18474 Gdk2.GC* xor_gc;
18475 Gdk2.CursorType cursor_type;
18476 private Gdk2.Rectangle handle_pos;
18477 private int child1_size, last_allocation, min_position, max_position;
18478 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18479 uint, "position_set", 1,
18480 uint, "in_drag", 1,
18481 uint, "child1_shrink", 1,
18482 uint, "child1_resize", 1,
18483 uint, "child2_shrink", 1,
18484 uint, "child2_resize", 1,
18485 uint, "orientation", 1,
18486 uint, "in_recursion", 1,
18487 uint, "handle_prelit", 1,
18488 uint, "__dummy32A", 23));
18489 private Widget* last_child1_focus, last_child2_focus;
18490 private PanedPrivate* priv;
18491 private int drag_pos, original_position;
18493 void add1(Widget* child) {
18494 gtk_paned_add1(&this, child);
18496 void add2(Widget* child) {
18497 gtk_paned_add2(&this, child);
18499 void compute_position(int allocation, int child1_req, int child2_req) {
18500 gtk_paned_compute_position(&this, allocation, child1_req, child2_req);
18503 // Obtains the first child of the paned widget.
18504 // RETURNS: first child, or %NULL if it is not set.
18505 Widget* get_child1() {
18506 return gtk_paned_get_child1(&this);
18509 // Obtains the second child of the paned widget.
18510 // RETURNS: second child, or %NULL if it is not set.
18511 Widget* get_child2() {
18512 return gtk_paned_get_child2(&this);
18515 // Returns the #GdkWindow of the handle. This function is
18516 // useful when handling button or motion events because it
18517 // enables the callback to distinguish between the window
18518 // of the paned, a child and the handle.
18519 // RETURNS: the paned's handle window.
18520 Gdk2.Window* get_handle_window() {
18521 return gtk_paned_get_handle_window(&this);
18524 // Obtains the position of the divider between the two panes.
18525 // RETURNS: position of the divider
18526 int get_position() {
18527 return gtk_paned_get_position(&this);
18529 void pack1(Widget* child, int resize, int shrink) {
18530 gtk_paned_pack1(&this, child, resize, shrink);
18532 void pack2(Widget* child, int resize, int shrink) {
18533 gtk_paned_pack2(&this, child, resize, shrink);
18536 // Sets the position of the divider between the two panes.
18537 // <position>: pixel position of divider, a negative value means that the position is unset.
18538 void set_position(int position) {
18539 gtk_paned_set_position(&this, position);
18542 // The ::accept-position signal is a
18543 // <link linkend="keybinding-signals">keybinding signal</link>
18544 // which gets emitted to accept the current position of the handle when
18545 // moving it using key bindings.
18546 // The default binding for this signal is Return or Space.
18547 extern (C) alias static c_int function (Paned* this_, void* user_data=null) signal_accept_position;
18549 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18550 return super_.signal_connect!name(cb, data, cf);
18553 ulong signal_connect(string name:"accept-position", CB/*:signal_accept_position*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18554 return signal_connect_data(&this, cast(char*)"accept-position",
18555 cast(GObject2.Callback)cb, data, null, cf);
18558 // The ::cancel-position signal is a
18559 // <link linkend="keybinding-signals">keybinding signal</link>
18560 // which gets emitted to cancel moving the position of the handle using key
18561 // bindings. The position of the handle will be reset to the value prior to
18562 // moving it.
18563 // The default binding for this signal is Escape.
18564 extern (C) alias static c_int function (Paned* this_, void* user_data=null) signal_cancel_position;
18565 ulong signal_connect(string name:"cancel-position", CB/*:signal_cancel_position*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18566 return signal_connect_data(&this, cast(char*)"cancel-position",
18567 cast(GObject2.Callback)cb, data, null, cf);
18570 // The ::cycle-child-focus signal is a
18571 // <link linkend="keybinding-signals">keybinding signal</link>
18572 // which gets emitted to cycle the focus between the children of the paned.
18573 // The default binding is f6.
18574 // <reversed>: whether cycling backward or forward
18575 extern (C) alias static c_int function (Paned* this_, c_int reversed, void* user_data=null) signal_cycle_child_focus;
18576 ulong signal_connect(string name:"cycle-child-focus", CB/*:signal_cycle_child_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18577 return signal_connect_data(&this, cast(char*)"cycle-child-focus",
18578 cast(GObject2.Callback)cb, data, null, cf);
18581 // The ::cycle-handle-focus signal is a
18582 // <link linkend="keybinding-signals">keybinding signal</link>
18583 // which gets emitted to cycle whether the paned should grab focus to allow
18584 // the user to change position of the handle by using key bindings.
18585 // The default binding for this signal is f8.
18586 // <reversed>: whether cycling backward or forward
18587 extern (C) alias static c_int function (Paned* this_, c_int reversed, void* user_data=null) signal_cycle_handle_focus;
18588 ulong signal_connect(string name:"cycle-handle-focus", CB/*:signal_cycle_handle_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18589 return signal_connect_data(&this, cast(char*)"cycle-handle-focus",
18590 cast(GObject2.Callback)cb, data, null, cf);
18593 // The ::move-handle signal is a
18594 // <link linkend="keybinding-signals">keybinding signal</link>
18595 // which gets emitted to move the handle when the user is using key bindings
18596 // to move it.
18597 // <scroll_type>: a #GtkScrollType
18598 extern (C) alias static c_int function (Paned* this_, ScrollType* scroll_type, void* user_data=null) signal_move_handle;
18599 ulong signal_connect(string name:"move-handle", CB/*:signal_move_handle*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18600 return signal_connect_data(&this, cast(char*)"move-handle",
18601 cast(GObject2.Callback)cb, data, null, cf);
18604 // The ::toggle-handle-focus is a
18605 // <link linkend="keybinding-signals">keybinding signal</link>
18606 // which gets emitted to accept the current position of the handle and then
18607 // move focus to the next widget in the focus chain.
18608 // The default binding is Tab.
18609 extern (C) alias static c_int function (Paned* this_, void* user_data=null) signal_toggle_handle_focus;
18610 ulong signal_connect(string name:"toggle-handle-focus", CB/*:signal_toggle_handle_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18611 return signal_connect_data(&this, cast(char*)"toggle-handle-focus",
18612 cast(GObject2.Callback)cb, data, null, cf);
18616 struct PanedClass {
18617 ContainerClass parent_class;
18618 extern (C) int function (Paned* paned, int reverse) cycle_child_focus;
18619 extern (C) int function (Paned* paned) toggle_handle_focus;
18620 extern (C) int function (Paned* paned, ScrollType scroll) move_handle;
18621 extern (C) int function (Paned* paned, int reverse) cycle_handle_focus;
18622 extern (C) int function (Paned* paned) accept_position;
18623 extern (C) int function (Paned* paned) cancel_position;
18624 extern (C) void function () _gtk_reserved1;
18625 extern (C) void function () _gtk_reserved2;
18626 extern (C) void function () _gtk_reserved3;
18627 extern (C) void function () _gtk_reserved4;
18630 struct PanedPrivate {
18633 struct PaperSize {
18635 // Creates a new #GtkPaperSize object by parsing a
18636 // <ulink url="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf">PWG 5101.1-2002</ulink>
18637 // paper name.
18638 // If @name is %NULL, the default paper size is returned,
18639 // see gtk_paper_size_get_default().
18640 // to free it
18641 // RETURNS: a new #GtkPaperSize, use gtk_paper_size_free()
18642 // <name>: a paper size name, or %NULL
18643 static PaperSize* /*new*/ new_(char* name=null) {
18644 return gtk_paper_size_new(name);
18647 // Creates a new #GtkPaperSize object with the
18648 // given parameters.
18649 // to free it
18650 // RETURNS: a new #GtkPaperSize object, use gtk_paper_size_free()
18651 // <name>: the paper name
18652 // <display_name>: the human-readable name
18653 // <width>: the paper width, in units of @unit
18654 // <height>: the paper height, in units of @unit
18655 // <unit>: the unit for @width and @height
18656 static PaperSize* /*new*/ new_custom(char* name, char* display_name, double width, double height, Unit unit) {
18657 return gtk_paper_size_new_custom(name, display_name, width, height, unit);
18660 // Reads a paper size from the group @group_name in the key file
18661 // paper size, or %NULL if an error occurred.
18662 // RETURNS: a new #GtkPaperSize object with the restored
18663 // <key_file>: the #GKeyFile to retrieve the papersize from
18664 // <group_name>: the name ofthe group in the key file to read, or %NULL to read the first group
18665 static PaperSize* /*new*/ new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
18666 return gtk_paper_size_new_from_key_file(key_file, group_name, error);
18669 // Creates a new #GtkPaperSize object by using
18670 // PPD information.
18671 // If @ppd_name is not a recognized PPD paper name,
18672 // construct a custom #GtkPaperSize object.
18673 // to free it
18674 // RETURNS: a new #GtkPaperSize, use gtk_paper_size_free()
18675 // <ppd_name>: a PPD paper name
18676 // <ppd_display_name>: the corresponding human-readable name
18677 // <width>: the paper width, in points
18678 // <height>: the paper height in points
18679 static PaperSize* /*new*/ new_from_ppd(char* ppd_name, char* ppd_display_name, double width, double height) {
18680 return gtk_paper_size_new_from_ppd(ppd_name, ppd_display_name, width, height);
18683 // Copies an existing #GtkPaperSize.
18684 // RETURNS: a copy of @other
18685 PaperSize* /*new*/ copy() {
18686 return gtk_paper_size_copy(&this);
18688 // Free the given #GtkPaperSize object.
18689 void free() {
18690 gtk_paper_size_free(&this);
18693 // Gets the default bottom margin for the #GtkPaperSize.
18694 // RETURNS: the default bottom margin
18695 // <unit>: the unit for the return value
18696 double get_default_bottom_margin(Unit unit) {
18697 return gtk_paper_size_get_default_bottom_margin(&this, unit);
18700 // Gets the default left margin for the #GtkPaperSize.
18701 // RETURNS: the default left margin
18702 // <unit>: the unit for the return value
18703 double get_default_left_margin(Unit unit) {
18704 return gtk_paper_size_get_default_left_margin(&this, unit);
18707 // Gets the default right margin for the #GtkPaperSize.
18708 // RETURNS: the default right margin
18709 // <unit>: the unit for the return value
18710 double get_default_right_margin(Unit unit) {
18711 return gtk_paper_size_get_default_right_margin(&this, unit);
18714 // Gets the default top margin for the #GtkPaperSize.
18715 // RETURNS: the default top margin
18716 // <unit>: the unit for the return value
18717 double get_default_top_margin(Unit unit) {
18718 return gtk_paper_size_get_default_top_margin(&this, unit);
18721 // Gets the human-readable name of the #GtkPaperSize.
18722 // RETURNS: the human-readable name of @size
18723 char* get_display_name() {
18724 return gtk_paper_size_get_display_name(&this);
18727 // Gets the paper height of the #GtkPaperSize, in
18728 // units of @unit.
18729 // RETURNS: the paper height
18730 // <unit>: the unit for the return value
18731 double get_height(Unit unit) {
18732 return gtk_paper_size_get_height(&this, unit);
18735 // Gets the name of the #GtkPaperSize.
18736 // RETURNS: the name of @size
18737 char* get_name() {
18738 return gtk_paper_size_get_name(&this);
18741 // Gets the PPD name of the #GtkPaperSize, which
18742 // may be %NULL.
18743 // RETURNS: the PPD name of @size
18744 char* get_ppd_name() {
18745 return gtk_paper_size_get_ppd_name(&this);
18748 // Gets the paper width of the #GtkPaperSize, in
18749 // units of @unit.
18750 // RETURNS: the paper width
18751 // <unit>: the unit for the return value
18752 double get_width(Unit unit) {
18753 return gtk_paper_size_get_width(&this, unit);
18756 // Returns %TRUE if @size is not a standard paper size.
18757 // RETURNS: whether @size is a custom paper size.
18758 int is_custom() {
18759 return gtk_paper_size_is_custom(&this);
18762 // Compares two #GtkPaperSize objects.
18763 // represent the same paper size
18764 // RETURNS: %TRUE, if @size1 and @size2
18765 // <size2>: another #GtkPaperSize object
18766 int is_equal(PaperSize* size2) {
18767 return gtk_paper_size_is_equal(&this, size2);
18770 // Changes the dimensions of a @size to @width x @height.
18771 // <width>: the new width in units of @unit
18772 // <height>: the new height in units of @unit
18773 // <unit>: the unit for @width and @height
18774 void set_size(double width, double height, Unit unit) {
18775 gtk_paper_size_set_size(&this, width, height, unit);
18778 // This function adds the paper size from @size to @key_file.
18779 // <key_file>: the #GKeyFile to save the paper size to
18780 // <group_name>: the group to add the settings to in @key_file
18781 void to_key_file(GLib2.KeyFile* key_file, char* group_name) {
18782 gtk_paper_size_to_key_file(&this, key_file, group_name);
18786 enum PathPriorityType {
18787 LOWEST = 0,
18788 GTK = 4,
18789 APPLICATION = 8,
18790 THEME = 10,
18791 RC = 12,
18792 HIGHEST = 15
18794 enum PathType {
18795 WIDGET = 0,
18796 WIDGET_CLASS = 1,
18797 CLASS = 2
18799 struct Pixmap /* : Misc */ {
18800 alias misc this;
18801 alias misc super_;
18802 Misc misc;
18803 Gdk2.Pixmap* pixmap;
18804 Gdk2.Bitmap* mask;
18805 Gdk2.Pixmap* pixmap_insensitive;
18806 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18807 uint, "build_insensitive", 1,
18808 uint, "__dummy32A", 31));
18810 static Pixmap* new_(Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
18811 return gtk_pixmap_new(pixmap, mask);
18813 void get(Gdk2.Pixmap** val, Gdk2.Bitmap** mask) {
18814 gtk_pixmap_get(&this, val, mask);
18816 void set(Gdk2.Pixmap* val, Gdk2.Bitmap* mask) {
18817 gtk_pixmap_set(&this, val, mask);
18819 void set_build_insensitive(int build) {
18820 gtk_pixmap_set_build_insensitive(&this, build);
18824 struct PixmapClass {
18825 MiscClass parent_class;
18829 // Together with #GtkSocket, #GtkPlug provides the ability
18830 // to embed widgets from one process into another process
18831 // in a fashion that is transparent to the user. One
18832 // process creates a #GtkSocket widget and passes the
18833 // ID of that widget's window to the other process,
18834 // which then creates a #GtkPlug with that window ID.
18835 // Any widgets contained in the #GtkPlug then will appear
18836 // inside the first application's window.
18837 // <note>
18838 // The #GtkPlug and #GtkSocket widgets are currently not available
18839 // on all platforms supported by GTK+.
18840 // </note>
18841 struct Plug /* : Window */ {
18842 alias window this;
18843 alias window super_;
18844 Window window;
18845 Gdk2.Window* socket_window;
18846 Widget* modality_window;
18847 WindowGroup* modality_group;
18848 GLib2.HashTable* grabbed_keys;
18849 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18850 uint, "same_app", 1,
18851 uint, "__dummy32A", 31));
18854 // Creates a new plug widget inside the #GtkSocket identified
18855 // by @socket_id. If @socket_id is 0, the plug is left "unplugged" and
18856 // can later be plugged into a #GtkSocket by gtk_socket_add_id().
18857 // RETURNS: the new #GtkPlug widget.
18858 // <socket_id>: the window ID of the socket, or 0.
18859 static Plug* new_(Gdk2.NativeWindow socket_id) {
18860 return gtk_plug_new(socket_id);
18863 // Create a new plug widget inside the #GtkSocket identified by socket_id.
18864 // RETURNS: the new #GtkPlug widget.
18865 // <display>: the #GdkDisplay on which @socket_id is displayed
18866 // <socket_id>: the XID of the socket's window.
18867 static Plug* new_for_display(Gdk2.Display* display, Gdk2.NativeWindow socket_id) {
18868 return gtk_plug_new_for_display(display, socket_id);
18871 // Finish the initialization of @plug for a given #GtkSocket identified by
18872 // <socket_id>: the XID of the socket's window.
18873 void construct(Gdk2.NativeWindow socket_id) {
18874 gtk_plug_construct(&this, socket_id);
18877 // Finish the initialization of @plug for a given #GtkSocket identified by
18878 // This function will generally only be used by classes deriving from #GtkPlug.
18879 // <display>: the #GdkDisplay associated with @socket_id's #GtkSocket.
18880 // <socket_id>: the XID of the socket's window.
18881 void construct_for_display(Gdk2.Display* display, Gdk2.NativeWindow socket_id) {
18882 gtk_plug_construct_for_display(&this, display, socket_id);
18885 // Determines whether the plug is embedded in a socket.
18886 // RETURNS: %TRUE if the plug is embedded in a socket
18887 int get_embedded() {
18888 return gtk_plug_get_embedded(&this);
18891 // Gets the window ID of a #GtkPlug widget, which can then
18892 // be used to embed this window inside another window, for
18893 // instance with gtk_socket_add_id().
18894 // RETURNS: the window ID for the plug
18895 Gdk2.NativeWindow get_id() {
18896 return gtk_plug_get_id(&this);
18899 // Retrieves the socket the plug is embedded in.
18900 // RETURNS: the window of the socket, or %NULL
18901 Gdk2.Window* get_socket_window() {
18902 return gtk_plug_get_socket_window(&this);
18904 // Gets emitted when the plug becomes embedded in a socket.
18905 extern (C) alias static void function (Plug* this_, void* user_data=null) signal_embedded;
18907 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18908 return super_.signal_connect!name(cb, data, cf);
18911 ulong signal_connect(string name:"embedded", CB/*:signal_embedded*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18912 return signal_connect_data(&this, cast(char*)"embedded",
18913 cast(GObject2.Callback)cb, data, null, cf);
18917 struct PlugClass {
18918 WindowClass parent_class;
18919 extern (C) void function (Plug* plug) embedded;
18920 extern (C) void function () _gtk_reserved1;
18921 extern (C) void function () _gtk_reserved2;
18922 extern (C) void function () _gtk_reserved3;
18923 extern (C) void function () _gtk_reserved4;
18926 enum PolicyType {
18927 ALWAYS = 0,
18928 AUTOMATIC = 1,
18929 NEVER = 2
18931 enum PositionType {
18932 LEFT = 0,
18933 RIGHT = 1,
18934 TOP = 2,
18935 BOTTOM = 3
18937 struct Preview /* : Widget */ {
18938 alias widget this;
18939 alias widget super_;
18940 Widget widget;
18941 ubyte* buffer;
18942 ushort buffer_width, buffer_height, bpp, rowstride;
18943 Gdk2.RgbDither dither;
18944 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18945 uint, "type", 1,
18946 uint, "expand", 1,
18947 uint, "__dummy32A", 30));
18949 static Preview* new_(PreviewType type) {
18950 return gtk_preview_new(type);
18952 // Unintrospectable function: get_cmap() / gtk_preview_get_cmap()
18953 static Gdk2.Colormap* get_cmap() {
18954 return gtk_preview_get_cmap();
18956 // Unintrospectable function: get_info() / gtk_preview_get_info()
18957 static PreviewInfo* get_info() {
18958 return gtk_preview_get_info();
18960 // Unintrospectable function: get_visual() / gtk_preview_get_visual()
18961 static Gdk2.Visual* get_visual() {
18962 return gtk_preview_get_visual();
18964 static void reset() {
18965 gtk_preview_reset();
18967 static void set_color_cube(uint nred_shades, uint ngreen_shades, uint nblue_shades, uint ngray_shades) {
18968 gtk_preview_set_color_cube(nred_shades, ngreen_shades, nblue_shades, ngray_shades);
18970 static void set_gamma(double gamma_) {
18971 gtk_preview_set_gamma(gamma_);
18973 static void set_install_cmap(int install_cmap) {
18974 gtk_preview_set_install_cmap(install_cmap);
18976 static void set_reserved(int nreserved) {
18977 gtk_preview_set_reserved(nreserved);
18979 static void uninit() {
18980 gtk_preview_uninit();
18982 void draw_row(ubyte* data, int x, int y, int w) {
18983 gtk_preview_draw_row(&this, data, x, y, w);
18985 void put(Gdk2.Window* window, Gdk2.GC* gc, int srcx, int srcy, int destx, int desty, int width, int height) {
18986 gtk_preview_put(&this, window, gc, srcx, srcy, destx, desty, width, height);
18988 void set_dither(Gdk2.RgbDither dither) {
18989 gtk_preview_set_dither(&this, dither);
18991 void set_expand(int expand) {
18992 gtk_preview_set_expand(&this, expand);
18994 void size(int width, int height) {
18995 gtk_preview_size(&this, width, height);
18999 struct PreviewClass {
19000 WidgetClass parent_class;
19001 PreviewInfo info;
19004 struct PreviewInfo {
19005 ubyte* lookup;
19006 double gamma;
19009 enum PreviewType {
19010 COLOR = 0,
19011 GRAYSCALE = 1
19013 struct PrintContext /* : GObject.Object */ {
19014 alias method_parent this;
19015 alias method_parent super_;
19016 alias method_parent object;
19017 GObject2.Object method_parent;
19020 // Creates a new #PangoContext that can be used with the
19021 // #GtkPrintContext.
19022 // RETURNS: a new Pango context for @context
19023 Pango.Context* /*new*/ create_pango_context() {
19024 return gtk_print_context_create_pango_context(&this);
19027 // Creates a new #PangoLayout that is suitable for use
19028 // with the #GtkPrintContext.
19029 // RETURNS: a new Pango layout for @context
19030 Pango.Layout* /*new*/ create_pango_layout() {
19031 return gtk_print_context_create_pango_layout(&this);
19034 // Obtains the cairo context that is associated with the
19035 // #GtkPrintContext.
19036 // RETURNS: the cairo context of @context
19037 cairo.Context* get_cairo_context() {
19038 return gtk_print_context_get_cairo_context(&this);
19041 // Obtains the horizontal resolution of the #GtkPrintContext,
19042 // in dots per inch.
19043 // RETURNS: the horizontal resolution of @context
19044 double get_dpi_x() {
19045 return gtk_print_context_get_dpi_x(&this);
19048 // Obtains the vertical resolution of the #GtkPrintContext,
19049 // in dots per inch.
19050 // RETURNS: the vertical resolution of @context
19051 double get_dpi_y() {
19052 return gtk_print_context_get_dpi_y(&this);
19055 // Obtains the hardware printer margins of the #GtkPrintContext, in units.
19056 // RETURNS: %TRUE if the hard margins were retrieved
19057 // <top>: top hardware printer margin
19058 // <bottom>: bottom hardware printer margin
19059 // <left>: left hardware printer margin
19060 // <right>: right hardware printer margin
19061 int get_hard_margins(/*out*/ double* top, /*out*/ double* bottom, /*out*/ double* left, /*out*/ double* right) {
19062 return gtk_print_context_get_hard_margins(&this, top, bottom, left, right);
19065 // Obtains the height of the #GtkPrintContext, in pixels.
19066 // RETURNS: the height of @context
19067 double get_height() {
19068 return gtk_print_context_get_height(&this);
19071 // Obtains the #GtkPageSetup that determines the page
19072 // dimensions of the #GtkPrintContext.
19073 // RETURNS: the page setup of @context
19074 PageSetup* get_page_setup() {
19075 return gtk_print_context_get_page_setup(&this);
19078 // Returns a #PangoFontMap that is suitable for use
19079 // with the #GtkPrintContext.
19080 // RETURNS: the font map of @context
19081 Pango.FontMap* get_pango_fontmap() {
19082 return gtk_print_context_get_pango_fontmap(&this);
19085 // Obtains the width of the #GtkPrintContext, in pixels.
19086 // RETURNS: the width of @context
19087 double get_width() {
19088 return gtk_print_context_get_width(&this);
19091 // Sets a new cairo context on a print context.
19092 // This function is intended to be used when implementing
19093 // an internal print preview, it is not needed for printing,
19094 // since GTK+ itself creates a suitable cairo context in that
19095 // case.
19096 // <cr>: the cairo context
19097 // <dpi_x>: the horizontal resolution to use with @cr
19098 // <dpi_y>: the vertical resolution to use with @cr
19099 void set_cairo_context(cairo.Context* cr, double dpi_x, double dpi_y) {
19100 gtk_print_context_set_cairo_context(&this, cr, dpi_x, dpi_y);
19104 enum PrintDuplex {
19105 SIMPLEX = 0,
19106 HORIZONTAL = 1,
19107 VERTICAL = 2
19109 enum PrintError {
19110 GENERAL = 0,
19111 INTERNAL_ERROR = 1,
19112 NOMEM = 2,
19113 INVALID_FILE = 3
19115 extern (C) alias void function (void* func_data, char* str) PrintFunc;
19117 struct PrintOperation /* : GObject.Object */ {
19118 alias parent_instance this;
19119 alias parent_instance super_;
19120 alias parent_instance object;
19121 GObject2.Object parent_instance;
19122 PrintOperationPrivate* priv;
19125 // Creates a new #GtkPrintOperation.
19126 // RETURNS: a new #GtkPrintOperation
19127 static PrintOperation* /*new*/ new_() {
19128 return gtk_print_operation_new();
19131 // Cancels a running print operation. This function may
19132 // be called from a #GtkPrintOperation::begin-print,
19133 // #GtkPrintOperation::paginate or #GtkPrintOperation::draw-page
19134 // signal handler to stop the currently running print
19135 // operation.
19136 void cancel() {
19137 gtk_print_operation_cancel(&this);
19140 // Signalize that drawing of particular page is complete.
19141 // It is called after completion of page drawing (e.g. drawing in another
19142 // thread).
19143 // If gtk_print_operation_set_defer_drawing() was called before, then this function
19144 // has to be called by application. In another case it is called by the library
19145 // itself.
19146 void draw_page_finish() {
19147 gtk_print_operation_draw_page_finish(&this);
19150 // Returns the default page setup, see
19151 // gtk_print_operation_set_default_page_setup().
19152 // RETURNS: the default page setup
19153 PageSetup* get_default_page_setup() {
19154 return gtk_print_operation_get_default_page_setup(&this);
19157 // Gets the value of #GtkPrintOperation::embed-page-setup property.
19158 // RETURNS: whether page setup selection combos are embedded
19159 int get_embed_page_setup() {
19160 return gtk_print_operation_get_embed_page_setup(&this);
19163 // Call this when the result of a print operation is
19164 // %GTK_PRINT_OPERATION_RESULT_ERROR, either as returned by
19165 // gtk_print_operation_run(), or in the #GtkPrintOperation::done signal
19166 // handler. The returned #GError will contain more details on what went wrong.
19167 void get_error(GLib2.Error** error=null) {
19168 gtk_print_operation_get_error(&this, error);
19171 // Gets the value of #GtkPrintOperation::has-selection property.
19172 // RETURNS: whether there is a selection
19173 int get_has_selection() {
19174 return gtk_print_operation_get_has_selection(&this);
19177 // Returns the number of pages that will be printed.
19178 // Note that this value is set during print preparation phase
19179 // (%GTK_PRINT_STATUS_PREPARING), so this function should never be
19180 // called before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA).
19181 // You can connect to the #GtkPrintOperation::status-changed signal
19182 // and call gtk_print_operation_get_n_pages_to_print() when
19183 // print status is %GTK_PRINT_STATUS_GENERATING_DATA.
19184 // This is typically used to track the progress of print operation.
19185 // RETURNS: the number of pages that will be printed
19186 int get_n_pages_to_print() {
19187 return gtk_print_operation_get_n_pages_to_print(&this);
19190 // Returns the current print settings.
19191 // Note that the return value is %NULL until either
19192 // gtk_print_operation_set_print_settings() or
19193 // gtk_print_operation_run() have been called.
19194 // RETURNS: the current print settings of @op.
19195 PrintSettings* get_print_settings() {
19196 return gtk_print_operation_get_print_settings(&this);
19199 // Returns the status of the print operation.
19200 // Also see gtk_print_operation_get_status_string().
19201 // RETURNS: the status of the print operation
19202 PrintStatus get_status() {
19203 return gtk_print_operation_get_status(&this);
19206 // Returns a string representation of the status of the
19207 // print operation. The string is translated and suitable
19208 // for displaying the print status e.g. in a #GtkStatusbar.
19209 // Use gtk_print_operation_get_status() to obtain a status
19210 // value that is suitable for programmatic use.
19211 // of the print operation
19212 // RETURNS: a string representation of the status
19213 char* get_status_string() {
19214 return gtk_print_operation_get_status_string(&this);
19217 // Gets the value of #GtkPrintOperation::support-selection property.
19218 // RETURNS: whether the application supports print of selection
19219 int get_support_selection() {
19220 return gtk_print_operation_get_support_selection(&this);
19223 // A convenience function to find out if the print operation
19224 // is finished, either successfully (%GTK_PRINT_STATUS_FINISHED)
19225 // or unsuccessfully (%GTK_PRINT_STATUS_FINISHED_ABORTED).
19226 // can be in a non-finished state even after done has been called, as
19227 // the operation status then tracks the print job status on the printer.
19228 // RETURNS: %TRUE, if the print operation is finished.
19229 int is_finished() {
19230 return gtk_print_operation_is_finished(&this);
19233 // Runs the print operation, by first letting the user modify
19234 // print settings in the print dialog, and then print the document.
19235 // Normally that this function does not return until the rendering of all
19236 // pages is complete. You can connect to the
19237 // #GtkPrintOperation::status-changed signal on @op to obtain some
19238 // information about the progress of the print operation.
19239 // Furthermore, it may use a recursive mainloop to show the print dialog.
19240 // If you call gtk_print_operation_set_allow_async() or set the
19241 // #GtkPrintOperation:allow-async property the operation will run
19242 // asynchronously if this is supported on the platform. The
19243 // #GtkPrintOperation::done signal will be emitted with the result of the
19244 // operation when the it is done (i.e. when the dialog is canceled, or when
19245 // the print succeeds or fails).
19246 // |[
19247 // if (settings != NULL)
19248 // gtk_print_operation_set_print_settings (print, settings);
19249 // if (page_setup != NULL)
19250 // gtk_print_operation_set_default_page_setup (print, page_setup);
19251 // g_signal_connect (print, "begin-print",
19252 // G_CALLBACK (begin_print), &data);
19253 // g_signal_connect (print, "draw-page",
19254 // G_CALLBACK (draw_page), &data);
19255 // res = gtk_print_operation_run (print,
19256 // GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
19257 // parent,
19258 // &error);
19259 // if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
19260 // {
19261 // error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
19262 // GTK_DIALOG_DESTROY_WITH_PARENT,
19263 // GTK_MESSAGE_ERROR,
19264 // GTK_BUTTONS_CLOSE,
19265 // "Error printing file:\n%s",
19266 // error->message);
19267 // g_signal_connect (error_dialog, "response",
19268 // G_CALLBACK (gtk_widget_destroy), NULL);
19269 // gtk_widget_show (error_dialog);
19270 // g_error_free (error);
19271 // }
19272 // else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
19273 // {
19274 // if (settings != NULL)
19275 // g_object_unref (settings);
19276 // settings = g_object_ref (gtk_print_operation_get_print_settings (print));
19277 // }
19278 // ]|
19279 // Note that gtk_print_operation_run() can only be called once on a
19280 // given #GtkPrintOperation.
19281 // %GTK_PRINT_OPERATION_RESULT_APPLY indicates that the printing was
19282 // completed successfully. In this case, it is a good idea to obtain
19283 // the used print settings with gtk_print_operation_get_print_settings()
19284 // and store them for reuse with the next print operation. A value of
19285 // %GTK_PRINT_OPERATION_RESULT_IN_PROGRESS means the operation is running
19286 // asynchronously, and will emit the #GtkPrintOperation::done signal when
19287 // done.
19288 // RETURNS: the result of the print operation. A return value of
19289 // <action>: the action to start
19290 // <parent>: Transient parent of the dialog
19291 PrintOperationResult run(PrintOperationAction action, Window* parent, GLib2.Error** error=null) {
19292 return gtk_print_operation_run(&this, action, parent, error);
19295 // Sets whether the gtk_print_operation_run() may return
19296 // before the print operation is completed. Note that
19297 // some platforms may not allow asynchronous operation.
19298 // <allow_async>: %TRUE to allow asynchronous operation
19299 void set_allow_async(int allow_async) {
19300 gtk_print_operation_set_allow_async(&this, allow_async);
19303 // Sets the current page.
19304 // If this is called before gtk_print_operation_run(),
19305 // the user will be able to select to print only the current page.
19306 // Note that this only makes sense for pre-paginated documents.
19307 // <current_page>: the current page, 0-based
19308 void set_current_page(int current_page) {
19309 gtk_print_operation_set_current_page(&this, current_page);
19312 // Sets the label for the tab holding custom widgets.
19313 // <label>: the label to use, or %NULL to use the default label
19314 void set_custom_tab_label(char* label=null) {
19315 gtk_print_operation_set_custom_tab_label(&this, label);
19318 // Makes @default_page_setup the default page setup for @op.
19319 // This page setup will be used by gtk_print_operation_run(),
19320 // but it can be overridden on a per-page basis by connecting
19321 // to the #GtkPrintOperation::request-page-setup signal.
19322 // <default_page_setup>: a #GtkPageSetup, or %NULL
19323 void set_default_page_setup(PageSetup* default_page_setup=null) {
19324 gtk_print_operation_set_default_page_setup(&this, default_page_setup);
19327 // Sets up the #GtkPrintOperation to wait for calling of
19328 // gtk_print_operation_draw_page_finish() from application. It can
19329 // be used for drawing page in another thread.
19330 // This function must be called in the callback of "draw-page" signal.
19331 void set_defer_drawing() {
19332 gtk_print_operation_set_defer_drawing(&this);
19335 // Embed page size combo box and orientation combo box into page setup page.
19336 // Selected page setup is stored as default page setup in #GtkPrintOperation.
19337 // <embed>: %TRUE to embed page setup selection in the #GtkPrintDialog
19338 void set_embed_page_setup(int embed) {
19339 gtk_print_operation_set_embed_page_setup(&this, embed);
19342 // Sets up the #GtkPrintOperation to generate a file instead
19343 // of showing the print dialog. The indended use of this function
19344 // is for implementing "Export to PDF" actions. Currently, PDF
19345 // is the only supported format.
19346 // "Print to PDF" support is independent of this and is done
19347 // by letting the user pick the "Print to PDF" item from the list
19348 // of printers in the print dialog.
19349 // <filename>: the filename for the exported file
19350 void set_export_filename(char* filename) {
19351 gtk_print_operation_set_export_filename(&this, filename);
19354 // Sets whether there is a selection to print.
19355 // Application has to set number of pages to which the selection
19356 // will draw by gtk_print_operation_set_n_pages() in a callback of
19357 // #GtkPrintOperation::begin-print.
19358 // <has_selection>: %TRUE indicates that a selection exists
19359 void set_has_selection(int has_selection) {
19360 gtk_print_operation_set_has_selection(&this, has_selection);
19363 // Sets the name of the print job. The name is used to identify
19364 // the job (e.g. in monitoring applications like eggcups).
19365 // If you don't set a job name, GTK+ picks a default one by
19366 // numbering successive print jobs.
19367 // <job_name>: a string that identifies the print job
19368 void set_job_name(char* job_name) {
19369 gtk_print_operation_set_job_name(&this, job_name);
19372 // Sets the number of pages in the document.
19373 // This <emphasis>must</emphasis> be set to a positive number
19374 // before the rendering starts. It may be set in a
19375 // #GtkPrintOperation::begin-print signal hander.
19376 // Note that the page numbers passed to the
19377 // #GtkPrintOperation::request-page-setup
19378 // and #GtkPrintOperation::draw-page signals are 0-based, i.e. if
19379 // the user chooses to print all pages, the last ::draw-page signal
19380 // will be for page @n_pages - 1.
19381 // <n_pages>: the number of pages
19382 void set_n_pages(int n_pages) {
19383 gtk_print_operation_set_n_pages(&this, n_pages);
19386 // Sets the print settings for @op. This is typically used to
19387 // re-establish print settings from a previous print operation,
19388 // see gtk_print_operation_run().
19389 // <print_settings>: #GtkPrintSettings
19390 void set_print_settings(PrintSettings* print_settings=null) {
19391 gtk_print_operation_set_print_settings(&this, print_settings);
19394 // If @show_progress is %TRUE, the print operation will show a
19395 // progress dialog during the print operation.
19396 // <show_progress>: %TRUE to show a progress dialog
19397 void set_show_progress(int show_progress) {
19398 gtk_print_operation_set_show_progress(&this, show_progress);
19401 // Sets whether selection is supported by #GtkPrintOperation.
19402 // <support_selection>: %TRUE to support selection
19403 void set_support_selection(int support_selection) {
19404 gtk_print_operation_set_support_selection(&this, support_selection);
19407 // If track_status is %TRUE, the print operation will try to continue report
19408 // on the status of the print job in the printer queues and printer. This
19409 // can allow your application to show things like "out of paper" issues,
19410 // and when the print job actually reaches the printer.
19411 // This function is often implemented using some form of polling, so it should
19412 // not be enabled unless needed.
19413 // <track_status>: %TRUE to track status after printing
19414 void set_track_print_status(int track_status) {
19415 gtk_print_operation_set_track_print_status(&this, track_status);
19418 // Sets up the transformation for the cairo context obtained from
19419 // #GtkPrintContext in such a way that distances are measured in
19420 // units of @unit.
19421 // <unit>: the unit to use
19422 void set_unit(Unit unit) {
19423 gtk_print_operation_set_unit(&this, unit);
19426 // If @full_page is %TRUE, the transformation for the cairo context
19427 // obtained from #GtkPrintContext puts the origin at the top left
19428 // corner of the page (which may not be the top left corner of the
19429 // sheet, depending on page orientation and the number of pages per
19430 // sheet). Otherwise, the origin is at the top left corner of the
19431 // imageable area (i.e. inside the margins).
19432 // <full_page>: %TRUE to set up the #GtkPrintContext for the full page
19433 void set_use_full_page(int full_page) {
19434 gtk_print_operation_set_use_full_page(&this, full_page);
19437 // Emitted after the user has finished changing print settings
19438 // in the dialog, before the actual rendering starts.
19439 // A typical use for ::begin-print is to use the parameters from the
19440 // #GtkPrintContext and paginate the document accordingly, and then
19441 // set the number of pages with gtk_print_operation_set_n_pages().
19442 // <context>: the #GtkPrintContext for the current operation
19443 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, void* user_data=null) signal_begin_print;
19445 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19446 return super_.signal_connect!name(cb, data, cf);
19449 ulong signal_connect(string name:"begin-print", CB/*:signal_begin_print*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19450 return signal_connect_data(&this, cast(char*)"begin-print",
19451 cast(GObject2.Callback)cb, data, null, cf);
19454 // Emitted when displaying the print dialog. If you return a
19455 // widget in a handler for this signal it will be added to a custom
19456 // tab in the print dialog. You typically return a container widget
19457 // with multiple widgets in it.
19458 // The print dialog owns the returned widget, and its lifetime is not
19459 // controlled by the application. However, the widget is guaranteed
19460 // to stay around until the #GtkPrintOperation::custom-widget-apply
19461 // signal is emitted on the operation. Then you can read out any
19462 // information you need from the widgets.
19463 // the print dialog, or %NULL
19464 // RETURNS: A custom widget that gets embedded in
19465 extern (C) alias static GObject2.Object* function (PrintOperation* this_, void* user_data=null) signal_create_custom_widget;
19466 ulong signal_connect(string name:"create-custom-widget", CB/*:signal_create_custom_widget*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19467 return signal_connect_data(&this, cast(char*)"create-custom-widget",
19468 cast(GObject2.Callback)cb, data, null, cf);
19471 // Emitted right before #GtkPrintOperation::begin-print if you added
19472 // a custom widget in the #GtkPrintOperation::create-custom-widget handler.
19473 // When you get this signal you should read the information from the
19474 // custom widgets, as the widgets are not guaraneed to be around at a
19475 // later time.
19476 // <widget>: the custom widget added in create-custom-widget
19477 extern (C) alias static void function (PrintOperation* this_, Widget* widget, void* user_data=null) signal_custom_widget_apply;
19478 ulong signal_connect(string name:"custom-widget-apply", CB/*:signal_custom_widget_apply*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19479 return signal_connect_data(&this, cast(char*)"custom-widget-apply",
19480 cast(GObject2.Callback)cb, data, null, cf);
19483 // Emitted when the print operation run has finished doing
19484 // everything required for printing.
19485 // If @result is %GTK_PRINT_OPERATION_RESULT_ERROR then you can call
19486 // gtk_print_operation_get_error() for more information.
19487 // If you enabled print status tracking then
19488 // gtk_print_operation_is_finished() may still return %FALSE
19489 // after #GtkPrintOperation::done was emitted.
19490 // <result>: the result of the print operation
19491 extern (C) alias static void function (PrintOperation* this_, PrintOperationResult* result, void* user_data=null) signal_done;
19492 ulong signal_connect(string name:"done", CB/*:signal_done*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19493 return signal_connect_data(&this, cast(char*)"done",
19494 cast(GObject2.Callback)cb, data, null, cf);
19497 // Emitted for every page that is printed. The signal handler
19498 // must render the @page_nr's page onto the cairo context obtained
19499 // from @context using gtk_print_context_get_cairo_context().
19500 // |[
19501 // static void
19502 // draw_page (GtkPrintOperation *operation,
19503 // GtkPrintContext *context,
19504 // gint page_nr,
19505 // gpointer user_data)
19506 // {
19507 // cairo_t *cr;
19508 // PangoLayout *layout;
19509 // gdouble width, text_height;
19510 // gint layout_height;
19511 // PangoFontDescription *desc;
19512 // cr = gtk_print_context_get_cairo_context (context);
19513 // width = gtk_print_context_get_width (context);
19514 // cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
19515 // cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
19516 // cairo_fill (cr);
19517 // layout = gtk_print_context_create_pango_layout (context);
19518 // desc = pango_font_description_from_string ("sans 14");
19519 // pango_layout_set_font_description (layout, desc);
19520 // pango_font_description_free (desc);
19521 // pango_layout_set_text (layout, "some text", -1);
19522 // pango_layout_set_width (layout, width * PANGO_SCALE);
19523 // pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
19524 // pango_layout_get_size (layout, NULL, &layout_height);
19525 // text_height = (gdouble)layout_height / PANGO_SCALE;
19526 // cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2);
19527 // pango_cairo_show_layout (cr, layout);
19528 // g_object_unref (layout);
19529 // }
19530 // ]|
19531 // Use gtk_print_operation_set_use_full_page() and
19532 // gtk_print_operation_set_unit() before starting the print operation
19533 // to set up the transformation of the cairo context according to your
19534 // needs.
19535 // <context>: the #GtkPrintContext for the current operation
19536 // <page_nr>: the number of the currently printed page (0-based)
19537 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, int page_nr, void* user_data=null) signal_draw_page;
19538 ulong signal_connect(string name:"draw-page", CB/*:signal_draw_page*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19539 return signal_connect_data(&this, cast(char*)"draw-page",
19540 cast(GObject2.Callback)cb, data, null, cf);
19543 // Emitted after all pages have been rendered.
19544 // A handler for this signal can clean up any resources that have
19545 // been allocated in the #GtkPrintOperation::begin-print handler.
19546 // <context>: the #GtkPrintContext for the current operation
19547 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, void* user_data=null) signal_end_print;
19548 ulong signal_connect(string name:"end-print", CB/*:signal_end_print*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19549 return signal_connect_data(&this, cast(char*)"end-print",
19550 cast(GObject2.Callback)cb, data, null, cf);
19553 // Emitted after the #GtkPrintOperation::begin-print signal, but before
19554 // the actual rendering starts. It keeps getting emitted until a connected
19555 // signal handler returns %TRUE.
19556 // The ::paginate signal is intended to be used for paginating a document
19557 // in small chunks, to avoid blocking the user interface for a long
19558 // time. The signal handler should update the number of pages using
19559 // gtk_print_operation_set_n_pages(), and return %TRUE if the document
19560 // has been completely paginated.
19561 // If you don't need to do pagination in chunks, you can simply do
19562 // it all in the ::begin-print handler, and set the number of pages
19563 // from there.
19564 // RETURNS: %TRUE if pagination is complete
19565 // <context>: the #GtkPrintContext for the current operation
19566 extern (C) alias static c_int function (PrintOperation* this_, PrintContext* context, void* user_data=null) signal_paginate;
19567 ulong signal_connect(string name:"paginate", CB/*:signal_paginate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19568 return signal_connect_data(&this, cast(char*)"paginate",
19569 cast(GObject2.Callback)cb, data, null, cf);
19572 // Gets emitted when a preview is requested from the native dialog.
19573 // The default handler for this signal uses an external viewer
19574 // application to preview.
19575 // To implement a custom print preview, an application must return
19576 // %TRUE from its handler for this signal. In order to use the
19577 // provided @context for the preview implementation, it must be
19578 // given a suitable cairo context with gtk_print_context_set_cairo_context().
19579 // The custom preview implementation can use
19580 // gtk_print_operation_preview_is_selected() and
19581 // gtk_print_operation_preview_render_page() to find pages which
19582 // are selected for print and render them. The preview must be
19583 // finished by calling gtk_print_operation_preview_end_preview()
19584 // (typically in response to the user clicking a close button).
19585 // RETURNS: %TRUE if the listener wants to take over control of the preview
19586 // <preview>: the #GtkPrintPreviewOperation for the current operation
19587 // <context>: the #GtkPrintContext that will be used
19588 // <parent>: the #GtkWindow to use as window parent, or %NULL
19589 extern (C) alias static c_int function (PrintOperation* this_, PrintOperationPreview* preview, PrintContext* context, Window* parent=null, void* user_data=null) signal_preview;
19590 ulong signal_connect(string name:"preview", CB/*:signal_preview*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19591 return signal_connect_data(&this, cast(char*)"preview",
19592 cast(GObject2.Callback)cb, data, null, cf);
19595 // Emitted once for every page that is printed, to give
19596 // the application a chance to modify the page setup. Any changes
19597 // done to @setup will be in force only for printing this page.
19598 // <context>: the #GtkPrintContext for the current operation
19599 // <page_nr>: the number of the currently printed page (0-based)
19600 // <setup>: the #GtkPageSetup
19601 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, int page_nr, PageSetup* setup, void* user_data=null) signal_request_page_setup;
19602 ulong signal_connect(string name:"request-page-setup", CB/*:signal_request_page_setup*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19603 return signal_connect_data(&this, cast(char*)"request-page-setup",
19604 cast(GObject2.Callback)cb, data, null, cf);
19607 // Emitted at between the various phases of the print operation.
19608 // See #GtkPrintStatus for the phases that are being discriminated.
19609 // Use gtk_print_operation_get_status() to find out the current
19610 // status.
19611 extern (C) alias static void function (PrintOperation* this_, void* user_data=null) signal_status_changed;
19612 ulong signal_connect(string name:"status-changed", CB/*:signal_status_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19613 return signal_connect_data(&this, cast(char*)"status-changed",
19614 cast(GObject2.Callback)cb, data, null, cf);
19617 // Emitted after change of selected printer. The actual page setup and
19618 // print settings are passed to the custom widget, which can actualize
19619 // itself according to this change.
19620 // <widget>: the custom widget added in create-custom-widget
19621 // <setup>: actual page setup
19622 // <settings>: actual print settings
19623 extern (C) alias static void function (PrintOperation* this_, Widget* widget, PageSetup* setup, PrintSettings* settings, void* user_data=null) signal_update_custom_widget;
19624 ulong signal_connect(string name:"update-custom-widget", CB/*:signal_update_custom_widget*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19625 return signal_connect_data(&this, cast(char*)"update-custom-widget",
19626 cast(GObject2.Callback)cb, data, null, cf);
19630 enum PrintOperationAction {
19631 PRINT_DIALOG = 0,
19632 PRINT = 1,
19633 PREVIEW = 2,
19634 EXPORT = 3
19636 struct PrintOperationClass {
19637 GObject2.ObjectClass parent_class;
19638 extern (C) void function (PrintOperation* operation, PrintOperationResult result) done;
19639 extern (C) void function (PrintOperation* operation, PrintContext* context) begin_print;
19640 extern (C) int function (PrintOperation* operation, PrintContext* context) paginate;
19641 extern (C) void function (PrintOperation* operation, PrintContext* context, int page_nr, PageSetup* setup) request_page_setup;
19642 extern (C) void function (PrintOperation* operation, PrintContext* context, int page_nr) draw_page;
19643 extern (C) void function (PrintOperation* operation, PrintContext* context) end_print;
19644 extern (C) void function (PrintOperation* operation) status_changed;
19645 // Unintrospectable functionp: create_custom_widget() / ()
19646 extern (C) Widget* function (PrintOperation* operation) create_custom_widget;
19647 extern (C) void function (PrintOperation* operation, Widget* widget) custom_widget_apply;
19648 extern (C) int function (PrintOperation* operation, PrintOperationPreview* preview, PrintContext* context, Window* parent) preview;
19649 extern (C) void function (PrintOperation* operation, Widget* widget, PageSetup* setup, PrintSettings* settings) update_custom_widget;
19650 extern (C) void function () _gtk_reserved1;
19651 extern (C) void function () _gtk_reserved2;
19652 extern (C) void function () _gtk_reserved3;
19653 extern (C) void function () _gtk_reserved4;
19654 extern (C) void function () _gtk_reserved5;
19655 extern (C) void function () _gtk_reserved6;
19658 struct PrintOperationPreview {
19660 // Ends a preview.
19661 // This function must be called to finish a custom print preview.
19662 void end_preview() {
19663 gtk_print_operation_preview_end_preview(&this);
19666 // Returns whether the given page is included in the set of pages that
19667 // have been selected for printing.
19668 // RETURNS: %TRUE if the page has been selected for printing
19669 // <page_nr>: a page number
19670 int is_selected(int page_nr) {
19671 return gtk_print_operation_preview_is_selected(&this, page_nr);
19674 // Renders a page to the preview, using the print context that
19675 // was passed to the #GtkPrintOperation::preview handler together
19676 // with @preview.
19677 // A custom iprint preview should use this function in its ::expose
19678 // handler to render the currently selected page.
19679 // Note that this function requires a suitable cairo context to
19680 // be associated with the print context.
19681 // <page_nr>: the page to render
19682 void render_page(int page_nr) {
19683 gtk_print_operation_preview_render_page(&this, page_nr);
19686 // The ::got-page-size signal is emitted once for each page
19687 // that gets rendered to the preview.
19688 // A handler for this signal should update the @context
19689 // according to @page_setup and set up a suitable cairo
19690 // context, using gtk_print_context_set_cairo_context().
19691 // <context>: the current #GtkPrintContext
19692 // <page_setup>: the #GtkPageSetup for the current page
19693 extern (C) alias static void function (PrintOperationPreview* this_, PrintContext* context, PageSetup* page_setup, void* user_data=null) signal_got_page_size;
19695 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19696 return super_.signal_connect!name(cb, data, cf);
19699 ulong signal_connect(string name:"got-page-size", CB/*:signal_got_page_size*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19700 return signal_connect_data(&this, cast(char*)"got-page-size",
19701 cast(GObject2.Callback)cb, data, null, cf);
19704 // The ::ready signal gets emitted once per preview operation,
19705 // before the first page is rendered.
19706 // A handler for this signal can be used for setup tasks.
19707 // <context>: the current #GtkPrintContext
19708 extern (C) alias static void function (PrintOperationPreview* this_, PrintContext* context, void* user_data=null) signal_ready;
19709 ulong signal_connect(string name:"ready", CB/*:signal_ready*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19710 return signal_connect_data(&this, cast(char*)"ready",
19711 cast(GObject2.Callback)cb, data, null, cf);
19715 struct PrintOperationPreviewIface {
19716 GObject2.TypeInterface g_iface;
19717 extern (C) void function (PrintOperationPreview* preview, PrintContext* context) ready;
19718 extern (C) void function (PrintOperationPreview* preview, PrintContext* context, PageSetup* page_setup) got_page_size;
19719 // <page_nr>: the page to render
19720 extern (C) void function (PrintOperationPreview* preview, int page_nr) render_page;
19722 // RETURNS: %TRUE if the page has been selected for printing
19723 // <page_nr>: a page number
19724 extern (C) int function (PrintOperationPreview* preview, int page_nr) is_selected;
19725 extern (C) void function (PrintOperationPreview* preview) end_preview;
19726 extern (C) void function () _gtk_reserved1;
19727 extern (C) void function () _gtk_reserved2;
19728 extern (C) void function () _gtk_reserved3;
19729 extern (C) void function () _gtk_reserved4;
19730 extern (C) void function () _gtk_reserved5;
19731 extern (C) void function () _gtk_reserved6;
19732 extern (C) void function () _gtk_reserved7;
19735 struct PrintOperationPrivate {
19738 enum PrintOperationResult {
19739 ERROR = 0,
19740 APPLY = 1,
19741 CANCEL = 2,
19742 IN_PROGRESS = 3
19744 enum PrintPages {
19745 ALL = 0,
19746 CURRENT = 1,
19747 RANGES = 2,
19748 SELECTION = 3
19750 enum PrintQuality {
19751 LOW = 0,
19752 NORMAL = 1,
19753 HIGH = 2,
19754 DRAFT = 3
19756 struct PrintSettings /* : GObject.Object */ {
19757 alias method_parent this;
19758 alias method_parent super_;
19759 alias method_parent object;
19760 GObject2.Object method_parent;
19763 // Creates a new #GtkPrintSettings object.
19764 // RETURNS: a new #GtkPrintSettings object
19765 static PrintSettings* /*new*/ new_() {
19766 return gtk_print_settings_new();
19769 // Reads the print settings from @file_name. Returns a new #GtkPrintSettings
19770 // object with the restored settings, or %NULL if an error occurred. If the
19771 // file could not be loaded then error is set to either a #GFileError or
19772 // #GKeyFileError. See gtk_print_settings_to_file().
19773 // RETURNS: the restored #GtkPrintSettings
19774 // <file_name>: the filename to read the settings from
19775 static PrintSettings* /*new*/ new_from_file(char* file_name, GLib2.Error** error=null) {
19776 return gtk_print_settings_new_from_file(file_name, error);
19779 // Reads the print settings from the group @group_name in @key_file. Returns a
19780 // new #GtkPrintSettings object with the restored settings, or %NULL if an
19781 // error occurred. If the file could not be loaded then error is set to either
19782 // a #GFileError or #GKeyFileError.
19783 // RETURNS: the restored #GtkPrintSettings
19784 // <key_file>: the #GKeyFile to retrieve the settings from
19785 // <group_name>: the name of the group to use, or %NULL to use the default "Print Settings"
19786 static PrintSettings* /*new*/ new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
19787 return gtk_print_settings_new_from_key_file(key_file, group_name, error);
19790 // Copies a #GtkPrintSettings object.
19791 // RETURNS: a newly allocated copy of @other
19792 PrintSettings* /*new*/ copy() {
19793 return gtk_print_settings_copy(&this);
19796 // Calls @func for each key-value pair of @settings.
19797 // <func>: the function to call
19798 // <user_data>: user data for @func
19799 void foreach_(PrintSettingsFunc func, void* user_data) {
19800 gtk_print_settings_foreach(&this, func, user_data);
19803 // Looks up the string value associated with @key.
19804 // RETURNS: the string value for @key
19805 // <key>: a key
19806 char* get(char* key) {
19807 return gtk_print_settings_get(&this, key);
19810 // Returns the boolean represented by the value
19811 // that is associated with @key.
19812 // The string "true" represents %TRUE, any other
19813 // string %FALSE.
19814 // RETURNS: %TRUE, if @key maps to a true value.
19815 // <key>: a key
19816 int get_bool(char* key) {
19817 return gtk_print_settings_get_bool(&this, key);
19820 // Gets the value of %GTK_PRINT_SETTINGS_COLLATE.
19821 // RETURNS: whether to collate the printed pages
19822 int get_collate() {
19823 return gtk_print_settings_get_collate(&this);
19826 // Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
19827 // RETURNS: the default source
19828 char* get_default_source() {
19829 return gtk_print_settings_get_default_source(&this);
19832 // Gets the value of %GTK_PRINT_SETTINGS_DITHER.
19833 // RETURNS: the dithering that is used
19834 char* get_dither() {
19835 return gtk_print_settings_get_dither(&this);
19838 // Returns the double value associated with @key, or 0.
19839 // RETURNS: the double value of @key
19840 // <key>: a key
19841 double get_double(char* key) {
19842 return gtk_print_settings_get_double(&this, key);
19845 // Returns the floating point number represented by
19846 // the value that is associated with @key, or @default_val
19847 // if the value does not represent a floating point number.
19848 // Floating point numbers are parsed with g_ascii_strtod().
19849 // RETURNS: the floating point number associated with @key
19850 // <key>: a key
19851 // <def>: the default value
19852 double get_double_with_default(char* key, double def) {
19853 return gtk_print_settings_get_double_with_default(&this, key, def);
19856 // Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.
19857 // RETURNS: whether to print the output in duplex.
19858 PrintDuplex get_duplex() {
19859 return gtk_print_settings_get_duplex(&this);
19862 // Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
19863 // RETURNS: the finishings
19864 char* get_finishings() {
19865 return gtk_print_settings_get_finishings(&this);
19868 // Returns the integer value of @key, or 0.
19869 // RETURNS: the integer value of @key
19870 // <key>: a key
19871 int get_int(char* key) {
19872 return gtk_print_settings_get_int(&this, key);
19875 // Returns the value of @key, interpreted as
19876 // an integer, or the default value.
19877 // RETURNS: the integer value of @key
19878 // <key>: a key
19879 // <def>: the default value
19880 int get_int_with_default(char* key, int def) {
19881 return gtk_print_settings_get_int_with_default(&this, key, def);
19884 // Returns the value associated with @key, interpreted
19885 // as a length. The returned value is converted to @units.
19886 // RETURNS: the length value of @key, converted to @unit
19887 // <key>: a key
19888 // <unit>: the unit of the return value
19889 double get_length(char* key, Unit unit) {
19890 return gtk_print_settings_get_length(&this, key, unit);
19893 // Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
19894 // The set of media types is defined in PWG 5101.1-2002 PWG.
19895 // <!-- FIXME link here -->
19896 // RETURNS: the media type
19897 char* get_media_type() {
19898 return gtk_print_settings_get_media_type(&this);
19901 // Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.
19902 // RETURNS: the number of copies to print
19903 int get_n_copies() {
19904 return gtk_print_settings_get_n_copies(&this);
19907 // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
19908 // RETURNS: the number of pages per sheet
19909 int get_number_up() {
19910 return gtk_print_settings_get_number_up(&this);
19913 // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
19914 // RETURNS: layout of page in number-up mode
19915 NumberUpLayout get_number_up_layout() {
19916 return gtk_print_settings_get_number_up_layout(&this);
19919 // Get the value of %GTK_PRINT_SETTINGS_ORIENTATION,
19920 // converted to a #GtkPageOrientation.
19921 // RETURNS: the orientation
19922 PageOrientation get_orientation() {
19923 return gtk_print_settings_get_orientation(&this);
19926 // Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
19927 // RETURNS: the output bin
19928 char* get_output_bin() {
19929 return gtk_print_settings_get_output_bin(&this);
19932 // Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
19933 // of #GtkPageRange<!-- -->s. Use g_free() to free the array when
19934 // it is no longer needed.
19935 // RETURNS: an array
19936 // <num_ranges>: return location for the length of the returned array
19937 PageRange* /*new*/ get_page_ranges(/*out*/ int* num_ranges) {
19938 return gtk_print_settings_get_page_ranges(&this, num_ranges);
19941 // Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
19942 // RETURNS: the set of pages to print
19943 PageSet get_page_set() {
19944 return gtk_print_settings_get_page_set(&this);
19947 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT,
19948 // converted to @unit.
19949 // RETURNS: the paper height, in units of @unit
19950 // <unit>: the unit for the return value
19951 double get_paper_height(Unit unit) {
19952 return gtk_print_settings_get_paper_height(&this, unit);
19955 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
19956 // converted to a #GtkPaperSize.
19957 // RETURNS: the paper size
19958 PaperSize* /*new*/ get_paper_size() {
19959 return gtk_print_settings_get_paper_size(&this);
19962 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH,
19963 // converted to @unit.
19964 // RETURNS: the paper width, in units of @unit
19965 // <unit>: the unit for the return value
19966 double get_paper_width(Unit unit) {
19967 return gtk_print_settings_get_paper_width(&this, unit);
19970 // Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
19971 // RETURNS: which pages to print
19972 PrintPages get_print_pages() {
19973 return gtk_print_settings_get_print_pages(&this);
19976 // Convenience function to obtain the value of
19977 // %GTK_PRINT_SETTINGS_PRINTER.
19978 // RETURNS: the printer name
19979 char* get_printer() {
19980 return gtk_print_settings_get_printer(&this);
19983 // Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
19984 // RETURNS: the resolution in lpi (lines per inch)
19985 double get_printer_lpi() {
19986 return gtk_print_settings_get_printer_lpi(&this);
19989 // Gets the value of %GTK_PRINT_SETTINGS_QUALITY.
19990 // RETURNS: the print quality
19991 PrintQuality get_quality() {
19992 return gtk_print_settings_get_quality(&this);
19995 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.
19996 // RETURNS: the resolution in dpi
19997 int get_resolution() {
19998 return gtk_print_settings_get_resolution(&this);
20001 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.
20002 // RETURNS: the horizontal resolution in dpi
20003 int get_resolution_x() {
20004 return gtk_print_settings_get_resolution_x(&this);
20007 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.
20008 // RETURNS: the vertical resolution in dpi
20009 int get_resolution_y() {
20010 return gtk_print_settings_get_resolution_y(&this);
20013 // Gets the value of %GTK_PRINT_SETTINGS_REVERSE.
20014 // RETURNS: whether to reverse the order of the printed pages
20015 int get_reverse() {
20016 return gtk_print_settings_get_reverse(&this);
20019 // Gets the value of %GTK_PRINT_SETTINGS_SCALE.
20020 // RETURNS: the scale in percent
20021 double get_scale() {
20022 return gtk_print_settings_get_scale(&this);
20025 // Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
20026 // RETURNS: whether to use color
20027 int get_use_color() {
20028 return gtk_print_settings_get_use_color(&this);
20031 // Returns %TRUE, if a value is associated with @key.
20032 // RETURNS: %TRUE, if @key has a value
20033 // <key>: a key
20034 int has_key(char* key) {
20035 return gtk_print_settings_has_key(&this, key);
20038 // Reads the print settings from @file_name. If the file could not be loaded
20039 // then error is set to either a #GFileError or #GKeyFileError.
20040 // See gtk_print_settings_to_file().
20041 // RETURNS: %TRUE on success
20042 // <file_name>: the filename to read the settings from
20043 int load_file(char* file_name, GLib2.Error** error=null) {
20044 return gtk_print_settings_load_file(&this, file_name, error);
20047 // Reads the print settings from the group @group_name in @key_file. If the
20048 // file could not be loaded then error is set to either a #GFileError or
20049 // #GKeyFileError.
20050 // RETURNS: %TRUE on success
20051 // <key_file>: the #GKeyFile to retrieve the settings from
20052 // <group_name>: the name of the group to use, or %NULL to use the default "Print Settings"
20053 int load_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
20054 return gtk_print_settings_load_key_file(&this, key_file, group_name, error);
20057 // Associates @value with @key.
20058 // <key>: a key
20059 // <value>: a string value, or %NULL
20060 void set(char* key, char* value=null) {
20061 gtk_print_settings_set(&this, key, value);
20064 // Sets @key to a boolean value.
20065 // <key>: a key
20066 // <value>: a boolean
20067 void set_bool(char* key, int value) {
20068 gtk_print_settings_set_bool(&this, key, value);
20071 // Sets the value of %GTK_PRINT_SETTINGS_COLLATE.
20072 // <collate>: whether to collate the output
20073 void set_collate(int collate) {
20074 gtk_print_settings_set_collate(&this, collate);
20077 // Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
20078 // <default_source>: the default source
20079 void set_default_source(char* default_source) {
20080 gtk_print_settings_set_default_source(&this, default_source);
20083 // Sets the value of %GTK_PRINT_SETTINGS_DITHER.
20084 // <dither>: the dithering that is used
20085 void set_dither(char* dither) {
20086 gtk_print_settings_set_dither(&this, dither);
20089 // Sets @key to a double value.
20090 // <key>: a key
20091 // <value>: a double value
20092 void set_double(char* key, double value) {
20093 gtk_print_settings_set_double(&this, key, value);
20096 // Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.
20097 // <duplex>: a #GtkPrintDuplex value
20098 void set_duplex(PrintDuplex duplex) {
20099 gtk_print_settings_set_duplex(&this, duplex);
20102 // Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
20103 // <finishings>: the finishings
20104 void set_finishings(char* finishings) {
20105 gtk_print_settings_set_finishings(&this, finishings);
20108 // Sets @key to an integer value.
20109 // <key>: a key
20110 // <value>: an integer
20111 void set_int(char* key, int value) {
20112 gtk_print_settings_set_int(&this, key, value);
20115 // Associates a length in units of @unit with @key.
20116 // <key>: a key
20117 // <value>: a length
20118 // <unit>: the unit of @length
20119 void set_length(char* key, double value, Unit unit) {
20120 gtk_print_settings_set_length(&this, key, value, unit);
20123 // Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
20124 // The set of media types is defined in PWG 5101.1-2002 PWG.
20125 // <!-- FIXME link here -->
20126 // <media_type>: the media type
20127 void set_media_type(char* media_type) {
20128 gtk_print_settings_set_media_type(&this, media_type);
20131 // Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.
20132 // <num_copies>: the number of copies
20133 void set_n_copies(int num_copies) {
20134 gtk_print_settings_set_n_copies(&this, num_copies);
20137 // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
20138 // <number_up>: the number of pages per sheet
20139 void set_number_up(int number_up) {
20140 gtk_print_settings_set_number_up(&this, number_up);
20143 // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
20144 // <number_up_layout>: a #GtkNumberUpLayout value
20145 void set_number_up_layout(NumberUpLayout number_up_layout) {
20146 gtk_print_settings_set_number_up_layout(&this, number_up_layout);
20149 // Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.
20150 // <orientation>: a page orientation
20151 void set_orientation(PageOrientation orientation) {
20152 gtk_print_settings_set_orientation(&this, orientation);
20155 // Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
20156 // <output_bin>: the output bin
20157 void set_output_bin(char* output_bin) {
20158 gtk_print_settings_set_output_bin(&this, output_bin);
20161 // Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
20162 // <page_ranges>: an array of #GtkPageRange<!-- -->s
20163 // <num_ranges>: the length of @page_ranges
20164 void set_page_ranges(PageRange* page_ranges, int num_ranges) {
20165 gtk_print_settings_set_page_ranges(&this, page_ranges, num_ranges);
20168 // Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
20169 // <page_set>: a #GtkPageSet value
20170 void set_page_set(PageSet page_set) {
20171 gtk_print_settings_set_page_set(&this, page_set);
20174 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
20175 // <height>: the paper height
20176 // <unit>: the units of @height
20177 void set_paper_height(double height, Unit unit) {
20178 gtk_print_settings_set_paper_height(&this, height, unit);
20181 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
20182 // %GTK_PRINT_SETTINGS_PAPER_WIDTH and
20183 // %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
20184 // <paper_size>: a paper size
20185 void set_paper_size(PaperSize* paper_size) {
20186 gtk_print_settings_set_paper_size(&this, paper_size);
20189 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.
20190 // <width>: the paper width
20191 // <unit>: the units of @width
20192 void set_paper_width(double width, Unit unit) {
20193 gtk_print_settings_set_paper_width(&this, width, unit);
20196 // Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
20197 // <pages>: a #GtkPrintPages value
20198 void set_print_pages(PrintPages pages) {
20199 gtk_print_settings_set_print_pages(&this, pages);
20202 // Convenience function to set %GTK_PRINT_SETTINGS_PRINTER
20203 // to @printer.
20204 // <printer>: the printer name
20205 void set_printer(char* printer) {
20206 gtk_print_settings_set_printer(&this, printer);
20209 // Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
20210 // <lpi>: the resolution in lpi (lines per inch)
20211 void set_printer_lpi(double lpi) {
20212 gtk_print_settings_set_printer_lpi(&this, lpi);
20215 // Sets the value of %GTK_PRINT_SETTINGS_QUALITY.
20216 // <quality>: a #GtkPrintQuality value
20217 void set_quality(PrintQuality quality) {
20218 gtk_print_settings_set_quality(&this, quality);
20221 // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
20222 // %GTK_PRINT_SETTINGS_RESOLUTION_X and
20223 // %GTK_PRINT_SETTINGS_RESOLUTION_Y.
20224 // <resolution>: the resolution in dpi
20225 void set_resolution(int resolution) {
20226 gtk_print_settings_set_resolution(&this, resolution);
20229 // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
20230 // %GTK_PRINT_SETTINGS_RESOLUTION_X and
20231 // %GTK_PRINT_SETTINGS_RESOLUTION_Y.
20232 // <resolution_x>: the horizontal resolution in dpi
20233 // <resolution_y>: the vertical resolution in dpi
20234 void set_resolution_xy(int resolution_x, int resolution_y) {
20235 gtk_print_settings_set_resolution_xy(&this, resolution_x, resolution_y);
20238 // Sets the value of %GTK_PRINT_SETTINGS_REVERSE.
20239 // <reverse>: whether to reverse the output
20240 void set_reverse(int reverse) {
20241 gtk_print_settings_set_reverse(&this, reverse);
20244 // Sets the value of %GTK_PRINT_SETTINGS_SCALE.
20245 // <scale>: the scale in percent
20246 void set_scale(double scale) {
20247 gtk_print_settings_set_scale(&this, scale);
20250 // Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
20251 // <use_color>: whether to use color
20252 void set_use_color(int use_color) {
20253 gtk_print_settings_set_use_color(&this, use_color);
20256 // This function saves the print settings from @settings to @file_name. If the
20257 // file could not be loaded then error is set to either a #GFileError or
20258 // #GKeyFileError.
20259 // RETURNS: %TRUE on success
20260 // <file_name>: the file to save to
20261 int to_file(char* file_name, GLib2.Error** error=null) {
20262 return gtk_print_settings_to_file(&this, file_name, error);
20265 // This function adds the print settings from @settings to @key_file.
20266 // <key_file>: the #GKeyFile to save the print settings to
20267 // <group_name>: the group to add the settings to in @key_file, or %NULL to use the default "Print Settings"
20268 void to_key_file(GLib2.KeyFile* key_file, char* group_name) {
20269 gtk_print_settings_to_key_file(&this, key_file, group_name);
20272 // Removes any value associated with @key.
20273 // This has the same effect as setting the value to %NULL.
20274 // <key>: a key
20275 void unset(char* key) {
20276 gtk_print_settings_unset(&this, key);
20280 extern (C) alias void function (char* key, char* value, void* user_data) PrintSettingsFunc;
20282 enum PrintStatus {
20283 INITIAL = 0,
20284 PREPARING = 1,
20285 GENERATING_DATA = 2,
20286 SENDING_DATA = 3,
20287 PENDING = 4,
20288 PENDING_ISSUE = 5,
20289 PRINTING = 6,
20290 FINISHED = 7,
20291 FINISHED_ABORTED = 8
20293 enum PrivateFlags {
20294 USER_STYLE = 1,
20295 RESIZE_PENDING = 4,
20296 HAS_POINTER = 8,
20297 SHADOWED = 16,
20298 HAS_SHAPE_MASK = 32,
20299 IN_REPARENT = 64,
20300 DIRECTION_SET = 128,
20301 DIRECTION_LTR = 256,
20302 ANCHORED = 512,
20303 CHILD_VISIBLE = 1024,
20304 REDRAW_ON_ALLOC = 2048,
20305 ALLOC_NEEDED = 4096,
20306 REQUEST_NEEDED = 8192
20308 struct Progress /* : Widget */ {
20309 alias widget this;
20310 alias widget super_;
20311 Widget widget;
20312 Adjustment* adjustment;
20313 Gdk2.Pixmap* offscreen_pixmap;
20314 char* format;
20315 float x_align, y_align;
20316 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20317 uint, "show_text", 1,
20318 uint, "activity_mode", 1,
20319 uint, "use_text_format", 1,
20320 uint, "__dummy32A", 29));
20322 void configure(double value, double min, double max) {
20323 gtk_progress_configure(&this, value, min, max);
20325 double get_current_percentage() {
20326 return gtk_progress_get_current_percentage(&this);
20328 char* /*new*/ get_current_text() {
20329 return gtk_progress_get_current_text(&this);
20331 double get_percentage_from_value(double value) {
20332 return gtk_progress_get_percentage_from_value(&this, value);
20334 char* /*new*/ get_text_from_value(double value) {
20335 return gtk_progress_get_text_from_value(&this, value);
20337 double get_value() {
20338 return gtk_progress_get_value(&this);
20340 void set_activity_mode(int activity_mode) {
20341 gtk_progress_set_activity_mode(&this, activity_mode);
20343 void set_adjustment(Adjustment* adjustment) {
20344 gtk_progress_set_adjustment(&this, adjustment);
20346 void set_format_string(char* format) {
20347 gtk_progress_set_format_string(&this, format);
20349 void set_percentage(double percentage) {
20350 gtk_progress_set_percentage(&this, percentage);
20352 void set_show_text(int show_text) {
20353 gtk_progress_set_show_text(&this, show_text);
20355 void set_text_alignment(float x_align, float y_align) {
20356 gtk_progress_set_text_alignment(&this, x_align, y_align);
20358 void set_value(double value) {
20359 gtk_progress_set_value(&this, value);
20363 struct ProgressBar /* : Progress */ {
20364 alias progress this;
20365 alias progress super_;
20366 Progress progress;
20367 ProgressBarStyle bar_style;
20368 ProgressBarOrientation orientation;
20369 uint blocks;
20370 int in_block, activity_pos;
20371 uint activity_step, activity_blocks;
20372 double pulse_fraction;
20373 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20374 uint, "activity_dir", 1,
20375 uint, "ellipsize", 3,
20376 uint, "dirty", 1,
20377 uint, "__dummy32A", 27));
20380 // Creates a new #GtkProgressBar.
20381 // RETURNS: a #GtkProgressBar.
20382 static ProgressBar* new_() {
20383 return gtk_progress_bar_new();
20386 // Creates a new #GtkProgressBar with an associated #GtkAdjustment.
20387 // RETURNS: a #GtkProgressBar.
20388 static ProgressBar* new_with_adjustment(Adjustment* adjustment=null) {
20389 return gtk_progress_bar_new_with_adjustment(adjustment);
20392 // Returns the ellipsizing position of the progressbar.
20393 // See gtk_progress_bar_set_ellipsize().
20394 // RETURNS: #PangoEllipsizeMode
20395 Pango.EllipsizeMode get_ellipsize() {
20396 return gtk_progress_bar_get_ellipsize(&this);
20399 // Returns the current fraction of the task that's been completed.
20400 // RETURNS: a fraction from 0.0 to 1.0
20401 double get_fraction() {
20402 return gtk_progress_bar_get_fraction(&this);
20405 // Retrieves the current progress bar orientation.
20406 // RETURNS: orientation of the progress bar
20407 ProgressBarOrientation get_orientation() {
20408 return gtk_progress_bar_get_orientation(&this);
20411 // Retrieves the pulse step set with gtk_progress_bar_set_pulse_step()
20412 // RETURNS: a fraction from 0.0 to 1.0
20413 double get_pulse_step() {
20414 return gtk_progress_bar_get_pulse_step(&this);
20417 // Retrieves the text displayed superimposed on the progress bar,
20418 // if any, otherwise %NULL. The return value is a reference
20419 // to the text, not a copy of it, so will become invalid
20420 // if you change the text in the progress bar.
20421 // and should not be modified or freed.
20422 // RETURNS: text, or %NULL; this string is owned by the widget
20423 char* get_text() {
20424 return gtk_progress_bar_get_text(&this);
20427 // Indicates that some progress is made, but you don't know how much.
20428 // Causes the progress bar to enter "activity mode," where a block
20429 // bounces back and forth. Each call to gtk_progress_bar_pulse()
20430 // causes the block to move by a little bit (the amount of movement
20431 // per pulse is determined by gtk_progress_bar_set_pulse_step()).
20432 void pulse() {
20433 gtk_progress_bar_pulse(&this);
20435 void set_activity_blocks(uint blocks) {
20436 gtk_progress_bar_set_activity_blocks(&this, blocks);
20438 void set_activity_step(uint step) {
20439 gtk_progress_bar_set_activity_step(&this, step);
20441 void set_bar_style(ProgressBarStyle style) {
20442 gtk_progress_bar_set_bar_style(&this, style);
20444 void set_discrete_blocks(uint blocks) {
20445 gtk_progress_bar_set_discrete_blocks(&this, blocks);
20448 // if there is not enough space to render the entire string.
20449 // <mode>: a #PangoEllipsizeMode
20450 void set_ellipsize(Pango.EllipsizeMode mode) {
20451 gtk_progress_bar_set_ellipsize(&this, mode);
20454 // Causes the progress bar to "fill in" the given fraction
20455 // of the bar. The fraction should be between 0.0 and 1.0,
20456 // inclusive.
20457 // <fraction>: fraction of the task that's been completed
20458 void set_fraction(double fraction) {
20459 gtk_progress_bar_set_fraction(&this, fraction);
20462 // Causes the progress bar to switch to a different orientation
20463 // (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
20464 // <orientation>: orientation of the progress bar
20465 void set_orientation(ProgressBarOrientation orientation) {
20466 gtk_progress_bar_set_orientation(&this, orientation);
20469 // Sets the fraction of total progress bar length to move the
20470 // bouncing block for each call to gtk_progress_bar_pulse().
20471 // <fraction>: fraction between 0.0 and 1.0
20472 void set_pulse_step(double fraction) {
20473 gtk_progress_bar_set_pulse_step(&this, fraction);
20476 // Causes the given @text to appear superimposed on the progress bar.
20477 // <text>: a UTF-8 string, or %NULL
20478 void set_text(char* text=null) {
20479 gtk_progress_bar_set_text(&this, text);
20481 void update(double percentage) {
20482 gtk_progress_bar_update(&this, percentage);
20486 struct ProgressBarClass {
20487 ProgressClass parent_class;
20488 extern (C) void function () _gtk_reserved1;
20489 extern (C) void function () _gtk_reserved2;
20490 extern (C) void function () _gtk_reserved3;
20491 extern (C) void function () _gtk_reserved4;
20494 enum ProgressBarOrientation {
20495 LEFT_TO_RIGHT = 0,
20496 RIGHT_TO_LEFT = 1,
20497 BOTTOM_TO_TOP = 2,
20498 TOP_TO_BOTTOM = 3
20500 enum ProgressBarStyle {
20501 CONTINUOUS = 0,
20502 DISCRETE = 1
20504 struct ProgressClass {
20505 WidgetClass parent_class;
20506 extern (C) void function (Progress* progress) paint;
20507 extern (C) void function (Progress* progress) update;
20508 extern (C) void function (Progress* progress) act_mode_enter;
20509 extern (C) void function () _gtk_reserved1;
20510 extern (C) void function () _gtk_reserved2;
20511 extern (C) void function () _gtk_reserved3;
20512 extern (C) void function () _gtk_reserved4;
20515 struct RadioAction /* : ToggleAction */ {
20516 alias parent this;
20517 alias parent super_;
20518 alias parent toggleaction;
20519 ToggleAction parent;
20520 private RadioActionPrivate* private_data;
20523 // Creates a new #GtkRadioAction object. To add the action to
20524 // a #GtkActionGroup and set the accelerator for the action,
20525 // call gtk_action_group_add_action_with_accel().
20526 // RETURNS: a new #GtkRadioAction
20527 // <name>: A unique name for the action
20528 // <label>: The label displayed in menu items and on buttons, or %NULL
20529 // <tooltip>: A tooltip for this action, or %NULL
20530 // <stock_id>: The stock icon to display in widgets representing this action, or %NULL
20531 // <value>: The value which gtk_radio_action_get_current_value() should return if this action is selected.
20532 static RadioAction* /*new*/ new_(char* name, char* label, char* tooltip, char* stock_id, int value) {
20533 return gtk_radio_action_new(name, label, tooltip, stock_id, value);
20536 // Obtains the value property of the currently active member of
20537 // the group to which @action belongs.
20538 // RETURNS: The value of the currently active group member
20539 int get_current_value() {
20540 return gtk_radio_action_get_current_value(&this);
20543 // Returns the list representing the radio group for this object.
20544 // Note that the returned list is only valid until the next change
20545 // to the group.
20546 // A common way to set up a group of radio group is the following:
20547 // |[
20548 // GSList *group = NULL;
20549 // GtkRadioAction *action;
20550 // while (/&ast; more actions to add &ast;/)
20551 // {
20552 // action = gtk_radio_action_new (...);
20553 // gtk_radio_action_set_group (action, group);
20554 // group = gtk_radio_action_get_group (action);
20555 // }
20556 // ]|
20557 // RETURNS: the list representing the radio group for this object
20558 GLib2.SList* get_group() {
20559 return gtk_radio_action_get_group(&this);
20562 // Sets the currently active group member to the member with value
20563 // property @current_value.
20564 // <current_value>: the new value
20565 void set_current_value(int current_value) {
20566 gtk_radio_action_set_current_value(&this, current_value);
20569 // Sets the radio group for the radio action object.
20570 // <group>: a list representing a radio group
20571 void set_group(GLib2.SList* group) {
20572 gtk_radio_action_set_group(&this, group);
20575 // The ::changed signal is emitted on every member of a radio group when the
20576 // active member is changed. The signal gets emitted after the ::activate signals
20577 // for the previous and current active members.
20578 // <current>: the member of @action<!-- -->s group which has just been activated
20579 extern (C) alias static void function (RadioAction* this_, RadioAction* current, void* user_data=null) signal_changed;
20581 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20582 return super_.signal_connect!name(cb, data, cf);
20585 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20586 return signal_connect_data(&this, cast(char*)"changed",
20587 cast(GObject2.Callback)cb, data, null, cf);
20591 struct RadioActionClass {
20592 ToggleActionClass parent_class;
20593 extern (C) void function (RadioAction* action, RadioAction* current) changed;
20594 extern (C) void function () _gtk_reserved1;
20595 extern (C) void function () _gtk_reserved2;
20596 extern (C) void function () _gtk_reserved3;
20597 extern (C) void function () _gtk_reserved4;
20600 struct RadioActionEntry {
20601 char* name, stock_id, label, accelerator, tooltip;
20602 int value;
20605 struct RadioActionPrivate {
20608 struct RadioButton /* : CheckButton */ {
20609 alias check_button this;
20610 alias check_button super_;
20611 alias check_button checkbutton;
20612 CheckButton check_button;
20613 GLib2.SList* group;
20616 // Creates a new #GtkRadioButton. To be of any practical value, a widget should
20617 // then be packed into the radio button.
20618 // RETURNS: a new radio button
20619 // <group>: an existing radio button group, or %NULL if you are creating a new group.
20620 static RadioButton* new_(GLib2.SList* group=null) {
20621 return gtk_radio_button_new(group);
20624 // Creates a new #GtkRadioButton with a text label.
20625 // RETURNS: a new radio button.
20626 // <group>: an existing radio button group, or %NULL if you are creating a new group.
20627 // <label>: the text label to display next to the radio button.
20628 static RadioButton* new_with_label(GLib2.SList* group, char* label) {
20629 return gtk_radio_button_new_with_label(group, label);
20632 // Creates a new #GtkRadioButton with a text label, adding it to
20633 // the same group as @radio_group_member.
20634 // RETURNS: a new radio button.
20635 // <radio_group_member>: widget to get radio group from or %NULL
20636 // <label>: a text string to display next to the radio button.
20637 static RadioButton* new_with_label_from_widget(RadioButton* radio_group_member, char* label) {
20638 return gtk_radio_button_new_with_label_from_widget(radio_group_member, label);
20641 // Creates a new #GtkRadioButton containing a label, adding it to the same
20642 // group as @group. The label will be created using
20643 // gtk_label_new_with_mnemonic(), so underscores in @label indicate the
20644 // mnemonic for the button.
20645 // RETURNS: a new #GtkRadioButton
20646 // <group>: the radio button group
20647 // <label>: the text of the button, with an underscore in front of the mnemonic character
20648 static RadioButton* new_with_mnemonic(GLib2.SList* group, char* label) {
20649 return gtk_radio_button_new_with_mnemonic(group, label);
20652 // Creates a new #GtkRadioButton containing a label. The label
20653 // will be created using gtk_label_new_with_mnemonic(), so underscores
20654 // in @label indicate the mnemonic for the button.
20655 // RETURNS: a new #GtkRadioButton
20656 // <radio_group_member>: widget to get radio group from or %NULL
20657 // <label>: the text of the button, with an underscore in front of the mnemonic character
20658 static RadioButton* new_with_mnemonic_from_widget(RadioButton* radio_group_member, char* label) {
20659 return gtk_radio_button_new_with_mnemonic_from_widget(radio_group_member, label);
20662 // Retrieves the group assigned to a radio button.
20663 // containing all the radio buttons in the same group
20664 // as @radio_button. The returned list is owned by the radio button
20665 // and must not be modified or freed.
20666 // RETURNS: a linked list
20667 GLib2.SList* get_group() {
20668 return gtk_radio_button_get_group(&this);
20671 // Creates a new #GtkRadioButton, adding it to the same group as
20672 // should be packed into the radio button.
20673 // RETURNS: a new radio button.
20674 Widget* new_from_widget() {
20675 return gtk_radio_button_new_from_widget(&this);
20678 // Sets a #GtkRadioButton's group. It should be noted that this does not change
20679 // the layout of your interface in any way, so if you are changing the group,
20680 // it is likely you will need to re-arrange the user interface to reflect these
20681 // changes.
20682 // <group>: an existing radio button group, such as one returned from gtk_radio_button_get_group().
20683 void set_group(GLib2.SList* group) {
20684 gtk_radio_button_set_group(&this, group);
20687 // Emitted when the group of radio buttons that a radio button belongs
20688 // to changes. This is emitted when a radio button switches from
20689 // being alone to being part of a group of 2 or more buttons, or
20690 // vice-versa, and when a button is moved from one group of 2 or
20691 // more buttons to a different one, but not when the composition
20692 // of the group that a button belongs to changes.
20693 extern (C) alias static void function (RadioButton* this_, void* user_data=null) signal_group_changed;
20695 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20696 return super_.signal_connect!name(cb, data, cf);
20699 ulong signal_connect(string name:"group-changed", CB/*:signal_group_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20700 return signal_connect_data(&this, cast(char*)"group-changed",
20701 cast(GObject2.Callback)cb, data, null, cf);
20705 struct RadioButtonClass {
20706 CheckButtonClass parent_class;
20707 extern (C) void function (RadioButton* radio_button) group_changed;
20708 extern (C) void function () _gtk_reserved2;
20709 extern (C) void function () _gtk_reserved3;
20710 extern (C) void function () _gtk_reserved4;
20713 struct RadioMenuItem /* : CheckMenuItem */ {
20714 alias check_menu_item this;
20715 alias check_menu_item super_;
20716 alias check_menu_item checkmenuitem;
20717 CheckMenuItem check_menu_item;
20718 GLib2.SList* group;
20720 static RadioMenuItem* new_(GLib2.SList* group) {
20721 return gtk_radio_menu_item_new(group);
20724 // Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
20725 // RETURNS: A new #GtkRadioMenuItem
20726 // <label>: the text for the label
20727 static RadioMenuItem* new_with_label(GLib2.SList* group, char* label) {
20728 return gtk_radio_menu_item_new_with_label(group, label);
20731 // Creates a new #GtkRadioMenuItem containing a label. The label
20732 // will be created using gtk_label_new_with_mnemonic(), so underscores
20733 // in @label indicate the mnemonic for the menu item.
20734 // RETURNS: a new #GtkRadioMenuItem
20735 // <group>: group the radio menu item is inside
20736 // <label>: the text of the button, with an underscore in front of the mnemonic character
20737 static RadioMenuItem* new_with_mnemonic(GLib2.SList* group, char* label) {
20738 return gtk_radio_menu_item_new_with_mnemonic(group, label);
20741 // Returns the group to which the radio menu item belongs, as a #GList of
20742 // #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
20743 // RETURNS: the group of @radio_menu_item
20744 GLib2.SList* get_group() {
20745 return gtk_radio_menu_item_get_group(&this);
20748 // Creates a new #GtkRadioMenuItem adding it to the same group as @group.
20749 // RETURNS: The new #GtkRadioMenuItem
20750 Widget* new_from_widget() {
20751 return gtk_radio_menu_item_new_from_widget(&this);
20754 // Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
20755 // The new #GtkRadioMenuItem is added to the same group as @group.
20756 // RETURNS: The new #GtkRadioMenuItem
20757 // <label>: the text for the label
20758 Widget* new_with_label_from_widget(char* label) {
20759 return gtk_radio_menu_item_new_with_label_from_widget(&this, label);
20762 // Creates a new GtkRadioMenuItem containing a label. The label will be
20763 // created using gtk_label_new_with_mnemonic(), so underscores in label
20764 // indicate the mnemonic for the menu item.
20765 // The new #GtkRadioMenuItem is added to the same group as @group.
20766 // RETURNS: The new #GtkRadioMenuItem
20767 // <label>: the text of the button, with an underscore in front of the mnemonic character
20768 Widget* new_with_mnemonic_from_widget(char* label) {
20769 return gtk_radio_menu_item_new_with_mnemonic_from_widget(&this, label);
20771 void set_group(GLib2.SList* group) {
20772 gtk_radio_menu_item_set_group(&this, group);
20774 extern (C) alias static void function (RadioMenuItem* this_, void* user_data=null) signal_group_changed;
20776 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20777 return super_.signal_connect!name(cb, data, cf);
20780 ulong signal_connect(string name:"group-changed", CB/*:signal_group_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20781 return signal_connect_data(&this, cast(char*)"group-changed",
20782 cast(GObject2.Callback)cb, data, null, cf);
20786 struct RadioMenuItemClass {
20787 CheckMenuItemClass parent_class;
20788 extern (C) void function (RadioMenuItem* radio_menu_item) group_changed;
20789 extern (C) void function () _gtk_reserved2;
20790 extern (C) void function () _gtk_reserved3;
20791 extern (C) void function () _gtk_reserved4;
20794 struct RadioToolButton /* : ToggleToolButton */ {
20795 alias parent this;
20796 alias parent super_;
20797 alias parent toggletoolbutton;
20798 ToggleToolButton parent;
20801 // Creates a new #GtkRadioToolButton, adding it to @group.
20802 // RETURNS: The new #GtkRadioToolButton
20803 // <group>: An existing radio button group, or %NULL if you are creating a new group
20804 static RadioToolButton* new_(GLib2.SList* group=null) {
20805 return gtk_radio_tool_button_new(group);
20808 // Creates a new #GtkRadioToolButton, adding it to @group.
20809 // The new #GtkRadioToolButton will contain an icon and label from the
20810 // stock item indicated by @stock_id.
20811 // RETURNS: The new #GtkRadioToolItem
20812 // <group>: an existing radio button group, or %NULL if you are creating a new group
20813 // <stock_id>: the name of a stock item
20814 static RadioToolButton* new_from_stock(GLib2.SList* group, char* stock_id) {
20815 return gtk_radio_tool_button_new_from_stock(group, stock_id);
20818 // Returns the radio button group @button belongs to.
20819 // RETURNS: The group @button belongs to.
20820 GLib2.SList* get_group() {
20821 return gtk_radio_tool_button_get_group(&this);
20824 // Creates a new #GtkRadioToolButton adding it to the same group as @gruup
20825 // RETURNS: The new #GtkRadioToolButton
20826 ToolItem* new_from_widget() {
20827 return gtk_radio_tool_button_new_from_widget(&this);
20830 // Creates a new #GtkRadioToolButton adding it to the same group as @group.
20831 // The new #GtkRadioToolButton will contain an icon and label from the
20832 // stock item indicated by @stock_id.
20833 // RETURNS: A new #GtkRadioToolButton
20834 // <stock_id>: the name of a stock item
20835 ToolItem* new_with_stock_from_widget(char* stock_id) {
20836 return gtk_radio_tool_button_new_with_stock_from_widget(&this, stock_id);
20839 // Adds @button to @group, removing it from the group it belonged to before.
20840 // <group>: an existing radio button group
20841 void set_group(GLib2.SList* group) {
20842 gtk_radio_tool_button_set_group(&this, group);
20846 struct RadioToolButtonClass {
20847 ToggleToolButtonClass parent_class;
20848 extern (C) void function () _gtk_reserved1;
20849 extern (C) void function () _gtk_reserved2;
20850 extern (C) void function () _gtk_reserved3;
20851 extern (C) void function () _gtk_reserved4;
20854 struct Range /* : Widget */ {
20855 alias widget this;
20856 alias widget super_;
20857 Widget widget;
20858 Adjustment* adjustment;
20859 UpdateType update_policy;
20860 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20861 uint, "inverted", 1,
20862 uint, "flippable", 1,
20863 uint, "has_stepper_a", 1,
20864 uint, "has_stepper_b", 1,
20865 uint, "has_stepper_c", 1,
20866 uint, "has_stepper_d", 1,
20867 uint, "need_recalc", 1,
20868 uint, "slider_size_fixed", 1,
20869 uint, "__dummy32A", 24));
20870 int min_slider_size;
20871 Orientation orientation;
20872 Gdk2.Rectangle range_rect;
20873 int slider_start, slider_end, round_digits;
20874 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20875 uint, "trough_click_forward", 1,
20876 uint, "update_pending", 1,
20877 uint, "__dummy32B", 30));
20878 private RangeLayout* layout;
20879 private RangeStepTimer* timer;
20880 private int slide_initial_slider_position, slide_initial_coordinate;
20881 private uint update_timeout_id;
20882 private Gdk2.Window* event_window;
20885 // Get the #GtkAdjustment which is the "model" object for #GtkRange.
20886 // See gtk_range_set_adjustment() for details.
20887 // The return value does not have a reference added, so should not
20888 // be unreferenced.
20889 // RETURNS: a #GtkAdjustment
20890 Adjustment* get_adjustment() {
20891 return gtk_range_get_adjustment(&this);
20894 // Gets the current position of the fill level indicator.
20895 // RETURNS: The current fill level
20896 double get_fill_level() {
20897 return gtk_range_get_fill_level(&this);
20900 // Gets the value set by gtk_range_set_flippable().
20901 // RETURNS: %TRUE if the range is flippable
20902 int get_flippable() {
20903 return gtk_range_get_flippable(&this);
20906 // Gets the value set by gtk_range_set_inverted().
20907 // RETURNS: %TRUE if the range is inverted
20908 int get_inverted() {
20909 return gtk_range_get_inverted(&this);
20912 // Gets the sensitivity policy for the stepper that points to the
20913 // 'lower' end of the GtkRange's adjustment.
20914 // RETURNS: The lower stepper's sensitivity policy.
20915 SensitivityType get_lower_stepper_sensitivity() {
20916 return gtk_range_get_lower_stepper_sensitivity(&this);
20919 // This function is useful mainly for #GtkRange subclasses.
20920 // See gtk_range_set_min_slider_size().
20921 // RETURNS: The minimum size of the range's slider.
20922 int get_min_slider_size() {
20923 return gtk_range_get_min_slider_size(&this);
20926 // This function returns the area that contains the range's trough
20927 // and its steppers, in widget->window coordinates.
20928 // This function is useful mainly for #GtkRange subclasses.
20929 // <range_rect>: return location for the range rectangle
20930 void get_range_rect(/*out*/ Gdk2.Rectangle* range_rect) {
20931 gtk_range_get_range_rect(&this, range_rect);
20934 // Gets whether the range is restricted to the fill level.
20935 // RETURNS: %TRUE if @range is restricted to the fill level.
20936 int get_restrict_to_fill_level() {
20937 return gtk_range_get_restrict_to_fill_level(&this);
20940 // Gets the number of digits to round the value to when
20941 // it changes. See #GtkRange::change-value.
20942 // RETURNS: the number of digits to round to
20943 int get_round_digits() {
20944 return gtk_range_get_round_digits(&this);
20947 // Gets whether the range displays the fill level graphically.
20948 // RETURNS: %TRUE if @range shows the fill level.
20949 int get_show_fill_level() {
20950 return gtk_range_get_show_fill_level(&this);
20953 // This function returns sliders range along the long dimension,
20954 // in widget->window coordinates.
20955 // This function is useful mainly for #GtkRange subclasses.
20956 // <slider_start>: return location for the slider's start, or %NULL
20957 // <slider_end>: return location for the slider's end, or %NULL
20958 void get_slider_range(/*out*/ int* slider_start=null, /*out*/ int* slider_end=null) {
20959 gtk_range_get_slider_range(&this, slider_start, slider_end);
20962 // This function is useful mainly for #GtkRange subclasses.
20963 // See gtk_range_set_slider_size_fixed().
20964 // RETURNS: whether the range's slider has a fixed size.
20965 int get_slider_size_fixed() {
20966 return gtk_range_get_slider_size_fixed(&this);
20969 // Gets the update policy of @range. See gtk_range_set_update_policy().
20970 // updates, you need to code it yourself.
20971 // RETURNS: the current update policy
20972 UpdateType get_update_policy() {
20973 return gtk_range_get_update_policy(&this);
20976 // Gets the sensitivity policy for the stepper that points to the
20977 // 'upper' end of the GtkRange's adjustment.
20978 // RETURNS: The upper stepper's sensitivity policy.
20979 SensitivityType get_upper_stepper_sensitivity() {
20980 return gtk_range_get_upper_stepper_sensitivity(&this);
20983 // Gets the current value of the range.
20984 // RETURNS: current value of the range.
20985 double get_value() {
20986 return gtk_range_get_value(&this);
20989 // Sets the adjustment to be used as the "model" object for this range
20990 // widget. The adjustment indicates the current range value, the
20991 // minimum and maximum range values, the step/page increments used
20992 // for keybindings and scrolling, and the page size. The page size
20993 // is normally 0 for #GtkScale and nonzero for #GtkScrollbar, and
20994 // indicates the size of the visible area of the widget being scrolled.
20995 // The page size affects the size of the scrollbar slider.
20996 // <adjustment>: a #GtkAdjustment
20997 void set_adjustment(Adjustment* adjustment) {
20998 gtk_range_set_adjustment(&this, adjustment);
21001 // Set the new position of the fill level indicator.
21002 // The "fill level" is probably best described by its most prominent
21003 // use case, which is an indicator for the amount of pre-buffering in
21004 // a streaming media player. In that use case, the value of the range
21005 // would indicate the current play position, and the fill level would
21006 // be the position up to which the file/stream has been downloaded.
21007 // This amount of prebuffering can be displayed on the range's trough
21008 // and is themeable separately from the trough. To enable fill level
21009 // display, use gtk_range_set_show_fill_level(). The range defaults
21010 // to not showing the fill level.
21011 // Additionally, it's possible to restrict the range's slider position
21012 // to values which are smaller than the fill level. This is controller
21013 // by gtk_range_set_restrict_to_fill_level() and is by default
21014 // enabled.
21015 // <fill_level>: the new position of the fill level indicator
21016 void set_fill_level(double fill_level) {
21017 gtk_range_set_fill_level(&this, fill_level);
21020 // If a range is flippable, it will switch its direction if it is
21021 // horizontal and its direction is %GTK_TEXT_DIR_RTL.
21022 // See gtk_widget_get_direction().
21023 // <flippable>: %TRUE to make the range flippable
21024 void set_flippable(int flippable) {
21025 gtk_range_set_flippable(&this, flippable);
21028 // Sets the step and page sizes for the range.
21029 // The step size is used when the user clicks the #GtkScrollbar
21030 // arrows or moves #GtkScale via arrow keys. The page size
21031 // is used for example when moving via Page Up or Page Down keys.
21032 // <step>: step size
21033 // <page>: page size
21034 void set_increments(double step, double page) {
21035 gtk_range_set_increments(&this, step, page);
21038 // Ranges normally move from lower to higher values as the
21039 // slider moves from top to bottom or left to right. Inverted
21040 // ranges have higher values at the top or on the right rather than
21041 // on the bottom or left.
21042 // <setting>: %TRUE to invert the range
21043 void set_inverted(int setting) {
21044 gtk_range_set_inverted(&this, setting);
21047 // Sets the sensitivity policy for the stepper that points to the
21048 // 'lower' end of the GtkRange's adjustment.
21049 // <sensitivity>: the lower stepper's sensitivity policy.
21050 void set_lower_stepper_sensitivity(SensitivityType sensitivity) {
21051 gtk_range_set_lower_stepper_sensitivity(&this, sensitivity);
21054 // Sets the minimum size of the range's slider.
21055 // This function is useful mainly for #GtkRange subclasses.
21056 // <min_size>: The slider's minimum size
21057 void set_min_slider_size(int min_size) {
21058 gtk_range_set_min_slider_size(&this, min_size);
21061 // Sets the allowable values in the #GtkRange, and clamps the range
21062 // value to be between @min and @max. (If the range has a non-zero
21063 // page size, it is clamped between @min and @max - page-size.)
21064 // <min>: minimum range value
21065 // <max>: maximum range value
21066 void set_range(double min, double max) {
21067 gtk_range_set_range(&this, min, max);
21070 // Sets whether the slider is restricted to the fill level. See
21071 // gtk_range_set_fill_level() for a general description of the fill
21072 // level concept.
21073 // <restrict_to_fill_level>: Whether the fill level restricts slider movement.
21074 void set_restrict_to_fill_level(int restrict_to_fill_level) {
21075 gtk_range_set_restrict_to_fill_level(&this, restrict_to_fill_level);
21078 // Sets the number of digits to round the value to when
21079 // it changes. See #GtkRange::change-value.
21080 // <round_digits>: the precision in digits, or -1
21081 void set_round_digits(int round_digits) {
21082 gtk_range_set_round_digits(&this, round_digits);
21085 // Sets whether a graphical fill level is show on the trough. See
21086 // gtk_range_set_fill_level() for a general description of the fill
21087 // level concept.
21088 // <show_fill_level>: Whether a fill level indicator graphics is shown.
21089 void set_show_fill_level(int show_fill_level) {
21090 gtk_range_set_show_fill_level(&this, show_fill_level);
21093 // Sets whether the range's slider has a fixed size, or a size that
21094 // depends on it's adjustment's page size.
21095 // This function is useful mainly for #GtkRange subclasses.
21096 // <size_fixed>: %TRUE to make the slider size constant
21097 void set_slider_size_fixed(int size_fixed) {
21098 gtk_range_set_slider_size_fixed(&this, size_fixed);
21101 // Sets the update policy for the range. #GTK_UPDATE_CONTINUOUS means that
21102 // anytime the range slider is moved, the range value will change and the
21103 // value_changed signal will be emitted. #GTK_UPDATE_DELAYED means that
21104 // the value will be updated after a brief timeout where no slider motion
21105 // occurs, so updates are spaced by a short time rather than
21106 // continuous. #GTK_UPDATE_DISCONTINUOUS means that the value will only
21107 // be updated when the user releases the button and ends the slider
21108 // drag operation.
21109 // updates, you need to code it yourself.
21110 // <policy>: update policy
21111 void set_update_policy(UpdateType policy) {
21112 gtk_range_set_update_policy(&this, policy);
21115 // Sets the sensitivity policy for the stepper that points to the
21116 // 'upper' end of the GtkRange's adjustment.
21117 // <sensitivity>: the upper stepper's sensitivity policy.
21118 void set_upper_stepper_sensitivity(SensitivityType sensitivity) {
21119 gtk_range_set_upper_stepper_sensitivity(&this, sensitivity);
21122 // Sets the current value of the range; if the value is outside the
21123 // minimum or maximum range values, it will be clamped to fit inside
21124 // them. The range emits the #GtkRange::value-changed signal if the
21125 // value changes.
21126 // <value>: new value of the range
21127 void set_value(double value) {
21128 gtk_range_set_value(&this, value);
21130 extern (C) alias static void function (Range* this_, double object, void* user_data=null) signal_adjust_bounds;
21132 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21133 return super_.signal_connect!name(cb, data, cf);
21136 ulong signal_connect(string name:"adjust-bounds", CB/*:signal_adjust_bounds*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21137 return signal_connect_data(&this, cast(char*)"adjust-bounds",
21138 cast(GObject2.Callback)cb, data, null, cf);
21141 // The ::change-value signal is emitted when a scroll action is
21142 // performed on a range. It allows an application to determine the
21143 // type of scroll event that occurred and the resultant new value.
21144 // The application can handle the event itself and return %TRUE to
21145 // prevent further processing. Or, by returning %FALSE, it can pass
21146 // the event to other handlers until the default GTK+ handler is
21147 // reached.
21148 // The value parameter is unrounded. An application that overrides
21149 // the ::change-value signal is responsible for clamping the value to
21150 // the desired number of decimal digits; the default GTK+ handler
21151 // clamps the value based on #GtkRange:round_digits.
21152 // It is not possible to use delayed update policies in an overridden
21153 // ::change-value handler.
21154 // RETURNS: %TRUE to prevent other handlers from being invoked for the signal, %FALSE to propagate the signal further
21155 // <scroll>: the type of scroll action that was performed
21156 // <value>: the new value resulting from the scroll action
21157 extern (C) alias static c_int function (Range* this_, ScrollType* scroll, double value, void* user_data=null) signal_change_value;
21158 ulong signal_connect(string name:"change-value", CB/*:signal_change_value*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21159 return signal_connect_data(&this, cast(char*)"change-value",
21160 cast(GObject2.Callback)cb, data, null, cf);
21163 // Virtual function that moves the slider. Used for keybindings.
21164 // <step>: how to move the slider
21165 extern (C) alias static void function (Range* this_, ScrollType* step, void* user_data=null) signal_move_slider;
21166 ulong signal_connect(string name:"move-slider", CB/*:signal_move_slider*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21167 return signal_connect_data(&this, cast(char*)"move-slider",
21168 cast(GObject2.Callback)cb, data, null, cf);
21170 // Emitted when the range value changes.
21171 extern (C) alias static void function (Range* this_, void* user_data=null) signal_value_changed;
21172 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21173 return signal_connect_data(&this, cast(char*)"value-changed",
21174 cast(GObject2.Callback)cb, data, null, cf);
21178 struct RangeClass {
21179 WidgetClass parent_class;
21180 char* slider_detail, stepper_detail;
21181 extern (C) void function (Range* range) value_changed;
21182 extern (C) void function (Range* range, double new_value) adjust_bounds;
21183 extern (C) void function (Range* range, ScrollType scroll) move_slider;
21184 extern (C) void function (Range* range, Border* border_) get_range_border;
21185 extern (C) int function (Range* range, ScrollType scroll, double new_value) change_value;
21186 extern (C) void function () _gtk_reserved1;
21187 extern (C) void function () _gtk_reserved2;
21188 extern (C) void function () _gtk_reserved3;
21191 struct RangeLayout {
21194 struct RangeStepTimer {
21197 struct RcContext {
21200 enum RcFlags {
21201 FG = 1,
21202 BG = 2,
21203 TEXT = 4,
21204 BASE = 8
21206 struct RcProperty {
21207 GLib2.Quark type_name, property_name;
21208 char* origin;
21209 GObject2.Value value;
21212 extern (C) alias int function (GObject2.ParamSpec* pspec, GLib2.String* rc_string, GObject2.Value* property_value) RcPropertyParser;
21214 struct RcStyle /* : GObject.Object */ {
21215 alias parent_instance this;
21216 alias parent_instance super_;
21217 alias parent_instance object;
21218 GObject2.Object parent_instance;
21219 char* name;
21220 char*[5] bg_pixmap_name;
21221 Pango.FontDescription* font_desc;
21222 RcFlags[5] color_flags;
21223 Gdk2.Color[5] fg, bg, text, base;
21224 int xthickness, ythickness;
21225 private void*[0] rc_properties;
21226 private GLib2.SList* rc_style_lists, icon_factories;
21227 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21228 uint, "engine_specified", 1,
21229 uint, "__dummy32A", 31));
21231 static RcStyle* /*new*/ new_() {
21232 return gtk_rc_style_new();
21235 // Makes a copy of the specified #GtkRcStyle. This function
21236 // will correctly copy an RC style that is a member of a class
21237 // derived from #GtkRcStyle.
21238 // RETURNS: the resulting #GtkRcStyle
21239 RcStyle* /*new*/ copy() {
21240 return gtk_rc_style_copy(&this);
21242 void ref_() {
21243 gtk_rc_style_ref(&this);
21245 void unref() {
21246 gtk_rc_style_unref(&this);
21250 struct RcStyleClass {
21251 GObject2.ObjectClass parent_class;
21252 // Unintrospectable functionp: create_rc_style() / ()
21253 extern (C) RcStyle* function (RcStyle* rc_style) create_rc_style;
21254 extern (C) uint function (RcStyle* rc_style, Settings* settings, GLib2.Scanner* scanner) parse;
21255 extern (C) void function (RcStyle* dest, RcStyle* src) merge;
21256 // Unintrospectable functionp: create_style() / ()
21257 extern (C) Style* function (RcStyle* rc_style) create_style;
21258 extern (C) void function () _gtk_reserved1;
21259 extern (C) void function () _gtk_reserved2;
21260 extern (C) void function () _gtk_reserved3;
21261 extern (C) void function () _gtk_reserved4;
21264 enum RcTokenType {
21265 INVALID = 270,
21266 INCLUDE = 271,
21267 NORMAL = 272,
21268 ACTIVE = 273,
21269 PRELIGHT = 274,
21270 SELECTED = 275,
21271 INSENSITIVE = 276,
21272 FG = 277,
21273 BG = 278,
21274 TEXT = 279,
21275 BASE = 280,
21276 XTHICKNESS = 281,
21277 YTHICKNESS = 282,
21278 FONT = 283,
21279 FONTSET = 284,
21280 FONT_NAME = 285,
21281 BG_PIXMAP = 286,
21282 PIXMAP_PATH = 287,
21283 STYLE = 288,
21284 BINDING = 289,
21285 BIND = 290,
21286 WIDGET = 291,
21287 WIDGET_CLASS = 292,
21288 CLASS = 293,
21289 LOWEST = 294,
21290 GTK = 295,
21291 APPLICATION = 296,
21292 THEME = 297,
21293 RC = 298,
21294 HIGHEST = 299,
21295 ENGINE = 300,
21296 MODULE_PATH = 301,
21297 IM_MODULE_PATH = 302,
21298 IM_MODULE_FILE = 303,
21299 STOCK = 304,
21300 LTR = 305,
21301 RTL = 306,
21302 COLOR = 307,
21303 UNBIND = 308,
21304 LAST = 309
21306 struct RecentAction /* : Action */ {
21307 alias parent_instance this;
21308 alias parent_instance super_;
21309 alias parent_instance action;
21310 Action parent_instance;
21311 private RecentActionPrivate* priv;
21314 // Creates a new #GtkRecentAction object. To add the action to
21315 // a #GtkActionGroup and set the accelerator for the action,
21316 // call gtk_action_group_add_action_with_accel().
21317 // RETURNS: the newly created #GtkRecentAction.
21318 // <name>: a unique name for the action
21319 // <label>: the label displayed in menu items and on buttons, or %NULL
21320 // <tooltip>: a tooltip for the action, or %NULL
21321 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
21322 static RecentAction* /*new*/ new_(char* name, char* label, char* tooltip, char* stock_id) {
21323 return gtk_recent_action_new(name, label, tooltip, stock_id);
21326 // Creates a new #GtkRecentAction object. To add the action to
21327 // a #GtkActionGroup and set the accelerator for the action,
21328 // call gtk_action_group_add_action_with_accel().
21329 // RETURNS: the newly created #GtkRecentAction
21330 // <name>: a unique name for the action
21331 // <label>: the label displayed in menu items and on buttons, or %NULL
21332 // <tooltip>: a tooltip for the action, or %NULL
21333 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
21334 // <manager>: a #GtkRecentManager, or %NULL for using the default #GtkRecentManager
21335 static RecentAction* /*new*/ new_for_manager(char* name, char* label, char* tooltip, char* stock_id, RecentManager* manager=null) {
21336 return gtk_recent_action_new_for_manager(name, label, tooltip, stock_id, manager);
21339 // Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
21340 // RETURNS: %TRUE if numbers should be shown.
21341 int get_show_numbers() {
21342 return gtk_recent_action_get_show_numbers(&this);
21345 // Sets whether a number should be added to the items shown by the
21346 // widgets representing @action. The numbers are shown to provide
21347 // a unique character for a mnemonic to be used inside the menu item's
21348 // label. Only the first ten items get a number to avoid clashes.
21349 // <show_numbers>: %TRUE if the shown items should be numbered
21350 void set_show_numbers(int show_numbers) {
21351 gtk_recent_action_set_show_numbers(&this, show_numbers);
21355 struct RecentActionClass {
21356 ActionClass parent_class;
21359 struct RecentActionPrivate {
21362 struct RecentChooser {
21364 // Adds @filter to the list of #GtkRecentFilter objects held by @chooser.
21365 // If no previous filter objects were defined, this function will call
21366 // gtk_recent_chooser_set_filter().
21367 // <filter>: a #GtkRecentFilter
21368 void add_filter(RecentFilter* filter) {
21369 gtk_recent_chooser_add_filter(&this, filter);
21372 // Gets the #GtkRecentInfo currently selected by @chooser.
21373 // when you have finished using it.
21374 // RETURNS: a #GtkRecentInfo. Use gtk_recent_info_unref() when
21375 RecentInfo* /*new*/ get_current_item() {
21376 return gtk_recent_chooser_get_current_item(&this);
21379 // Gets the URI currently selected by @chooser.
21380 // RETURNS: a newly allocated string holding a URI.
21381 char* /*new*/ get_current_uri() {
21382 return gtk_recent_chooser_get_current_uri(&this);
21385 // Gets the #GtkRecentFilter object currently used by @chooser to affect
21386 // the display of the recently used resources.
21387 // RETURNS: a #GtkRecentFilter object.
21388 RecentFilter* get_filter() {
21389 return gtk_recent_chooser_get_filter(&this);
21392 // Gets the list of recently used resources in form of #GtkRecentInfo objects.
21393 // The return value of this function is affected by the "sort-type" and
21394 // "limit" properties of @chooser.
21395 // list of #GtkRecentInfo objects. You should
21396 // use gtk_recent_info_unref() on every item of the list, and then free
21397 // the list itself using g_list_free().
21398 // RETURNS: A newly allocated
21399 GLib2.List* /*new*/ get_items() {
21400 return gtk_recent_chooser_get_items(&this);
21403 // Gets the number of items returned by gtk_recent_chooser_get_items()
21404 // and gtk_recent_chooser_get_uris().
21405 // returned.
21406 // RETURNS: A positive integer, or -1 meaning that all items are
21407 int get_limit() {
21408 return gtk_recent_chooser_get_limit(&this);
21411 // Gets whether only local resources should be shown in the recently used
21412 // resources selector. See gtk_recent_chooser_set_local_only()
21413 // RETURNS: %TRUE if only local resources should be shown.
21414 int get_local_only() {
21415 return gtk_recent_chooser_get_local_only(&this);
21418 // Gets whether @chooser can select multiple items.
21419 // RETURNS: %TRUE if @chooser can select more than one item.
21420 int get_select_multiple() {
21421 return gtk_recent_chooser_get_select_multiple(&this);
21424 // Retrieves whether @chooser should show an icon near the resource.
21425 // RETURNS: %TRUE if the icons should be displayed, %FALSE otherwise.
21426 int get_show_icons() {
21427 return gtk_recent_chooser_get_show_icons(&this);
21430 // Retrieves whether @chooser should show the recently used resources that
21431 // were not found.
21432 // %FALSE otheriwse.
21433 // RETURNS: %TRUE if the resources not found should be displayed, and
21434 int get_show_not_found() {
21435 return gtk_recent_chooser_get_show_not_found(&this);
21438 // Returns whether @chooser should display recently used resources
21439 // prepended by a unique number.
21440 // %FALSE otherwise.
21441 // RETURNS: %TRUE if the recent chooser should show display numbers,
21442 int get_show_numbers() {
21443 return gtk_recent_chooser_get_show_numbers(&this);
21446 // Returns whether @chooser should display recently used resources
21447 // registered as private.
21448 // %FALSE otherwise.
21449 // RETURNS: %TRUE if the recent chooser should show private items,
21450 int get_show_private() {
21451 return gtk_recent_chooser_get_show_private(&this);
21454 // Gets whether @chooser should display tooltips containing the full path
21455 // of a recently user resource.
21456 // %FALSE otherwise.
21457 // RETURNS: %TRUE if the recent chooser should show tooltips,
21458 int get_show_tips() {
21459 return gtk_recent_chooser_get_show_tips(&this);
21462 // Gets the value set by gtk_recent_chooser_set_sort_type().
21463 // RETURNS: the sorting order of the @chooser.
21464 RecentSortType get_sort_type() {
21465 return gtk_recent_chooser_get_sort_type(&this);
21468 // Gets the URI of the recently used resources.
21469 // The return value of this function is affected by the "sort-type" and "limit"
21470 // properties of @chooser.
21471 // Since the returned array is %NULL terminated, @length may be %NULL.
21472 // A newly allocated, %NULL-terminated array of strings. Use
21473 // g_strfreev() to free it.
21474 // <length>: return location for a the length of the URI list, or %NULL
21475 char** /*new*/ get_uris(/*out*/ size_t* length=null) {
21476 return gtk_recent_chooser_get_uris(&this, length);
21479 // Gets the #GtkRecentFilter objects held by @chooser.
21480 // of #GtkRecentFilter objects. You
21481 // should just free the returned list using g_slist_free().
21482 // RETURNS: A singly linked list
21483 GLib2.SList* /*new container*/ list_filters() {
21484 return gtk_recent_chooser_list_filters(&this);
21487 // Removes @filter from the list of #GtkRecentFilter objects held by @chooser.
21488 // <filter>: a #GtkRecentFilter
21489 void remove_filter(RecentFilter* filter) {
21490 gtk_recent_chooser_remove_filter(&this, filter);
21493 // Selects all the items inside @chooser, if the @chooser supports
21494 // multiple selection.
21495 void select_all() {
21496 gtk_recent_chooser_select_all(&this);
21499 // Selects @uri inside @chooser.
21500 // RETURNS: %TRUE if @uri was found.
21501 // <uri>: a URI
21502 int select_uri(char* uri, GLib2.Error** error=null) {
21503 return gtk_recent_chooser_select_uri(&this, uri, error);
21506 // Sets @uri as the current URI for @chooser.
21507 // RETURNS: %TRUE if the URI was found.
21508 // <uri>: a URI
21509 int set_current_uri(char* uri, GLib2.Error** error=null) {
21510 return gtk_recent_chooser_set_current_uri(&this, uri, error);
21513 // Sets @filter as the current #GtkRecentFilter object used by @chooser
21514 // to affect the displayed recently used resources.
21515 // <filter>: a #GtkRecentFilter
21516 void set_filter(RecentFilter* filter) {
21517 gtk_recent_chooser_set_filter(&this, filter);
21520 // Sets the number of items that should be returned by
21521 // gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().
21522 // <limit>: a positive integer, or -1 for all items
21523 void set_limit(int limit) {
21524 gtk_recent_chooser_set_limit(&this, limit);
21527 // Sets whether only local resources, that is resources using the file:// URI
21528 // scheme, should be shown in the recently used resources selector. If
21529 // to be accessible through the operating system native file system.
21530 // <local_only>: %TRUE if only local files can be shown
21531 void set_local_only(int local_only) {
21532 gtk_recent_chooser_set_local_only(&this, local_only);
21535 // Sets whether @chooser can select multiple items.
21536 // <select_multiple>: %TRUE if @chooser can select more than one item
21537 void set_select_multiple(int select_multiple) {
21538 gtk_recent_chooser_set_select_multiple(&this, select_multiple);
21541 // Sets whether @chooser should show an icon near the resource when
21542 // displaying it.
21543 // <show_icons>: whether to show an icon near the resource
21544 void set_show_icons(int show_icons) {
21545 gtk_recent_chooser_set_show_icons(&this, show_icons);
21548 // Sets whether @chooser should display the recently used resources that
21549 // it didn't find. This only applies to local resources.
21550 // <show_not_found>: whether to show the local items we didn't find
21551 void set_show_not_found(int show_not_found) {
21552 gtk_recent_chooser_set_show_not_found(&this, show_not_found);
21555 // Whether to show recently used resources prepended by a unique number.
21556 // <show_numbers>: %TRUE to show numbers, %FALSE otherwise
21557 void set_show_numbers(int show_numbers) {
21558 gtk_recent_chooser_set_show_numbers(&this, show_numbers);
21561 // Whether to show recently used resources marked registered as private.
21562 // <show_private>: %TRUE to show private items, %FALSE otherwise
21563 void set_show_private(int show_private) {
21564 gtk_recent_chooser_set_show_private(&this, show_private);
21567 // Sets whether to show a tooltips containing the full path of each
21568 // recently used resource in a #GtkRecentChooser widget.
21569 // <show_tips>: %TRUE if tooltips should be shown
21570 void set_show_tips(int show_tips) {
21571 gtk_recent_chooser_set_show_tips(&this, show_tips);
21574 // Sets the comparison function used when sorting to be @sort_func. If
21575 // the @chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then
21576 // the chooser will sort using this function.
21577 // To the comparison function will be passed two #GtkRecentInfo structs and
21578 // item comes before the second, zero if the two items are equal and
21579 // a negative integer if the first item comes after the second.
21580 // <sort_func>: the comparison function
21581 // <sort_data>: user data to pass to @sort_func, or %NULL
21582 // <data_destroy>: destroy notifier for @sort_data, or %NULL
21583 void set_sort_func(RecentSortFunc sort_func, void* sort_data=null, GLib2.DestroyNotify data_destroy=null) {
21584 gtk_recent_chooser_set_sort_func(&this, sort_func, sort_data, data_destroy);
21587 // Changes the sorting order of the recently used resources list displayed by
21588 // <sort_type>: sort order that the chooser should use
21589 void set_sort_type(RecentSortType sort_type) {
21590 gtk_recent_chooser_set_sort_type(&this, sort_type);
21592 // Unselects all the items inside @chooser.
21593 void unselect_all() {
21594 gtk_recent_chooser_unselect_all(&this);
21597 // Unselects @uri inside @chooser.
21598 // <uri>: a URI
21599 void unselect_uri(char* uri) {
21600 gtk_recent_chooser_unselect_uri(&this, uri);
21603 // This signal is emitted when the user "activates" a recent item
21604 // in the recent chooser. This can happen by double-clicking on an item
21605 // in the recently used resources list, or by pressing
21606 // <keycap>Enter</keycap>.
21607 extern (C) alias static void function (RecentChooser* this_, void* user_data=null) signal_item_activated;
21609 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21610 return super_.signal_connect!name(cb, data, cf);
21613 ulong signal_connect(string name:"item-activated", CB/*:signal_item_activated*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21614 return signal_connect_data(&this, cast(char*)"item-activated",
21615 cast(GObject2.Callback)cb, data, null, cf);
21618 // This signal is emitted when there is a change in the set of
21619 // selected recently used resources. This can happen when a user
21620 // modifies the selection with the mouse or the keyboard, or when
21621 // explicitely calling functions to change the selection.
21622 extern (C) alias static void function (RecentChooser* this_, void* user_data=null) signal_selection_changed;
21623 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21624 return signal_connect_data(&this, cast(char*)"selection-changed",
21625 cast(GObject2.Callback)cb, data, null, cf);
21629 struct RecentChooserDialog /* : Dialog */ {
21630 alias parent_instance this;
21631 alias parent_instance super_;
21632 alias parent_instance dialog;
21633 Dialog parent_instance;
21634 private RecentChooserDialogPrivate* priv;
21637 // Unintrospectable constructor: new() / gtk_recent_chooser_dialog_new()
21638 // Creates a new #GtkRecentChooserDialog. This function is analogous to
21639 // gtk_dialog_new_with_buttons().
21640 // RETURNS: a new #GtkRecentChooserDialog
21641 // <title>: Title of the dialog, or %NULL
21642 // <parent>: Transient parent of the dialog, or %NULL,
21643 // <first_button_text>: stock ID or text to go in the first button, or %NULL
21644 alias gtk_recent_chooser_dialog_new new_; // Variadic
21646 // Unintrospectable constructor: new_for_manager() / gtk_recent_chooser_dialog_new_for_manager()
21647 // Creates a new #GtkRecentChooserDialog with a specified recent manager.
21648 // This is useful if you have implemented your own recent manager, or if you
21649 // have a customized instance of a #GtkRecentManager object.
21650 // RETURNS: a new #GtkRecentChooserDialog
21651 // <title>: Title of the dialog, or %NULL
21652 // <parent>: Transient parent of the dialog, or %NULL,
21653 // <manager>: a #GtkRecentManager
21654 // <first_button_text>: stock ID or text to go in the first button, or %NULL
21655 alias gtk_recent_chooser_dialog_new_for_manager new_for_manager; // Variadic
21658 struct RecentChooserDialogClass {
21659 DialogClass parent_class;
21662 struct RecentChooserDialogPrivate {
21665 enum RecentChooserError {
21666 NOT_FOUND = 0,
21667 INVALID_URI = 1
21669 struct RecentChooserIface {
21670 GObject2.TypeInterface base_iface;
21672 // RETURNS: %TRUE if the URI was found.
21673 // <uri>: a URI
21674 extern (C) int function (RecentChooser* chooser, char* uri, GLib2.Error** error=null) set_current_uri;
21675 // RETURNS: a newly allocated string holding a URI.
21676 extern (C) char* /*new*/ function (RecentChooser* chooser) get_current_uri;
21678 // RETURNS: %TRUE if @uri was found.
21679 // <uri>: a URI
21680 extern (C) int function (RecentChooser* chooser, char* uri, GLib2.Error** error=null) select_uri;
21681 // <uri>: a URI
21682 extern (C) void function (RecentChooser* chooser, char* uri) unselect_uri;
21683 extern (C) void function (RecentChooser* chooser) select_all;
21684 extern (C) void function (RecentChooser* chooser) unselect_all;
21685 // RETURNS: A newly allocated
21686 extern (C) GLib2.List* /*new*/ function (RecentChooser* chooser) get_items;
21687 // Unintrospectable functionp: get_recent_manager() / ()
21688 extern (C) RecentManager* function (RecentChooser* chooser) get_recent_manager;
21689 // <filter>: a #GtkRecentFilter
21690 extern (C) void function (RecentChooser* chooser, RecentFilter* filter) add_filter;
21691 // <filter>: a #GtkRecentFilter
21692 extern (C) void function (RecentChooser* chooser, RecentFilter* filter) remove_filter;
21693 // RETURNS: A singly linked list
21694 extern (C) GLib2.SList* /*new container*/ function (RecentChooser* chooser) list_filters;
21695 // <sort_func>: the comparison function
21696 extern (C) void function (RecentChooser* chooser, RecentSortFunc sort_func, void* data, GLib2.DestroyNotify destroy) set_sort_func;
21697 extern (C) void function (RecentChooser* chooser) item_activated;
21698 extern (C) void function (RecentChooser* chooser) selection_changed;
21701 struct RecentChooserMenu /* : Menu */ {
21702 alias parent_instance this;
21703 alias parent_instance super_;
21704 alias parent_instance menu;
21705 Menu parent_instance;
21706 private RecentChooserMenuPrivate* priv;
21709 // Creates a new #GtkRecentChooserMenu widget.
21710 // This kind of widget shows the list of recently used resources as
21711 // a menu, each item as a menu item. Each item inside the menu might
21712 // have an icon, representing its MIME type, and a number, for mnemonic
21713 // access.
21714 // This widget implements the #GtkRecentChooser interface.
21715 // This widget creates its own #GtkRecentManager object. See the
21716 // gtk_recent_chooser_menu_new_for_manager() function to know how to create
21717 // a #GtkRecentChooserMenu widget bound to another #GtkRecentManager object.
21718 // RETURNS: a new #GtkRecentChooserMenu
21719 static RecentChooserMenu* new_() {
21720 return gtk_recent_chooser_menu_new();
21723 // Creates a new #GtkRecentChooserMenu widget using @manager as
21724 // the underlying recently used resources manager.
21725 // This is useful if you have implemented your own recent manager,
21726 // or if you have a customized instance of a #GtkRecentManager
21727 // object or if you wish to share a common #GtkRecentManager object
21728 // among multiple #GtkRecentChooser widgets.
21729 // RETURNS: a new #GtkRecentChooserMenu, bound to @manager.
21730 // <manager>: a #GtkRecentManager
21731 static RecentChooserMenu* new_for_manager(RecentManager* manager) {
21732 return gtk_recent_chooser_menu_new_for_manager(manager);
21735 // Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
21736 // RETURNS: %TRUE if numbers should be shown.
21737 int get_show_numbers() {
21738 return gtk_recent_chooser_menu_get_show_numbers(&this);
21741 // Sets whether a number should be added to the items of @menu. The
21742 // numbers are shown to provide a unique character for a mnemonic to
21743 // be used inside ten menu item's label. Only the first the items
21744 // get a number to avoid clashes.
21745 // <show_numbers>: whether to show numbers
21746 void set_show_numbers(int show_numbers) {
21747 gtk_recent_chooser_menu_set_show_numbers(&this, show_numbers);
21751 struct RecentChooserMenuClass {
21752 MenuClass parent_class;
21753 extern (C) void function () gtk_recent1;
21754 extern (C) void function () gtk_recent2;
21755 extern (C) void function () gtk_recent3;
21756 extern (C) void function () gtk_recent4;
21759 struct RecentChooserMenuPrivate {
21762 struct RecentChooserWidget /* : VBox */ {
21763 alias parent_instance this;
21764 alias parent_instance super_;
21765 alias parent_instance vbox;
21766 VBox parent_instance;
21767 private RecentChooserWidgetPrivate* priv;
21770 // Creates a new #GtkRecentChooserWidget object. This is an embeddable widget
21771 // used to access the recently used resources list.
21772 // RETURNS: a new #GtkRecentChooserWidget
21773 static RecentChooserWidget* new_() {
21774 return gtk_recent_chooser_widget_new();
21777 // Creates a new #GtkRecentChooserWidget with a specified recent manager.
21778 // This is useful if you have implemented your own recent manager, or if you
21779 // have a customized instance of a #GtkRecentManager object.
21780 // RETURNS: a new #GtkRecentChooserWidget
21781 // <manager>: a #GtkRecentManager
21782 static RecentChooserWidget* new_for_manager(RecentManager* manager) {
21783 return gtk_recent_chooser_widget_new_for_manager(manager);
21787 struct RecentChooserWidgetClass {
21788 VBoxClass parent_class;
21791 struct RecentChooserWidgetPrivate {
21795 // Meta-data to be passed to gtk_recent_manager_add_full() when
21796 // registering a recently used resource.
21797 struct RecentData {
21798 char* display_name, description, mime_type, app_name, app_exec;
21799 char** groups;
21800 int is_private;
21803 struct RecentFilter /* : Object */ {
21804 alias method_parent this;
21805 alias method_parent super_;
21806 alias method_parent object;
21807 Object method_parent;
21810 // Creates a new #GtkRecentFilter with no rules added to it.
21811 // Such filter does not accept any recently used resources, so is not
21812 // particularly useful until you add rules with
21813 // gtk_recent_filter_add_pattern(), gtk_recent_filter_add_mime_type(),
21814 // gtk_recent_filter_add_application(), gtk_recent_filter_add_age().
21815 // To create a filter that accepts any recently used resource, use:
21816 // |[
21817 // GtkRecentFilter *filter = gtk_recent_filter_new ();
21818 // gtk_recent_filter_add_pattern (filter, "*");
21819 // ]|
21820 // RETURNS: a new #GtkRecentFilter
21821 static RecentFilter* new_() {
21822 return gtk_recent_filter_new();
21825 // Adds a rule that allows resources based on their age - that is, the number
21826 // of days elapsed since they were last modified.
21827 // <days>: number of days
21828 void add_age(int days) {
21829 gtk_recent_filter_add_age(&this, days);
21832 // Adds a rule that allows resources based on the name of the application
21833 // that has registered them.
21834 // <application>: an application name
21835 void add_application(char* application) {
21836 gtk_recent_filter_add_application(&this, application);
21839 // Adds a rule to a filter that allows resources based on a custom callback
21840 // function. The bitfield @needed which is passed in provides information
21841 // about what sorts of information that the filter function needs;
21842 // this allows GTK+ to avoid retrieving expensive information when
21843 // it isn't needed by the filter.
21844 // <needed>: bitfield of flags indicating the information that the custom filter function needs.
21845 // <func>: callback function; if the function returns %TRUE, then the file will be displayed.
21846 // <data>: data to pass to @func
21847 // <data_destroy>: function to call to free @data when it is no longer needed.
21848 void add_custom(RecentFilterFlags needed, RecentFilterFunc func, void* data, GLib2.DestroyNotify data_destroy) {
21849 gtk_recent_filter_add_custom(&this, needed, func, data, data_destroy);
21852 // Adds a rule that allows resources based on the name of the group
21853 // to which they belong
21854 // <group>: a group name
21855 void add_group(char* group) {
21856 gtk_recent_filter_add_group(&this, group);
21859 // Adds a rule that allows resources based on their registered MIME type.
21860 // <mime_type>: a MIME type
21861 void add_mime_type(char* mime_type) {
21862 gtk_recent_filter_add_mime_type(&this, mime_type);
21865 // Adds a rule that allows resources based on a pattern matching their
21866 // display name.
21867 // <pattern>: a file pattern
21868 void add_pattern(char* pattern) {
21869 gtk_recent_filter_add_pattern(&this, pattern);
21872 // Adds a rule allowing image files in the formats supported
21873 // by GdkPixbuf.
21874 void add_pixbuf_formats() {
21875 gtk_recent_filter_add_pixbuf_formats(&this);
21878 // Tests whether a file should be displayed according to @filter.
21879 // The #GtkRecentFilterInfo structure @filter_info should include
21880 // the fields returned from gtk_recent_filter_get_needed().
21881 // This function will not typically be used by applications; it
21882 // is intended principally for use in the implementation of
21883 // #GtkRecentChooser.
21884 // RETURNS: %TRUE if the file should be displayed
21885 // <filter_info>: a #GtkRecentFilterInfo structure containing information about a recently used resource
21886 int filter(RecentFilterInfo* filter_info) {
21887 return gtk_recent_filter_filter(&this, filter_info);
21890 // Gets the human-readable name for the filter.
21891 // See gtk_recent_filter_set_name().
21892 // is owned by the filter object and should not be freed.
21893 // RETURNS: the name of the filter, or %NULL. The returned string
21894 char* get_name() {
21895 return gtk_recent_filter_get_name(&this);
21898 // Gets the fields that need to be filled in for the structure
21899 // passed to gtk_recent_filter_filter()
21900 // This function will not typically be used by applications; it
21901 // is intended principally for use in the implementation of
21902 // #GtkRecentChooser.
21903 // calling gtk_recent_filter_filter()
21904 // RETURNS: bitfield of flags indicating needed fields when
21905 RecentFilterFlags get_needed() {
21906 return gtk_recent_filter_get_needed(&this);
21909 // Sets the human-readable name of the filter; this is the string
21910 // that will be displayed in the recently used resources selector
21911 // user interface if there is a selectable list of filters.
21912 // <name>: then human readable name of @filter
21913 void set_name(char* name) {
21914 gtk_recent_filter_set_name(&this, name);
21918 enum RecentFilterFlags {
21919 URI = 1,
21920 DISPLAY_NAME = 2,
21921 MIME_TYPE = 4,
21922 APPLICATION = 8,
21923 GROUP = 16,
21924 AGE = 32
21926 extern (C) alias int function (RecentFilterInfo* filter_info, void* user_data) RecentFilterFunc;
21928 struct RecentFilterInfo {
21929 RecentFilterFlags contains;
21930 char* uri, display_name, mime_type;
21931 char** applications, groups;
21932 int age;
21935 struct RecentInfo {
21937 // Checks whether the resource pointed by @info still exists. At
21938 // the moment this check is done only on resources pointing to local files.
21939 // RETURNS: %TRUE if the resource exists
21940 int exists() {
21941 return gtk_recent_info_exists(&this);
21944 // Gets the timestamp (seconds from system's Epoch) when the resource
21945 // was added to the recently used resources list.
21946 // the resource was added to the list, or -1 on failure.
21947 // RETURNS: the number of seconds elapsed from system's Epoch when
21948 time_t get_added() {
21949 return gtk_recent_info_get_added(&this);
21952 // Gets the number of days elapsed since the last update of the resource
21953 // pointed by @info.
21954 // since the time this resource was last modified.
21955 // RETURNS: a positive integer containing the number of days elapsed
21956 int get_age() {
21957 return gtk_recent_info_get_age(&this);
21960 // Gets the data regarding the application that has registered the resource
21961 // pointed by @info.
21962 // If the command line contains any escape characters defined inside the
21963 // storage specification, they will be expanded.
21964 // resource inside the recently used list, or %FALSE otherwise. The
21965 // modified or freed
21966 // RETURNS: %TRUE if an application with @app_name has registered this
21967 // <app_name>: the name of the application that has registered this item
21968 // <app_exec>: return location for the string containing the command line
21969 // <count>: return location for the number of times this item was registered
21970 // <time_>: return location for the timestamp this item was last registered for this application
21971 int get_application_info(char* app_name, /*out*/ char** app_exec, /*out*/ uint* count, /*out*/ time_t* time_) {
21972 return gtk_recent_info_get_application_info(&this, app_name, app_exec, count, time_);
21975 // Retrieves the list of applications that have registered this resource.
21976 // a newly allocated %NULL-terminated array of strings.
21977 // Use g_strfreev() to free it.
21978 // <length>: return location for the length of the returned list
21979 char** /*new*/ get_applications(/*out*/ size_t* length=null) {
21980 return gtk_recent_info_get_applications(&this, length);
21983 // Gets the (short) description of the resource.
21984 // is owned by the recent manager, and should not be freed.
21985 // RETURNS: the description of the resource. The returned string
21986 char* get_description() {
21987 return gtk_recent_info_get_description(&this);
21990 // Gets the name of the resource. If none has been defined, the basename
21991 // of the resource is obtained.
21992 // is owned by the recent manager, and should not be freed.
21993 // RETURNS: the display name of the resource. The returned string
21994 char* get_display_name() {
21995 return gtk_recent_info_get_display_name(&this);
21998 // Returns all groups registered for the recently used item @info. The
21999 // array of returned group names will be %NULL terminated, so length might
22000 // optionally be %NULL.
22001 // a newly allocated %NULL terminated array of strings.
22002 // Use g_strfreev() to free it.
22003 // <length>: return location for the number of groups returned
22004 char** /*new*/ get_groups(/*out*/ size_t* length=null) {
22005 return gtk_recent_info_get_groups(&this, length);
22008 // Retrieves the icon of size @size associated to the resource MIME type.
22009 // or %NULL. Use g_object_unref() when finished using the icon.
22010 // RETURNS: a #GdkPixbuf containing the icon,
22011 // <size>: the size of the icon in pixels
22012 GdkPixbuf2.Pixbuf* /*new*/ get_icon(int size) {
22013 return gtk_recent_info_get_icon(&this, size);
22016 // Gets the MIME type of the resource.
22017 // is owned by the recent manager, and should not be freed.
22018 // RETURNS: the MIME type of the resource. The returned string
22019 char* get_mime_type() {
22020 return gtk_recent_info_get_mime_type(&this);
22023 // Gets the timestamp (seconds from system's Epoch) when the resource
22024 // was last modified.
22025 // the resource was last modified, or -1 on failure.
22026 // RETURNS: the number of seconds elapsed from system's Epoch when
22027 time_t get_modified() {
22028 return gtk_recent_info_get_modified(&this);
22031 // Gets the value of the "private" flag. Resources in the recently used
22032 // list that have this flag set to %TRUE should only be displayed by the
22033 // applications that have registered them.
22034 // RETURNS: %TRUE if the private flag was found, %FALSE otherwise.
22035 int get_private_hint() {
22036 return gtk_recent_info_get_private_hint(&this);
22039 // Computes a valid UTF-8 string that can be used as the name of the item in a
22040 // menu or list. For example, calling this function on an item that refers to
22041 // "file:///foo/bar.txt" will yield "bar.txt".
22042 // g_free().
22043 // RETURNS: A newly-allocated string in UTF-8 encoding; free it with
22044 char* /*new*/ get_short_name() {
22045 return gtk_recent_info_get_short_name(&this);
22048 // Gets the URI of the resource.
22049 // owned by the recent manager, and should not be freed.
22050 // RETURNS: the URI of the resource. The returned string is
22051 char* get_uri() {
22052 return gtk_recent_info_get_uri(&this);
22055 // Gets a displayable version of the resource's URI. If the resource
22056 // is local, it returns a local path; if the resource is not local,
22057 // it returns the UTF-8 encoded content of gtk_recent_info_get_uri().
22058 // resource's URI or %NULL. Use g_free() when done using it.
22059 // RETURNS: a newly allocated UTF-8 string containing the
22060 char* /*new*/ get_uri_display() {
22061 return gtk_recent_info_get_uri_display(&this);
22064 // Gets the timestamp (seconds from system's Epoch) when the resource
22065 // was last visited.
22066 // the resource was last visited, or -1 on failure.
22067 // RETURNS: the number of seconds elapsed from system's Epoch when
22068 time_t get_visited() {
22069 return gtk_recent_info_get_visited(&this);
22072 // Checks whether an application registered this resource using @app_name.
22073 // %FALSE otherwise.
22074 // RETURNS: %TRUE if an application with name @app_name was found,
22075 // <app_name>: a string containing an application name
22076 int has_application(char* app_name) {
22077 return gtk_recent_info_has_application(&this, app_name);
22080 // Checks whether @group_name appears inside the groups registered for the
22081 // recently used item @info.
22082 // RETURNS: %TRUE if the group was found.
22083 // <group_name>: name of a group
22084 int has_group(char* group_name) {
22085 return gtk_recent_info_has_group(&this, group_name);
22088 // Checks whether the resource is local or not by looking at the
22089 // scheme of its URI.
22090 // RETURNS: %TRUE if the resource is local.
22091 int is_local() {
22092 return gtk_recent_info_is_local(&this);
22095 // Gets the name of the last application that have registered the
22096 // recently used resource represented by @info.
22097 // RETURNS: an application name. Use g_free() to free it.
22098 char* /*new*/ last_application() {
22099 return gtk_recent_info_last_application(&this);
22102 // Checks whether two #GtkRecentInfo structures point to the same
22103 // resource.
22104 // resource, %FALSE otherwise.
22105 // RETURNS: %TRUE if both #GtkRecentInfo structures point to se same
22106 // <info_b>: a #GtkRecentInfo
22107 int match(RecentInfo* info_b) {
22108 return gtk_recent_info_match(&this, info_b);
22111 // Increases the reference count of @recent_info by one.
22112 // by one.
22113 // RETURNS: the recent info object with its reference count increased
22114 RecentInfo* /*new*/ ref_() {
22115 return gtk_recent_info_ref(&this);
22118 // Decreases the reference count of @info by one. If the reference
22119 // count reaches zero, @info is deallocated, and the memory freed.
22120 void unref() {
22121 gtk_recent_info_unref(&this);
22125 struct RecentManager /* : GObject.Object */ {
22126 alias parent_instance this;
22127 alias parent_instance super_;
22128 alias parent_instance object;
22129 GObject2.Object parent_instance;
22130 private RecentManagerPrivate* priv;
22133 // Creates a new recent manager object. Recent manager objects are used to
22134 // handle the list of recently used resources. A #GtkRecentManager object
22135 // monitors the recently used resources list, and emits the "changed" signal
22136 // each time something inside the list changes.
22137 // #GtkRecentManager objects are expensive: be sure to create them only when
22138 // needed. You should use gtk_recent_manager_get_default() instead.
22139 // RETURNS: A newly created #GtkRecentManager object.
22140 static RecentManager* /*new*/ new_() {
22141 return gtk_recent_manager_new();
22144 // Gets a unique instance of #GtkRecentManager, that you can share
22145 // in your application without caring about memory management. The
22146 // returned instance will be freed when you application terminates.
22147 // RETURNS: A unique #GtkRecentManager. Do not ref or unref it.
22148 static RecentManager* get_default() {
22149 return gtk_recent_manager_get_default();
22152 // Unintrospectable function: get_for_screen() / gtk_recent_manager_get_for_screen()
22153 // Gets the recent manager object associated with @screen; if this
22154 // function has not previously been called for the given screen,
22155 // a new recent manager object will be created and associated with
22156 // the screen. Recent manager objects are fairly expensive to create,
22157 // so using this function is usually a better choice than calling
22158 // gtk_recent_manager_new() and setting the screen yourself; by using
22159 // this function a single recent manager object will be shared between
22160 // users.
22161 // screen. This recent manager is associated to the with the screen
22162 // and can be used as long as the screen is open. Do not ref or
22163 // unref it.
22164 // not be used in newly written code. Calling this function is
22165 // equivalent to calling gtk_recent_manager_get_default().
22166 // RETURNS: A unique #GtkRecentManager associated with the given
22167 // <screen>: a #GdkScreen
22168 static RecentManager* get_for_screen(Gdk2.Screen* screen) {
22169 return gtk_recent_manager_get_for_screen(screen);
22172 // Adds a new resource, pointed by @uri, into the recently used
22173 // resources list, using the metadata specified inside the #GtkRecentData
22174 // structure passed in @recent_data.
22175 // The passed URI will be used to identify this resource inside the
22176 // list.
22177 // In order to register the new recently used resource, metadata about
22178 // the resource must be passed as well as the URI; the metadata is
22179 // stored in a #GtkRecentData structure, which must contain the MIME
22180 // type of the resource pointed by the URI; the name of the application
22181 // that is registering the item, and a command line to be used when
22182 // launching the item.
22183 // Optionally, a #GtkRecentData structure might contain a UTF-8 string
22184 // to be used when viewing the item instead of the last component of the
22185 // URI; a short description of the item; whether the item should be
22186 // considered private - that is, should be displayed only by the
22187 // applications that have registered it.
22188 // recently used resources list, %FALSE otherwise.
22189 // RETURNS: %TRUE if the new item was successfully added to the
22190 // <uri>: a valid URI
22191 // <recent_data>: metadata of the resource
22192 int add_full(char* uri, RecentData* recent_data) {
22193 return gtk_recent_manager_add_full(&this, uri, recent_data);
22196 // Adds a new resource, pointed by @uri, into the recently used
22197 // resources list.
22198 // This function automatically retrieves some of the needed
22199 // metadata and setting other metadata to common default values; it
22200 // then feeds the data to gtk_recent_manager_add_full().
22201 // See gtk_recent_manager_add_full() if you want to explicitly
22202 // define the metadata for the resource pointed by @uri.
22203 // to the recently used resources list
22204 // RETURNS: %TRUE if the new item was successfully added
22205 // <uri>: a valid URI
22206 int add_item(char* uri) {
22207 return gtk_recent_manager_add_item(&this, uri);
22210 // Gets the list of recently used resources.
22211 // newly allocated #GtkRecentInfo objects. Use
22212 // gtk_recent_info_unref() on each item inside the list, and then
22213 // free the list itself using g_list_free().
22214 // RETURNS: a list of
22215 GLib2.List* /*new*/ get_items() {
22216 return gtk_recent_manager_get_items(&this);
22219 // Gets the maximum number of items that the gtk_recent_manager_get_items()
22220 // function should return.
22221 // view (implementing #GtkRecentChooser), and not by the model (the
22222 // #GtkRecentManager). See #GtkRecentChooser:limit.
22223 // RETURNS: the number of items to return, or -1 for every item.
22224 int get_limit() {
22225 return gtk_recent_manager_get_limit(&this);
22228 // Checks whether there is a recently used resource registered
22229 // with @uri inside the recent manager.
22230 // RETURNS: %TRUE if the resource was found, %FALSE otherwise.
22231 // <uri>: a URI
22232 int has_item(char* uri) {
22233 return gtk_recent_manager_has_item(&this, uri);
22236 // Searches for a URI inside the recently used resources list, and
22237 // returns a structure containing informations about the resource
22238 // like its MIME type, or its display name.
22239 // about the resource pointed by @uri, or %NULL if the URI was
22240 // not registered in the recently used resources list. Free with
22241 // gtk_recent_info_unref().
22242 // RETURNS: a #GtkRecentInfo structure containing information
22243 // <uri>: a URI
22244 RecentInfo* /*new*/ lookup_item(char* uri, GLib2.Error** error=null) {
22245 return gtk_recent_manager_lookup_item(&this, uri, error);
22248 // Changes the location of a recently used resource from @uri to @new_uri.
22249 // Please note that this function will not affect the resource pointed
22250 // by the URIs, but only the URI used in the recently used resources list.
22251 // RETURNS: %TRUE on success.
22252 // <uri>: the URI of a recently used resource
22253 // <new_uri>: the new URI of the recently used resource, or %NULL to remove the item pointed by @uri in the list
22254 int move_item(char* uri, char* new_uri, GLib2.Error** error=null) {
22255 return gtk_recent_manager_move_item(&this, uri, new_uri, error);
22258 // Purges every item from the recently used resources list.
22259 // recently used resources list.
22260 // RETURNS: the number of items that have been removed from the
22261 int purge_items(GLib2.Error** error=null) {
22262 return gtk_recent_manager_purge_items(&this, error);
22265 // Removes a resource pointed by @uri from the recently used resources
22266 // list handled by a recent manager.
22267 // removed by the recently used resources list, and %FALSE otherwise.
22268 // RETURNS: %TRUE if the item pointed by @uri has been successfully
22269 // <uri>: the URI of the item you wish to remove
22270 int remove_item(char* uri, GLib2.Error** error=null) {
22271 return gtk_recent_manager_remove_item(&this, uri, error);
22274 // Sets the maximum number of item that the gtk_recent_manager_get_items()
22275 // function should return. If @limit is set to -1, then return all the
22276 // items.
22277 // view (implementing #GtkRecentChooser), and not by the model (the
22278 // #GtkRecentManager). See #GtkRecentChooser:limit.
22279 // <limit>: the maximum number of items to return, or -1.
22280 void set_limit(int limit) {
22281 gtk_recent_manager_set_limit(&this, limit);
22284 // Sets the screen for a recent manager; the screen is used to
22285 // track the user's currently configured recently used documents
22286 // storage.
22287 // not be used in newly written code. Calling this function has
22288 // no effect.
22289 // <screen>: a #GdkScreen
22290 void set_screen(Gdk2.Screen* screen) {
22291 gtk_recent_manager_set_screen(&this, screen);
22294 // Emitted when the current recently used resources manager changes its
22295 // contents.
22296 extern (C) alias static void function (RecentManager* this_, void* user_data=null) signal_changed;
22298 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22299 return super_.signal_connect!name(cb, data, cf);
22302 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22303 return signal_connect_data(&this, cast(char*)"changed",
22304 cast(GObject2.Callback)cb, data, null, cf);
22308 struct RecentManagerClass {
22309 private GObject2.ObjectClass parent_class;
22310 extern (C) void function (RecentManager* manager) changed;
22311 extern (C) void function () _gtk_recent1;
22312 extern (C) void function () _gtk_recent2;
22313 extern (C) void function () _gtk_recent3;
22314 extern (C) void function () _gtk_recent4;
22317 // Error codes for GtkRecentManager operations
22318 enum RecentManagerError {
22319 NOT_FOUND = 0,
22320 INVALID_URI = 1,
22321 INVALID_ENCODING = 2,
22322 NOT_REGISTERED = 3,
22323 READ = 4,
22324 WRITE = 5,
22325 UNKNOWN = 6
22327 struct RecentManagerPrivate {
22330 extern (C) alias int function (RecentInfo* a, RecentInfo* b, void* user_data) RecentSortFunc;
22333 // Used to specify the sorting method to be applyed to the recently
22334 // used resource list.
22335 enum RecentSortType {
22336 NONE = 0,
22337 MRU = 1,
22338 LRU = 2,
22339 CUSTOM = 3
22341 enum ReliefStyle {
22342 NORMAL = 0,
22343 HALF = 1,
22344 NONE = 2
22347 // A <structname>GtkRequisition</structname> represents the desired size of a widget. See
22348 // <xref linkend="size-requisition"/> for more information.
22349 struct Requisition {
22350 int width, height;
22353 // Copies a #GtkRequisition.
22354 // RETURNS: a copy of @requisition
22355 Requisition* /*new*/ copy() {
22356 return gtk_requisition_copy(&this);
22358 // Frees a #GtkRequisition.
22359 void free() {
22360 gtk_requisition_free(&this);
22364 enum ResizeMode {
22365 PARENT = 0,
22366 QUEUE = 1,
22367 IMMEDIATE = 2
22369 enum ResponseType {
22370 NONE = -1,
22371 REJECT = -2,
22372 ACCEPT = -3,
22373 DELETE_EVENT = -4,
22374 OK = -5,
22375 CANCEL = -6,
22376 CLOSE = -7,
22377 YES = -8,
22378 NO = -9,
22379 APPLY = -10,
22380 HELP = -11
22382 struct Ruler /* : Widget */ {
22383 alias widget this;
22384 alias widget super_;
22385 Widget widget;
22386 Gdk2.Pixmap* backing_store;
22387 Gdk2.GC* non_gr_exp_gc;
22388 RulerMetric* metric;
22389 int xsrc, ysrc, slider_size;
22390 double lower, upper, position, max_size;
22392 void draw_pos() {
22393 gtk_ruler_draw_pos(&this);
22395 void draw_ticks() {
22396 gtk_ruler_draw_ticks(&this);
22399 // Gets the units used for a #GtkRuler. See gtk_ruler_set_metric().
22400 // unmaintained and too specialized. There is no replacement.
22401 // RETURNS: the units currently used for @ruler
22402 MetricType get_metric() {
22403 return gtk_ruler_get_metric(&this);
22406 // Retrieves values indicating the range and current position of a #GtkRuler.
22407 // See gtk_ruler_set_range().
22408 // unmaintained and too specialized. There is no replacement.
22409 // <lower>: location to store lower limit of the ruler, or %NULL
22410 // <upper>: location to store upper limit of the ruler, or %NULL
22411 // <position>: location to store the current position of the mark on the ruler, or %NULL
22412 // <max_size>: location to store the maximum size of the ruler used when calculating the space to leave for the text, or %NULL.
22413 void get_range(double* lower, double* upper, double* position, double* max_size) {
22414 gtk_ruler_get_range(&this, lower, upper, position, max_size);
22416 void set_metric(MetricType metric) {
22417 gtk_ruler_set_metric(&this, metric);
22420 // This sets the range of the ruler.
22421 // unmaintained and too specialized. There is no replacement.
22422 // <lower>: the lower limit of the ruler
22423 // <upper>: the upper limit of the ruler
22424 // <position>: the mark on the ruler
22425 // <max_size>: the maximum size of the ruler used when calculating the space to leave for the text
22426 void set_range(double lower, double upper, double position, double max_size) {
22427 gtk_ruler_set_range(&this, lower, upper, position, max_size);
22431 struct RulerClass {
22432 WidgetClass parent_class;
22433 extern (C) void function (Ruler* ruler) draw_ticks;
22434 extern (C) void function (Ruler* ruler) draw_pos;
22435 extern (C) void function () _gtk_reserved1;
22436 extern (C) void function () _gtk_reserved2;
22437 extern (C) void function () _gtk_reserved3;
22438 extern (C) void function () _gtk_reserved4;
22441 struct RulerMetric {
22442 char* metric_name, abbrev;
22443 double pixels_per_unit;
22444 double[10] ruler_scale;
22445 int[5] subdivide;
22448 enum STOCK_ABOUT = "gtk-about";
22449 enum STOCK_ADD = "gtk-add";
22450 enum STOCK_APPLY = "gtk-apply";
22451 enum STOCK_BOLD = "gtk-bold";
22452 enum STOCK_CANCEL = "gtk-cancel";
22453 enum STOCK_CAPS_LOCK_WARNING = "gtk-caps-lock-warning";
22454 enum STOCK_CDROM = "gtk-cdrom";
22455 enum STOCK_CLEAR = "gtk-clear";
22456 enum STOCK_CLOSE = "gtk-close";
22457 enum STOCK_COLOR_PICKER = "gtk-color-picker";
22458 enum STOCK_CONNECT = "gtk-connect";
22459 enum STOCK_CONVERT = "gtk-convert";
22460 enum STOCK_COPY = "gtk-copy";
22461 enum STOCK_CUT = "gtk-cut";
22462 enum STOCK_DELETE = "gtk-delete";
22463 enum STOCK_DIALOG_AUTHENTICATION = "gtk-dialog-authentication";
22464 enum STOCK_DIALOG_ERROR = "gtk-dialog-error";
22465 enum STOCK_DIALOG_INFO = "gtk-dialog-info";
22466 enum STOCK_DIALOG_QUESTION = "gtk-dialog-question";
22467 enum STOCK_DIALOG_WARNING = "gtk-dialog-warning";
22468 enum STOCK_DIRECTORY = "gtk-directory";
22469 enum STOCK_DISCARD = "gtk-discard";
22470 enum STOCK_DISCONNECT = "gtk-disconnect";
22471 enum STOCK_DND = "gtk-dnd";
22472 enum STOCK_DND_MULTIPLE = "gtk-dnd-multiple";
22473 enum STOCK_EDIT = "gtk-edit";
22474 enum STOCK_EXECUTE = "gtk-execute";
22475 enum STOCK_FILE = "gtk-file";
22476 enum STOCK_FIND = "gtk-find";
22477 enum STOCK_FIND_AND_REPLACE = "gtk-find-and-replace";
22478 enum STOCK_FLOPPY = "gtk-floppy";
22479 enum STOCK_FULLSCREEN = "gtk-fullscreen";
22480 enum STOCK_GOTO_BOTTOM = "gtk-goto-bottom";
22481 enum STOCK_GOTO_FIRST = "gtk-goto-first";
22482 enum STOCK_GOTO_LAST = "gtk-goto-last";
22483 enum STOCK_GOTO_TOP = "gtk-goto-top";
22484 enum STOCK_GO_BACK = "gtk-go-back";
22485 enum STOCK_GO_DOWN = "gtk-go-down";
22486 enum STOCK_GO_FORWARD = "gtk-go-forward";
22487 enum STOCK_GO_UP = "gtk-go-up";
22488 enum STOCK_HARDDISK = "gtk-harddisk";
22489 enum STOCK_HELP = "gtk-help";
22490 enum STOCK_HOME = "gtk-home";
22491 enum STOCK_INDENT = "gtk-indent";
22492 enum STOCK_INDEX = "gtk-index";
22493 enum STOCK_INFO = "gtk-info";
22494 enum STOCK_ITALIC = "gtk-italic";
22495 enum STOCK_JUMP_TO = "gtk-jump-to";
22496 enum STOCK_JUSTIFY_CENTER = "gtk-justify-center";
22497 enum STOCK_JUSTIFY_FILL = "gtk-justify-fill";
22498 enum STOCK_JUSTIFY_LEFT = "gtk-justify-left";
22499 enum STOCK_JUSTIFY_RIGHT = "gtk-justify-right";
22500 enum STOCK_LEAVE_FULLSCREEN = "gtk-leave-fullscreen";
22501 enum STOCK_MEDIA_FORWARD = "gtk-media-forward";
22502 enum STOCK_MEDIA_NEXT = "gtk-media-next";
22503 enum STOCK_MEDIA_PAUSE = "gtk-media-pause";
22504 enum STOCK_MEDIA_PLAY = "gtk-media-play";
22505 enum STOCK_MEDIA_PREVIOUS = "gtk-media-previous";
22506 enum STOCK_MEDIA_RECORD = "gtk-media-record";
22507 enum STOCK_MEDIA_REWIND = "gtk-media-rewind";
22508 enum STOCK_MEDIA_STOP = "gtk-media-stop";
22509 enum STOCK_MISSING_IMAGE = "gtk-missing-image";
22510 enum STOCK_NETWORK = "gtk-network";
22511 enum STOCK_NEW = "gtk-new";
22512 enum STOCK_NO = "gtk-no";
22513 enum STOCK_OK = "gtk-ok";
22514 enum STOCK_OPEN = "gtk-open";
22515 enum STOCK_ORIENTATION_LANDSCAPE = "gtk-orientation-landscape";
22516 enum STOCK_ORIENTATION_PORTRAIT = "gtk-orientation-portrait";
22517 enum STOCK_ORIENTATION_REVERSE_LANDSCAPE = "gtk-orientation-reverse-landscape";
22518 enum STOCK_ORIENTATION_REVERSE_PORTRAIT = "gtk-orientation-reverse-portrait";
22519 enum STOCK_PAGE_SETUP = "gtk-page-setup";
22520 enum STOCK_PASTE = "gtk-paste";
22521 enum STOCK_PREFERENCES = "gtk-preferences";
22522 enum STOCK_PRINT = "gtk-print";
22523 enum STOCK_PRINT_ERROR = "gtk-print-error";
22524 enum STOCK_PRINT_PAUSED = "gtk-print-paused";
22525 enum STOCK_PRINT_PREVIEW = "gtk-print-preview";
22526 enum STOCK_PRINT_REPORT = "gtk-print-report";
22527 enum STOCK_PRINT_WARNING = "gtk-print-warning";
22528 enum STOCK_PROPERTIES = "gtk-properties";
22529 enum STOCK_QUIT = "gtk-quit";
22530 enum STOCK_REDO = "gtk-redo";
22531 enum STOCK_REFRESH = "gtk-refresh";
22532 enum STOCK_REMOVE = "gtk-remove";
22533 enum STOCK_REVERT_TO_SAVED = "gtk-revert-to-saved";
22534 enum STOCK_SAVE = "gtk-save";
22535 enum STOCK_SAVE_AS = "gtk-save-as";
22536 enum STOCK_SELECT_ALL = "gtk-select-all";
22537 enum STOCK_SELECT_COLOR = "gtk-select-color";
22538 enum STOCK_SELECT_FONT = "gtk-select-font";
22539 enum STOCK_SORT_ASCENDING = "gtk-sort-ascending";
22540 enum STOCK_SORT_DESCENDING = "gtk-sort-descending";
22541 enum STOCK_SPELL_CHECK = "gtk-spell-check";
22542 enum STOCK_STOP = "gtk-stop";
22543 enum STOCK_STRIKETHROUGH = "gtk-strikethrough";
22544 enum STOCK_UNDELETE = "gtk-undelete";
22545 enum STOCK_UNDERLINE = "gtk-underline";
22546 enum STOCK_UNDO = "gtk-undo";
22547 enum STOCK_UNINDENT = "gtk-unindent";
22548 enum STOCK_YES = "gtk-yes";
22549 enum STOCK_ZOOM_100 = "gtk-zoom-100";
22550 enum STOCK_ZOOM_FIT = "gtk-zoom-fit";
22551 enum STOCK_ZOOM_IN = "gtk-zoom-in";
22552 enum STOCK_ZOOM_OUT = "gtk-zoom-out";
22553 struct Scale /* : Range */ {
22554 alias range this;
22555 alias range super_;
22556 Range range;
22557 int digits;
22558 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
22559 uint, "draw_value", 1,
22560 uint, "value_pos", 2,
22561 uint, "__dummy32A", 29));
22564 // Adds a mark at @value.
22565 // A mark is indicated visually by drawing a tick mark next to the scale,
22566 // and GTK+ makes it easy for the user to position the scale exactly at the
22567 // marks value.
22568 // If @markup is not %NULL, text is shown next to the tick mark.
22569 // To remove marks from a scale, use gtk_scale_clear_marks().
22570 // <value>: the value at which the mark is placed, must be between the lower and upper limits of the scales' adjustment
22571 // <position>: where to draw the mark. For a horizontal scale, #GTK_POS_TOP is drawn above the scale, anything else below. For a vertical scale, #GTK_POS_LEFT is drawn to the left of the scale, anything else to the right.
22572 // <markup>: Text to be shown at the mark, using <link linkend="PangoMarkupFormat">Pango markup</link>, or %NULL
22573 void add_mark(double value, PositionType position, char* markup=null) {
22574 gtk_scale_add_mark(&this, value, position, markup);
22576 // Removes any marks that have been added with gtk_scale_add_mark().
22577 void clear_marks() {
22578 gtk_scale_clear_marks(&this);
22581 // Gets the number of decimal places that are displayed in the value.
22582 // RETURNS: the number of decimal places that are displayed
22583 int get_digits() {
22584 return gtk_scale_get_digits(&this);
22587 // Returns whether the current value is displayed as a string
22588 // next to the slider.
22589 // RETURNS: whether the current value is displayed as a string
22590 int get_draw_value() {
22591 return gtk_scale_get_draw_value(&this);
22594 // Gets the #PangoLayout used to display the scale. The returned
22595 // object is owned by the scale so does not need to be freed by
22596 // the caller.
22597 // or %NULL if the #GtkScale:draw-value property is %FALSE.
22598 // RETURNS: the #PangoLayout for this scale,
22599 Pango.Layout* get_layout() {
22600 return gtk_scale_get_layout(&this);
22603 // Obtains the coordinates where the scale will draw the
22604 // #PangoLayout representing the text in the scale. Remember
22605 // when using the #PangoLayout function you need to convert to
22606 // and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
22607 // If the #GtkScale:draw-value property is %FALSE, the return
22608 // values are undefined.
22609 // <x>: location to store X offset of layout, or %NULL
22610 // <y>: location to store Y offset of layout, or %NULL
22611 void get_layout_offsets(/*out*/ int* x=null, /*out*/ int* y=null) {
22612 gtk_scale_get_layout_offsets(&this, x, y);
22615 // Gets the position in which the current value is displayed.
22616 // RETURNS: the position in which the current value is displayed
22617 PositionType get_value_pos() {
22618 return gtk_scale_get_value_pos(&this);
22621 // Sets the number of decimal places that are displayed in the value.
22622 // Also causes the value of the adjustment to be rounded off to this
22623 // number of digits, so the retrieved value matches the value the user saw.
22624 // <digits>: the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00, etc
22625 void set_digits(int digits) {
22626 gtk_scale_set_digits(&this, digits);
22629 // Specifies whether the current value is displayed as a string next
22630 // to the slider.
22631 // <draw_value>: %TRUE to draw the value
22632 void set_draw_value(int draw_value) {
22633 gtk_scale_set_draw_value(&this, draw_value);
22636 // Sets the position in which the current value is displayed.
22637 // <pos>: the position in which the current value is displayed
22638 void set_value_pos(PositionType pos) {
22639 gtk_scale_set_value_pos(&this, pos);
22642 // Signal which allows you to change how the scale value is displayed.
22643 // Connect a signal handler which returns an allocated string representing
22644 // Here's an example signal handler which displays a value 1.0 as
22645 // with "--&gt;1.0&lt;--".
22646 // |[
22647 // static gchar*
22648 // format_value_callback (GtkScale *scale,
22649 // gdouble value)
22650 // {
22651 // return g_strdup_printf ("--&gt;&percnt;0.*g&lt;--",
22652 // gtk_scale_get_digits (scale), value);
22653 // }
22654 // ]|
22655 // RETURNS: allocated string representing @value
22656 // <value>: the value to format
22657 extern (C) alias static char* /*new*/ function (Scale* this_, double value, void* user_data=null) signal_format_value;
22659 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22660 return super_.signal_connect!name(cb, data, cf);
22663 ulong signal_connect(string name:"format-value", CB/*:signal_format_value*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22664 return signal_connect_data(&this, cast(char*)"format-value",
22665 cast(GObject2.Callback)cb, data, null, cf);
22669 struct ScaleButton /* : Button */ {
22670 alias parent this;
22671 alias parent super_;
22672 alias parent button;
22673 Button parent;
22674 Widget* plus_button, minus_button;
22675 private ScaleButtonPrivate* priv;
22678 // Creates a #GtkScaleButton, with a range between @min and @max, with
22679 // a stepping of @step.
22680 // RETURNS: a new #GtkScaleButton
22681 // <size>: a stock icon size
22682 // <min>: the minimum value of the scale (usually 0)
22683 // <max>: the maximum value of the scale (usually 100)
22684 // <step>: the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)
22685 // <icons>: a %NULL-terminated array of icon names, or %NULL if you want to set the list later with gtk_scale_button_set_icons()
22686 static ScaleButton* new_(IconSize size, double min, double max, double step, char** icons=null) {
22687 return gtk_scale_button_new(size, min, max, step, icons);
22690 // Gets the #GtkAdjustment associated with the #GtkScaleButton's scale.
22691 // See gtk_range_get_adjustment() for details.
22692 // RETURNS: the adjustment associated with the scale
22693 Adjustment* get_adjustment() {
22694 return gtk_scale_button_get_adjustment(&this);
22697 // Retrieves the minus button of the #GtkScaleButton.
22698 // RETURNS: the minus button of the #GtkScaleButton
22699 Widget* get_minus_button() {
22700 return gtk_scale_button_get_minus_button(&this);
22703 // Gets the orientation of the #GtkScaleButton's popup window.
22704 // RETURNS: the #GtkScaleButton's orientation.
22705 Orientation get_orientation() {
22706 return gtk_scale_button_get_orientation(&this);
22709 // Retrieves the plus button of the #GtkScaleButton.
22710 // RETURNS: the plus button of the #GtkScaleButton
22711 Widget* get_plus_button() {
22712 return gtk_scale_button_get_plus_button(&this);
22715 // Retrieves the popup of the #GtkScaleButton.
22716 // RETURNS: the popup of the #GtkScaleButton
22717 Widget* get_popup() {
22718 return gtk_scale_button_get_popup(&this);
22721 // Gets the current value of the scale button.
22722 // RETURNS: current value of the scale button
22723 double get_value() {
22724 return gtk_scale_button_get_value(&this);
22727 // Sets the #GtkAdjustment to be used as a model
22728 // for the #GtkScaleButton's scale.
22729 // See gtk_range_set_adjustment() for details.
22730 // <adjustment>: a #GtkAdjustment
22731 void set_adjustment(Adjustment* adjustment) {
22732 gtk_scale_button_set_adjustment(&this, adjustment);
22735 // Sets the icons to be used by the scale button.
22736 // For details, see the #GtkScaleButton:icons property.
22737 // <icons>: a %NULL-terminated array of icon names
22738 void set_icons(char** icons) {
22739 gtk_scale_button_set_icons(&this, icons);
22742 // Sets the orientation of the #GtkScaleButton's popup window.
22743 // <orientation>: the new orientation
22744 void set_orientation(Orientation orientation) {
22745 gtk_scale_button_set_orientation(&this, orientation);
22748 // Sets the current value of the scale; if the value is outside
22749 // the minimum or maximum range values, it will be clamped to fit
22750 // inside them. The scale button emits the #GtkScaleButton::value-changed
22751 // signal if the value changes.
22752 // <value>: new value of the scale button
22753 void set_value(double value) {
22754 gtk_scale_button_set_value(&this, value);
22757 // The ::popdown signal is a
22758 // <link linkend="keybinding-signals">keybinding signal</link>
22759 // which gets emitted to popdown the scale widget.
22760 // The default binding for this signal is Escape.
22761 extern (C) alias static void function (ScaleButton* this_, void* user_data=null) signal_popdown;
22763 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22764 return super_.signal_connect!name(cb, data, cf);
22767 ulong signal_connect(string name:"popdown", CB/*:signal_popdown*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22768 return signal_connect_data(&this, cast(char*)"popdown",
22769 cast(GObject2.Callback)cb, data, null, cf);
22772 // The ::popup signal is a
22773 // <link linkend="keybinding-signals">keybinding signal</link>
22774 // which gets emitted to popup the scale widget.
22775 // The default bindings for this signal are Space, Enter and Return.
22776 extern (C) alias static void function (ScaleButton* this_, void* user_data=null) signal_popup;
22777 ulong signal_connect(string name:"popup", CB/*:signal_popup*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22778 return signal_connect_data(&this, cast(char*)"popup",
22779 cast(GObject2.Callback)cb, data, null, cf);
22782 // The ::value-changed signal is emitted when the value field has
22783 // changed.
22784 // <value>: the new value
22785 extern (C) alias static void function (ScaleButton* this_, double value, void* user_data=null) signal_value_changed;
22786 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22787 return signal_connect_data(&this, cast(char*)"value-changed",
22788 cast(GObject2.Callback)cb, data, null, cf);
22792 struct ScaleButtonClass {
22793 ButtonClass parent_class;
22794 extern (C) void function (ScaleButton* button, double value) value_changed;
22795 extern (C) void function () _gtk_reserved1;
22796 extern (C) void function () _gtk_reserved2;
22797 extern (C) void function () _gtk_reserved3;
22798 extern (C) void function () _gtk_reserved4;
22801 struct ScaleButtonPrivate {
22804 struct ScaleClass {
22805 RangeClass parent_class;
22806 extern (C) char* /*new*/ function (Scale* scale, double value) format_value;
22807 extern (C) void function (Scale* scale) draw_value;
22809 // <x>: location to store X offset of layout, or %NULL
22810 // <y>: location to store Y offset of layout, or %NULL
22811 extern (C) void function (Scale* scale, /*out*/ int* x=null, /*out*/ int* y=null) get_layout_offsets;
22812 extern (C) void function () _gtk_reserved1;
22813 extern (C) void function () _gtk_reserved2;
22814 extern (C) void function () _gtk_reserved3;
22817 enum ScrollStep {
22818 STEPS = 0,
22819 PAGES = 1,
22820 ENDS = 2,
22821 HORIZONTAL_STEPS = 3,
22822 HORIZONTAL_PAGES = 4,
22823 HORIZONTAL_ENDS = 5
22825 enum ScrollType {
22826 NONE = 0,
22827 JUMP = 1,
22828 STEP_BACKWARD = 2,
22829 STEP_FORWARD = 3,
22830 PAGE_BACKWARD = 4,
22831 PAGE_FORWARD = 5,
22832 STEP_UP = 6,
22833 STEP_DOWN = 7,
22834 PAGE_UP = 8,
22835 PAGE_DOWN = 9,
22836 STEP_LEFT = 10,
22837 STEP_RIGHT = 11,
22838 PAGE_LEFT = 12,
22839 PAGE_RIGHT = 13,
22840 START = 14,
22841 END = 15
22843 struct Scrollbar /* : Range */ {
22844 alias range this;
22845 alias range super_;
22846 Range range;
22849 struct ScrollbarClass {
22850 RangeClass parent_class;
22851 extern (C) void function () _gtk_reserved1;
22852 extern (C) void function () _gtk_reserved2;
22853 extern (C) void function () _gtk_reserved3;
22854 extern (C) void function () _gtk_reserved4;
22857 struct ScrolledWindow /* : Bin */ {
22858 alias container this;
22859 alias container super_;
22860 alias container bin;
22861 Bin container;
22862 Widget* hscrollbar, vscrollbar;
22863 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
22864 uint, "hscrollbar_policy", 2,
22865 uint, "vscrollbar_policy", 2,
22866 uint, "hscrollbar_visible", 1,
22867 uint, "vscrollbar_visible", 1,
22868 uint, "window_placement", 2,
22869 uint, "focus_out", 1,
22870 uint, "__dummy32A", 23));
22871 private ushort shadow_type;
22874 // Creates a new scrolled window.
22875 // The two arguments are the scrolled window's adjustments; these will be
22876 // shared with the scrollbars and the child widget to keep the bars in sync
22877 // with the child. Usually you want to pass %NULL for the adjustments, which
22878 // will cause the scrolled window to create them for you.
22879 // RETURNS: a new scrolled window
22880 // <hadjustment>: horizontal adjustment
22881 // <vadjustment>: vertical adjustment
22882 static ScrolledWindow* new_(Adjustment* hadjustment=null, Adjustment* vadjustment=null) {
22883 return gtk_scrolled_window_new(hadjustment, vadjustment);
22886 // Used to add children without native scrolling capabilities. This
22887 // is simply a convenience function; it is equivalent to adding the
22888 // unscrollable child to a viewport, then adding the viewport to the
22889 // scrolled window. If a child has native scrolling, use
22890 // gtk_container_add() instead of this function.
22891 // The viewport scrolls the child by moving its #GdkWindow, and takes
22892 // the size of the child to be the size of its toplevel #GdkWindow.
22893 // This will be very wrong for most widgets that support native scrolling;
22894 // for example, if you add a widget such as #GtkTreeView with a viewport,
22895 // the whole widget will scroll, including the column headings. Thus,
22896 // widgets with native scrolling support should not be used with the
22897 // #GtkViewport proxy.
22898 // A widget supports scrolling natively if the
22899 // set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero,
22900 // i.e. has been filled in with a valid signal identifier.
22901 // <child>: the widget you want to scroll
22902 void add_with_viewport(Widget* child) {
22903 gtk_scrolled_window_add_with_viewport(&this, child);
22906 // Returns the horizontal scrollbar's adjustment, used to connect the
22907 // horizontal scrollbar to the child widget's horizontal scroll
22908 // functionality.
22909 // RETURNS: the horizontal #GtkAdjustment
22910 Adjustment* get_hadjustment() {
22911 return gtk_scrolled_window_get_hadjustment(&this);
22914 // Returns the horizontal scrollbar of @scrolled_window.
22915 // or %NULL if it does not have one.
22916 // RETURNS: the horizontal scrollbar of the scrolled window,
22917 Widget* get_hscrollbar() {
22918 return gtk_scrolled_window_get_hscrollbar(&this);
22921 // Gets the placement of the contents with respect to the scrollbars
22922 // for the scrolled window. See gtk_scrolled_window_set_placement().
22923 // See also gtk_scrolled_window_set_placement() and
22924 // gtk_scrolled_window_unset_placement().
22925 // RETURNS: the current placement value.
22926 CornerType get_placement() {
22927 return gtk_scrolled_window_get_placement(&this);
22930 // Retrieves the current policy values for the horizontal and vertical
22931 // scrollbars. See gtk_scrolled_window_set_policy().
22932 // <hscrollbar_policy>: location to store the policy for the horizontal scrollbar, or %NULL.
22933 // <vscrollbar_policy>: location to store the policy for the vertical scrollbar, or %NULL.
22934 void get_policy(/*out*/ PolicyType* hscrollbar_policy=null, /*out*/ PolicyType* vscrollbar_policy=null) {
22935 gtk_scrolled_window_get_policy(&this, hscrollbar_policy, vscrollbar_policy);
22938 // Gets the shadow type of the scrolled window. See
22939 // gtk_scrolled_window_set_shadow_type().
22940 // RETURNS: the current shadow type
22941 ShadowType get_shadow_type() {
22942 return gtk_scrolled_window_get_shadow_type(&this);
22945 // Returns the vertical scrollbar's adjustment, used to connect the
22946 // vertical scrollbar to the child widget's vertical scroll functionality.
22947 // RETURNS: the vertical #GtkAdjustment
22948 Adjustment* get_vadjustment() {
22949 return gtk_scrolled_window_get_vadjustment(&this);
22952 // Returns the vertical scrollbar of @scrolled_window.
22953 // or %NULL if it does not have one.
22954 // RETURNS: the vertical scrollbar of the scrolled window,
22955 Widget* get_vscrollbar() {
22956 return gtk_scrolled_window_get_vscrollbar(&this);
22959 // Sets the #GtkAdjustment for the horizontal scrollbar.
22960 // <hadjustment>: horizontal scroll adjustment
22961 void set_hadjustment(Adjustment* hadjustment) {
22962 gtk_scrolled_window_set_hadjustment(&this, hadjustment);
22965 // Sets the placement of the contents with respect to the scrollbars
22966 // for the scrolled window.
22967 // The default is %GTK_CORNER_TOP_LEFT, meaning the child is
22968 // in the top left, with the scrollbars underneath and to the right.
22969 // Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT,
22970 // %GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.
22971 // See also gtk_scrolled_window_get_placement() and
22972 // gtk_scrolled_window_unset_placement().
22973 // <window_placement>: position of the child window
22974 void set_placement(CornerType window_placement) {
22975 gtk_scrolled_window_set_placement(&this, window_placement);
22978 // Sets the scrollbar policy for the horizontal and vertical scrollbars.
22979 // The policy determines when the scrollbar should appear; it is a value
22980 // from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the
22981 // scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is
22982 // never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only
22983 // if needed (that is, if the slider part of the bar would be smaller
22984 // than the trough - the display is larger than the page size).
22985 // <hscrollbar_policy>: policy for horizontal bar
22986 // <vscrollbar_policy>: policy for vertical bar
22987 void set_policy(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy) {
22988 gtk_scrolled_window_set_policy(&this, hscrollbar_policy, vscrollbar_policy);
22991 // Changes the type of shadow drawn around the contents of
22992 // <type>: kind of shadow to draw around scrolled window contents
22993 void set_shadow_type(ShadowType type) {
22994 gtk_scrolled_window_set_shadow_type(&this, type);
22997 // Sets the #GtkAdjustment for the vertical scrollbar.
22998 // <vadjustment>: vertical scroll adjustment
22999 void set_vadjustment(Adjustment* vadjustment) {
23000 gtk_scrolled_window_set_vadjustment(&this, vadjustment);
23003 // Unsets the placement of the contents with respect to the scrollbars
23004 // for the scrolled window. If no window placement is set for a scrolled
23005 // window, it obeys the "gtk-scrolled-window-placement" XSETTING.
23006 // See also gtk_scrolled_window_set_placement() and
23007 // gtk_scrolled_window_get_placement().
23008 void unset_placement() {
23009 gtk_scrolled_window_unset_placement(&this);
23011 extern (C) alias static void function (ScrolledWindow* this_, DirectionType* object, void* user_data=null) signal_move_focus_out;
23013 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23014 return super_.signal_connect!name(cb, data, cf);
23017 ulong signal_connect(string name:"move-focus-out", CB/*:signal_move_focus_out*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23018 return signal_connect_data(&this, cast(char*)"move-focus-out",
23019 cast(GObject2.Callback)cb, data, null, cf);
23021 extern (C) alias static c_int function (ScrolledWindow* this_, ScrollType* object, c_int p0, void* user_data=null) signal_scroll_child;
23022 ulong signal_connect(string name:"scroll-child", CB/*:signal_scroll_child*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23023 return signal_connect_data(&this, cast(char*)"scroll-child",
23024 cast(GObject2.Callback)cb, data, null, cf);
23028 struct ScrolledWindowClass {
23029 BinClass parent_class;
23030 int scrollbar_spacing;
23031 extern (C) int function (ScrolledWindow* scrolled_window, ScrollType scroll, int horizontal) scroll_child;
23032 extern (C) void function (ScrolledWindow* scrolled_window, DirectionType direction) move_focus_out;
23033 extern (C) void function () _gtk_reserved1;
23034 extern (C) void function () _gtk_reserved2;
23035 extern (C) void function () _gtk_reserved3;
23036 extern (C) void function () _gtk_reserved4;
23039 struct SelectionData {
23040 Gdk2.Atom selection, target, type;
23041 int format;
23042 ubyte* data;
23043 int length;
23044 Gdk2.Display* display;
23047 // Makes a copy of a #GtkSelectionData structure and its data.
23048 // RETURNS: a pointer to a copy of @data.
23049 SelectionData* /*new*/ copy() {
23050 return gtk_selection_data_copy(&this);
23053 // Frees a #GtkSelectionData structure returned from
23054 // gtk_selection_data_copy().
23055 void free() {
23056 gtk_selection_data_free(&this);
23059 // Retrieves the raw data of the selection.
23060 // RETURNS: the raw data of the selection.
23061 ubyte* get_data() {
23062 return gtk_selection_data_get_data(&this);
23065 // Retrieves the data type of the selection.
23066 // RETURNS: the data type of the selection.
23067 Gdk2.Atom get_data_type() {
23068 return gtk_selection_data_get_data_type(&this);
23071 // Retrieves the display of the selection.
23072 // RETURNS: the display of the selection.
23073 Gdk2.Display* get_display() {
23074 return gtk_selection_data_get_display(&this);
23077 // Retrieves the format of the selection.
23078 // RETURNS: the format of the selection.
23079 int get_format() {
23080 return gtk_selection_data_get_format(&this);
23083 // Retrieves the length of the raw data of the selection.
23084 // RETURNS: the length of the data of the selection.
23085 int get_length() {
23086 return gtk_selection_data_get_length(&this);
23089 // Gets the contents of the selection data as a #GdkPixbuf.
23090 // image type and it could be converted to a #GdkPixbuf, a
23091 // newly allocated pixbuf is returned, otherwise %NULL.
23092 // If the result is non-%NULL it must be freed with g_object_unref().
23093 // RETURNS: if the selection data contained a recognized
23094 GdkPixbuf2.Pixbuf* /*new*/ get_pixbuf() {
23095 return gtk_selection_data_get_pixbuf(&this);
23098 // Retrieves the selection #GdkAtom of the selection data.
23099 // RETURNS: the selection #GdkAtom of the selection data.
23100 Gdk2.Atom get_selection() {
23101 return gtk_selection_data_get_selection(&this);
23104 // Retrieves the target of the selection.
23105 // RETURNS: the target of the selection.
23106 Gdk2.Atom get_target() {
23107 return gtk_selection_data_get_target(&this);
23110 // Gets the contents of @selection_data as an array of targets.
23111 // This can be used to interpret the results of getting
23112 // the standard TARGETS target that is always supplied for
23113 // any selection.
23114 // array of targets, otherwise %FALSE.
23115 // RETURNS: %TRUE if @selection_data contains a valid
23116 // <targets>: location to store an array of targets. The result stored here must be freed with g_free().
23117 // <n_atoms>: location to store number of items in @targets.
23118 int get_targets(/*out*/ Gdk2.Atom** targets, /*out*/ int* n_atoms) {
23119 return gtk_selection_data_get_targets(&this, targets, n_atoms);
23122 // Gets the contents of the selection data as a UTF-8 string.
23123 // text type and it could be converted to UTF-8, a newly allocated
23124 // string containing the converted text, otherwise %NULL.
23125 // If the result is non-%NULL it must be freed with g_free().
23126 // RETURNS: if the selection data contained a recognized
23127 ubyte* get_text() {
23128 return gtk_selection_data_get_text(&this);
23131 // Gets the contents of the selection data as array of URIs.
23132 // the selection data contains a list of
23133 // URIs, a newly allocated %NULL-terminated string array
23134 // containing the URIs, otherwise %NULL. If the result is
23135 // non-%NULL it must be freed with g_strfreev().
23136 // RETURNS: if
23137 char** /*new*/ get_uris() {
23138 return gtk_selection_data_get_uris(&this);
23141 // Stores new data into a #GtkSelectionData object. Should
23142 // <emphasis>only</emphasis> be called from a selection handler callback.
23143 // Zero-terminates the stored data.
23144 // <type>: the type of selection data
23145 // <format>: format (number of bits in a unit)
23146 // <data>: pointer to the data (will be copied)
23147 // <length>: length of the data
23148 void set(Gdk2.Atom type, int format, ubyte* data, int length) {
23149 gtk_selection_data_set(&this, type, format, data, length);
23152 // Sets the contents of the selection from a #GdkPixbuf
23153 // The pixbuf is converted to the form determined by
23154 // otherwise %FALSE.
23155 // RETURNS: %TRUE if the selection was successfully set,
23156 // <pixbuf>: a #GdkPixbuf
23157 int set_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) {
23158 return gtk_selection_data_set_pixbuf(&this, pixbuf);
23161 // Sets the contents of the selection from a UTF-8 encoded string.
23162 // The string is converted to the form determined by
23163 // otherwise %FALSE.
23164 // RETURNS: %TRUE if the selection was successfully set,
23165 // <str>: a UTF-8 string
23166 // <len>: the length of @str, or -1 if @str is nul-terminated.
23167 int set_text(char* str, int len) {
23168 return gtk_selection_data_set_text(&this, str, len);
23171 // Sets the contents of the selection from a list of URIs.
23172 // The string is converted to the form determined by
23173 // otherwise %FALSE.
23174 // RETURNS: %TRUE if the selection was successfully set,
23175 // <uris>: a %NULL-terminated array of strings holding URIs
23176 int set_uris(char** uris) {
23177 return gtk_selection_data_set_uris(&this, uris);
23180 // Given a #GtkSelectionData object holding a list of targets,
23181 // determines if any of the targets in @targets can be used to
23182 // provide a #GdkPixbuf.
23183 // and a suitable target for images is included, otherwise %FALSE.
23184 // RETURNS: %TRUE if @selection_data holds a list of targets,
23185 // <writable>: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
23186 int targets_include_image(int writable) {
23187 return gtk_selection_data_targets_include_image(&this, writable);
23190 // Given a #GtkSelectionData object holding a list of targets,
23191 // determines if any of the targets in @targets can be used to
23192 // provide rich text.
23193 // and a suitable target for rich text is included,
23194 // otherwise %FALSE.
23195 // RETURNS: %TRUE if @selection_data holds a list of targets,
23196 // <buffer>: a #GtkTextBuffer
23197 int targets_include_rich_text(TextBuffer* buffer) {
23198 return gtk_selection_data_targets_include_rich_text(&this, buffer);
23201 // Given a #GtkSelectionData object holding a list of targets,
23202 // determines if any of the targets in @targets can be used to
23203 // provide text.
23204 // and a suitable target for text is included, otherwise %FALSE.
23205 // RETURNS: %TRUE if @selection_data holds a list of targets,
23206 int targets_include_text() {
23207 return gtk_selection_data_targets_include_text(&this);
23210 // Given a #GtkSelectionData object holding a list of targets,
23211 // determines if any of the targets in @targets can be used to
23212 // provide a list or URIs.
23213 // and a suitable target for URI lists is included, otherwise %FALSE.
23214 // RETURNS: %TRUE if @selection_data holds a list of targets,
23215 int targets_include_uri() {
23216 return gtk_selection_data_targets_include_uri(&this);
23220 enum SelectionMode {
23221 NONE = 0,
23222 SINGLE = 1,
23223 BROWSE = 2,
23224 MULTIPLE = 3,
23225 EXTENDED = 3
23227 enum SensitivityType {
23228 AUTO = 0,
23229 ON = 1,
23230 OFF = 2
23232 struct Separator /* : Widget */ {
23233 alias widget this;
23234 alias widget super_;
23235 Widget widget;
23238 struct SeparatorClass {
23239 WidgetClass parent_class;
23242 struct SeparatorMenuItem /* : MenuItem */ {
23243 alias menu_item this;
23244 alias menu_item super_;
23245 alias menu_item menuitem;
23246 MenuItem menu_item;
23248 static SeparatorMenuItem* new_() {
23249 return gtk_separator_menu_item_new();
23253 struct SeparatorMenuItemClass {
23254 MenuItemClass parent_class;
23257 struct SeparatorToolItem /* : ToolItem */ {
23258 alias parent this;
23259 alias parent super_;
23260 alias parent toolitem;
23261 ToolItem parent;
23262 private SeparatorToolItemPrivate* priv;
23265 // Create a new #GtkSeparatorToolItem
23266 // RETURNS: the new #GtkSeparatorToolItem
23267 static SeparatorToolItem* new_() {
23268 return gtk_separator_tool_item_new();
23271 // Returns whether @item is drawn as a line, or just blank.
23272 // See gtk_separator_tool_item_set_draw().
23273 // RETURNS: %TRUE if @item is drawn as a line, or just blank.
23274 int get_draw() {
23275 return gtk_separator_tool_item_get_draw(&this);
23278 // Whether @item is drawn as a vertical line, or just blank.
23279 // Setting this to %FALSE along with gtk_tool_item_set_expand() is useful
23280 // to create an item that forces following items to the end of the toolbar.
23281 // <draw>: whether @item is drawn as a vertical line
23282 void set_draw(int draw) {
23283 gtk_separator_tool_item_set_draw(&this, draw);
23287 struct SeparatorToolItemClass {
23288 ToolItemClass parent_class;
23289 extern (C) void function () _gtk_reserved1;
23290 extern (C) void function () _gtk_reserved2;
23291 extern (C) void function () _gtk_reserved3;
23292 extern (C) void function () _gtk_reserved4;
23295 struct SeparatorToolItemPrivate {
23298 struct Settings /* : GObject.Object */ {
23299 alias parent_instance this;
23300 alias parent_instance super_;
23301 alias parent_instance object;
23302 GObject2.Object parent_instance;
23303 GLib2.Data* queued_settings;
23304 SettingsPropertyValue* property_values;
23305 RcContext* rc_context;
23306 Gdk2.Screen* screen;
23309 // Gets the #GtkSettings object for the default GDK screen, creating
23310 // it if necessary. See gtk_settings_get_for_screen().
23311 // screen, then returns %NULL.
23312 // RETURNS: a #GtkSettings object. If there is no default
23313 static Settings* get_default() {
23314 return gtk_settings_get_default();
23317 // Gets the #GtkSettings object for @screen, creating it if necessary.
23318 // RETURNS: a #GtkSettings object.
23319 // <screen>: a #GdkScreen.
23320 static Settings* get_for_screen(Gdk2.Screen* screen) {
23321 return gtk_settings_get_for_screen(screen);
23323 static void install_property(GObject2.ParamSpec* pspec) {
23324 gtk_settings_install_property(pspec);
23326 // Unintrospectable function: install_property_parser() / gtk_settings_install_property_parser()
23327 static void install_property_parser(GObject2.ParamSpec* pspec, RcPropertyParser parser) {
23328 gtk_settings_install_property_parser(pspec, parser);
23330 void set_double_property(char* name, double v_double, char* origin) {
23331 gtk_settings_set_double_property(&this, name, v_double, origin);
23333 void set_long_property(char* name, c_long v_long, char* origin) {
23334 gtk_settings_set_long_property(&this, name, v_long, origin);
23336 void set_property_value(char* name, SettingsValue* svalue) {
23337 gtk_settings_set_property_value(&this, name, svalue);
23339 void set_string_property(char* name, char* v_string, char* origin) {
23340 gtk_settings_set_string_property(&this, name, v_string, origin);
23344 struct SettingsClass {
23345 GObject2.ObjectClass parent_class;
23348 struct SettingsPropertyValue {
23351 struct SettingsValue {
23352 char* origin;
23353 GObject2.Value value;
23356 enum ShadowType {
23357 NONE = 0,
23358 IN = 1,
23359 OUT = 2,
23360 ETCHED_IN = 3,
23361 ETCHED_OUT = 4
23363 enum SideType {
23364 TOP = 0,
23365 BOTTOM = 1,
23366 LEFT = 2,
23367 RIGHT = 3
23369 extern (C) alias void function () SignalFunc;
23371 enum SignalRunType {
23372 FIRST = 1,
23373 LAST = 2,
23374 BOTH = 3,
23375 NO_RECURSE = 8,
23376 ACTION = 32,
23377 NO_HOOKS = 64
23379 struct SizeGroup /* : GObject.Object */ {
23380 alias parent_instance this;
23381 alias parent_instance super_;
23382 alias parent_instance object;
23383 GObject2.Object parent_instance;
23384 private GLib2.SList* widgets;
23385 private ubyte mode;
23386 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
23387 uint, "have_width", 1,
23388 uint, "have_height", 1,
23389 uint, "ignore_hidden", 1,
23390 uint, "__dummy32A", 29));
23391 private Requisition requisition;
23394 // Create a new #GtkSizeGroup.
23395 // RETURNS: a newly created #GtkSizeGroup
23396 // <mode>: the mode for the new size group.
23397 static SizeGroup* /*new*/ new_(SizeGroupMode mode) {
23398 return gtk_size_group_new(mode);
23401 // Adds a widget to a #GtkSizeGroup. In the future, the requisition
23402 // of the widget will be determined as the maximum of its requisition
23403 // and the requisition of the other widgets in the size group.
23404 // Whether this applies horizontally, vertically, or in both directions
23405 // depends on the mode of the size group. See gtk_size_group_set_mode().
23406 // When the widget is destroyed or no longer referenced elsewhere, it will
23407 // be removed from the size group.
23408 // <widget>: the #GtkWidget to add
23409 void add_widget(Widget* widget) {
23410 gtk_size_group_add_widget(&this, widget);
23413 // Returns if invisible widgets are ignored when calculating the size.
23414 // RETURNS: %TRUE if invisible widgets are ignored.
23415 int get_ignore_hidden() {
23416 return gtk_size_group_get_ignore_hidden(&this);
23419 // Gets the current mode of the size group. See gtk_size_group_set_mode().
23420 // RETURNS: the current mode of the size group.
23421 SizeGroupMode get_mode() {
23422 return gtk_size_group_get_mode(&this);
23425 // Returns the list of widgets associated with @size_group.
23426 // widgets. The list is owned by GTK+ and should not be modified.
23427 // RETURNS: a #GSList of
23428 GLib2.SList* get_widgets() {
23429 return gtk_size_group_get_widgets(&this);
23432 // Removes a widget from a #GtkSizeGroup.
23433 // <widget>: the #GtkWidget to remove
23434 void remove_widget(Widget* widget) {
23435 gtk_size_group_remove_widget(&this, widget);
23438 // Sets whether unmapped widgets should be ignored when
23439 // calculating the size.
23440 // <ignore_hidden>: whether unmapped widgets should be ignored when calculating the size
23441 void set_ignore_hidden(int ignore_hidden) {
23442 gtk_size_group_set_ignore_hidden(&this, ignore_hidden);
23445 // Sets the #GtkSizeGroupMode of the size group. The mode of the size
23446 // group determines whether the widgets in the size group should
23447 // all have the same horizontal requisition (%GTK_SIZE_GROUP_MODE_HORIZONTAL)
23448 // all have the same vertical requisition (%GTK_SIZE_GROUP_MODE_VERTICAL),
23449 // or should all have the same requisition in both directions
23450 // (%GTK_SIZE_GROUP_MODE_BOTH).
23451 // <mode>: the mode to set for the size group.
23452 void set_mode(SizeGroupMode mode) {
23453 gtk_size_group_set_mode(&this, mode);
23457 struct SizeGroupClass {
23458 GObject2.ObjectClass parent_class;
23459 extern (C) void function () _gtk_reserved1;
23460 extern (C) void function () _gtk_reserved2;
23461 extern (C) void function () _gtk_reserved3;
23462 extern (C) void function () _gtk_reserved4;
23466 // The mode of the size group determines the directions in which the size
23467 // group affects the requested sizes of its component widgets.
23468 enum SizeGroupMode {
23469 NONE = 0,
23470 HORIZONTAL = 1,
23471 VERTICAL = 2,
23472 BOTH = 3
23475 // Together with #GtkPlug, #GtkSocket provides the ability
23476 // to embed widgets from one process into another process
23477 // in a fashion that is transparent to the user. One
23478 // process creates a #GtkSocket widget and passes
23479 // that widget's window ID to the other process,
23480 // which then creates a #GtkPlug with that window ID.
23481 // Any widgets contained in the #GtkPlug then will appear
23482 // inside the first application's window.
23483 // The socket's window ID is obtained by using
23484 // gtk_socket_get_id(). Before using this function,
23485 // the socket must have been realized, and for hence,
23486 // have been added to its parent.
23487 // <example>
23488 // <title>Obtaining the window ID of a socket.</title>
23489 // <programlisting>
23490 // GtkWidget *socket = gtk_socket_new (<!-- -->);
23491 // gtk_widget_show (socket);
23492 // gtk_container_add (GTK_CONTAINER (parent), socket);
23493 // /<!---->* The following call is only necessary if one of
23494 // * the ancestors of the socket is not yet visible.
23495 // *<!---->/
23496 // gtk_widget_realize (socket);
23497 // g_print ("The ID of the sockets window is %#x\n",
23498 // gtk_socket_get_id (socket));
23499 // </programlisting>
23500 // </example>
23501 // Note that if you pass the window ID of the socket to another
23502 // process that will create a plug in the socket, you
23503 // must make sure that the socket widget is not destroyed
23504 // until that plug is created. Violating this rule will
23505 // cause unpredictable consequences, the most likely
23506 // consequence being that the plug will appear as a
23507 // separate toplevel window. You can check if the plug
23508 // has been created by using gtk_socket_get_plug_window(). If
23509 // it returns a non-%NULL value, then the plug has been
23510 // successfully created inside of the socket.
23511 // When GTK+ is notified that the embedded window has been
23512 // destroyed, then it will destroy the socket as well. You
23513 // should always, therefore, be prepared for your sockets
23514 // to be destroyed at any time when the main event loop
23515 // is running. To prevent this from happening, you can
23516 // connect to the #GtkSocket::plug-removed signal.
23517 // The communication between a #GtkSocket and a #GtkPlug follows the
23518 // <ulink url="http://www.freedesktop.org/Standards/xembed-spec">XEmbed</ulink>
23519 // protocol. This protocol has also been implemented in other toolkits, e.g.
23520 // <application>Qt</application>, allowing the same level of integration
23521 // when embedding a <application>Qt</application> widget in GTK or vice versa.
23522 // A socket can also be used to swallow arbitrary
23523 // pre-existing top-level windows using gtk_socket_steal(),
23524 // though the integration when this is done will not be as close
23525 // as between a #GtkPlug and a #GtkSocket.
23526 // <note>
23527 // The #GtkPlug and #GtkSocket widgets are currently not available
23528 // on all platforms supported by GTK+.
23529 // </note>
23530 struct Socket /* : Container */ {
23531 alias container this;
23532 alias container super_;
23533 Container container;
23534 ushort request_width, request_height, current_width, current_height;
23535 Gdk2.Window* plug_window;
23536 Widget* plug_widget;
23537 short xembed_version;
23538 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
23539 uint, "same_app", 1,
23540 uint, "focus_in", 1,
23541 uint, "have_size", 1,
23542 uint, "need_map", 1,
23543 uint, "is_mapped", 1,
23544 uint, "active", 1,
23545 uint, "__dummy32A", 26));
23546 AccelGroup* accel_group;
23547 Widget* toplevel;
23550 // Create a new empty #GtkSocket.
23551 // RETURNS: the new #GtkSocket.
23552 static Socket* new_() {
23553 return gtk_socket_new();
23556 // Adds an XEMBED client, such as a #GtkPlug, to the #GtkSocket. The
23557 // client may be in the same process or in a different process.
23558 // To embed a #GtkPlug in a #GtkSocket, you can either create the
23559 // #GtkPlug with <literal>gtk_plug_new (0)</literal>, call
23560 // gtk_plug_get_id() to get the window ID of the plug, and then pass that to the
23561 // gtk_socket_add_id(), or you can call gtk_socket_get_id() to get the
23562 // window ID for the socket, and call gtk_plug_new() passing in that
23563 // ID.
23564 // The #GtkSocket must have already be added into a toplevel window
23565 // before you can make this call.
23566 // <window_id>: the window ID of a client participating in the XEMBED protocol.
23567 void add_id(Gdk2.NativeWindow window_id) {
23568 gtk_socket_add_id(&this, window_id);
23571 // Gets the window ID of a #GtkSocket widget, which can then
23572 // be used to create a client embedded inside the socket, for
23573 // instance with gtk_plug_new().
23574 // The #GtkSocket must have already be added into a toplevel window
23575 // before you can make this call.
23576 // RETURNS: the window ID for the socket
23577 Gdk2.NativeWindow get_id() {
23578 return gtk_socket_get_id(&this);
23581 // Retrieves the window of the plug. Use this to check if the plug has
23582 // been created inside of the socket.
23583 // RETURNS: the window of the plug if available, or %NULL
23584 Gdk2.Window* get_plug_window() {
23585 return gtk_socket_get_plug_window(&this);
23588 // Reparents a pre-existing toplevel window into a #GtkSocket. This is
23589 // meant to embed clients that do not know about embedding into a
23590 // #GtkSocket, however doing so is inherently unreliable, and using
23591 // this function is not recommended.
23592 // The #GtkSocket must have already be added into a toplevel window
23593 // before you can make this call.
23594 // <wid>: the window ID of an existing toplevel window.
23595 void steal(Gdk2.NativeWindow wid) {
23596 gtk_socket_steal(&this, wid);
23599 // This signal is emitted when a client is successfully
23600 // added to the socket.
23601 extern (C) alias static void function (Socket* this_, void* user_data=null) signal_plug_added;
23603 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23604 return super_.signal_connect!name(cb, data, cf);
23607 ulong signal_connect(string name:"plug-added", CB/*:signal_plug_added*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23608 return signal_connect_data(&this, cast(char*)"plug-added",
23609 cast(GObject2.Callback)cb, data, null, cf);
23612 // This signal is emitted when a client is removed from the socket.
23613 // The default action is to destroy the #GtkSocket widget, so if you
23614 // want to reuse it you must add a signal handler that returns %TRUE.
23615 // RETURNS: %TRUE to stop other handlers from being invoked.
23616 extern (C) alias static c_int function (Socket* this_, void* user_data=null) signal_plug_removed;
23617 ulong signal_connect(string name:"plug-removed", CB/*:signal_plug_removed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23618 return signal_connect_data(&this, cast(char*)"plug-removed",
23619 cast(GObject2.Callback)cb, data, null, cf);
23623 struct SocketClass {
23624 ContainerClass parent_class;
23625 extern (C) void function (Socket* socket_) plug_added;
23626 extern (C) int function (Socket* socket_) plug_removed;
23627 extern (C) void function () _gtk_reserved1;
23628 extern (C) void function () _gtk_reserved2;
23629 extern (C) void function () _gtk_reserved3;
23630 extern (C) void function () _gtk_reserved4;
23633 enum SortType {
23634 ASCENDING = 0,
23635 DESCENDING = 1
23637 struct SpinButton /* : Entry */ {
23638 alias entry this;
23639 alias entry super_;
23640 Entry entry;
23641 Adjustment* adjustment;
23642 Gdk2.Window* panel;
23643 uint timer;
23644 double climb_rate, timer_step;
23645 SpinButtonUpdatePolicy update_policy;
23646 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
23647 uint, "in_child", 2,
23648 uint, "click_child", 2,
23649 uint, "button", 2,
23650 uint, "need_timer", 1,
23651 uint, "timer_calls", 3,
23652 uint, "digits", 10,
23653 uint, "numeric", 1,
23654 uint, "wrap", 1,
23655 uint, "snap_to_ticks", 1,
23656 uint, "__dummy32A", 9));
23658 static SpinButton* new_(Adjustment* adjustment, double climb_rate, uint digits) {
23659 return gtk_spin_button_new(adjustment, climb_rate, digits);
23662 // This is a convenience constructor that allows creation of a numeric
23663 // #GtkSpinButton without manually creating an adjustment. The value is
23664 // initially set to the minimum value and a page increment of 10 * @step
23665 // is the default. The precision of the spin button is equivalent to the
23666 // precision of @step.
23667 // Note that the way in which the precision is derived works best if @step
23668 // is a power of ten. If the resulting precision is not suitable for your
23669 // needs, use gtk_spin_button_set_digits() to correct it.
23670 // RETURNS: The new spin button as a #GtkWidget.
23671 // <min>: Minimum allowable value
23672 // <max>: Maximum allowable value
23673 // <step>: Increment added or subtracted by spinning the widget
23674 static SpinButton* new_with_range(double min, double max, double step) {
23675 return gtk_spin_button_new_with_range(min, max, step);
23678 // Changes the properties of an existing spin button. The adjustment, climb rate,
23679 // and number of decimal places are all changed accordingly, after this function call.
23680 // <adjustment>: a #GtkAdjustment.
23681 // <climb_rate>: the new climb rate.
23682 // <digits>: the number of decimal places to display in the spin button.
23683 void configure(Adjustment* adjustment, double climb_rate, uint digits) {
23684 gtk_spin_button_configure(&this, adjustment, climb_rate, digits);
23687 // Get the adjustment associated with a #GtkSpinButton
23688 // RETURNS: the #GtkAdjustment of @spin_button
23689 Adjustment* get_adjustment() {
23690 return gtk_spin_button_get_adjustment(&this);
23693 // Fetches the precision of @spin_button. See gtk_spin_button_set_digits().
23694 // RETURNS: the current precision
23695 uint get_digits() {
23696 return gtk_spin_button_get_digits(&this);
23699 // Gets the current step and page the increments used by @spin_button. See
23700 // gtk_spin_button_set_increments().
23701 // <step>: location to store step increment, or %NULL
23702 // <page>: location to store page increment, or %NULL
23703 void get_increments(/*out*/ double* step=null, /*out*/ double* page=null) {
23704 gtk_spin_button_get_increments(&this, step, page);
23707 // Returns whether non-numeric text can be typed into the spin button.
23708 // See gtk_spin_button_set_numeric().
23709 // RETURNS: %TRUE if only numeric text can be entered
23710 int get_numeric() {
23711 return gtk_spin_button_get_numeric(&this);
23714 // Gets the range allowed for @spin_button. See
23715 // gtk_spin_button_set_range().
23716 // <min>: location to store minimum allowed value, or %NULL
23717 // <max>: location to store maximum allowed value, or %NULL
23718 void get_range(/*out*/ double* min=null, /*out*/ double* max=null) {
23719 gtk_spin_button_get_range(&this, min, max);
23722 // Returns whether the values are corrected to the nearest step. See
23723 // gtk_spin_button_set_snap_to_ticks().
23724 // RETURNS: %TRUE if values are snapped to the nearest step.
23725 int get_snap_to_ticks() {
23726 return gtk_spin_button_get_snap_to_ticks(&this);
23729 // Gets the update behavior of a spin button. See
23730 // gtk_spin_button_set_update_policy().
23731 // RETURNS: the current update policy
23732 SpinButtonUpdatePolicy get_update_policy() {
23733 return gtk_spin_button_get_update_policy(&this);
23736 // Get the value in the @spin_button.
23737 // RETURNS: the value of @spin_button
23738 double get_value() {
23739 return gtk_spin_button_get_value(&this);
23742 // Get the value @spin_button represented as an integer.
23743 // RETURNS: the value of @spin_button
23744 int get_value_as_int() {
23745 return gtk_spin_button_get_value_as_int(&this);
23748 // Returns whether the spin button's value wraps around to the
23749 // opposite limit when the upper or lower limit of the range is
23750 // exceeded. See gtk_spin_button_set_wrap().
23751 // RETURNS: %TRUE if the spin button wraps around
23752 int get_wrap() {
23753 return gtk_spin_button_get_wrap(&this);
23756 // Replaces the #GtkAdjustment associated with @spin_button.
23757 // <adjustment>: a #GtkAdjustment to replace the existing adjustment
23758 void set_adjustment(Adjustment* adjustment) {
23759 gtk_spin_button_set_adjustment(&this, adjustment);
23762 // Set the precision to be displayed by @spin_button. Up to 20 digit precision
23763 // is allowed.
23764 // <digits>: the number of digits after the decimal point to be displayed for the spin button's value
23765 void set_digits(uint digits) {
23766 gtk_spin_button_set_digits(&this, digits);
23769 // Sets the step and page increments for spin_button. This affects how
23770 // quickly the value changes when the spin button's arrows are activated.
23771 // <step>: increment applied for a button 1 press.
23772 // <page>: increment applied for a button 2 press.
23773 void set_increments(double step, double page) {
23774 gtk_spin_button_set_increments(&this, step, page);
23777 // Sets the flag that determines if non-numeric text can be typed into
23778 // the spin button.
23779 // <numeric>: flag indicating if only numeric entry is allowed.
23780 void set_numeric(int numeric) {
23781 gtk_spin_button_set_numeric(&this, numeric);
23784 // Sets the minimum and maximum allowable values for @spin_button
23785 // <min>: minimum allowable value
23786 // <max>: maximum allowable value
23787 void set_range(double min, double max) {
23788 gtk_spin_button_set_range(&this, min, max);
23791 // Sets the policy as to whether values are corrected to the nearest step
23792 // increment when a spin button is activated after providing an invalid value.
23793 // <snap_to_ticks>: a flag indicating if invalid values should be corrected.
23794 void set_snap_to_ticks(int snap_to_ticks) {
23795 gtk_spin_button_set_snap_to_ticks(&this, snap_to_ticks);
23798 // Sets the update behavior of a spin button. This determines whether the
23799 // spin button is always updated or only when a valid value is set.
23800 // <policy>: a #GtkSpinButtonUpdatePolicy value
23801 void set_update_policy(SpinButtonUpdatePolicy policy) {
23802 gtk_spin_button_set_update_policy(&this, policy);
23805 // Set the value of @spin_button.
23806 // <value>: the new value
23807 void set_value(double value) {
23808 gtk_spin_button_set_value(&this, value);
23811 // Sets the flag that determines if a spin button value wraps around to the
23812 // opposite limit when the upper or lower limit of the range is exceeded.
23813 // <wrap>: a flag indicating if wrapping behavior is performed.
23814 void set_wrap(int wrap) {
23815 gtk_spin_button_set_wrap(&this, wrap);
23818 // Increment or decrement a spin button's value in a specified direction
23819 // by a specified amount.
23820 // <direction>: a #GtkSpinType indicating the direction to spin.
23821 // <increment>: step increment to apply in the specified direction.
23822 void spin(SpinType direction, double increment) {
23823 gtk_spin_button_spin(&this, direction, increment);
23825 // Manually force an update of the spin button.
23826 void update() {
23827 gtk_spin_button_update(&this);
23829 extern (C) alias static void function (SpinButton* this_, ScrollType* object, void* user_data=null) signal_change_value;
23831 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23832 return super_.signal_connect!name(cb, data, cf);
23835 ulong signal_connect(string name:"change-value", CB/*:signal_change_value*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23836 return signal_connect_data(&this, cast(char*)"change-value",
23837 cast(GObject2.Callback)cb, data, null, cf);
23839 extern (C) alias static int function (SpinButton* this_, void* object, void* user_data=null) signal_input;
23840 ulong signal_connect(string name:"input", CB/*:signal_input*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23841 return signal_connect_data(&this, cast(char*)"input",
23842 cast(GObject2.Callback)cb, data, null, cf);
23845 // The ::output signal can be used to change to formatting
23846 // of the value that is displayed in the spin buttons entry.
23847 // |[
23848 // /&ast; show leading zeros &ast;/
23849 // static gboolean
23850 // on_output (GtkSpinButton *spin,
23851 // gpointer data)
23852 // {
23853 // GtkAdjustment *adj;
23854 // gchar *text;
23855 // int value;
23856 // adj = gtk_spin_button_get_adjustment (spin);
23857 // value = (int)gtk_adjustment_get_value (adj);
23858 // text = g_strdup_printf ("%02d", value);
23859 // gtk_entry_set_text (GTK_ENTRY (spin), text);
23860 // g_free (text);
23861 // return TRUE;
23862 // }
23863 // ]|
23864 // RETURNS: %TRUE if the value has been displayed.
23865 extern (C) alias static c_int function (SpinButton* this_, void* user_data=null) signal_output;
23866 ulong signal_connect(string name:"output", CB/*:signal_output*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23867 return signal_connect_data(&this, cast(char*)"output",
23868 cast(GObject2.Callback)cb, data, null, cf);
23870 extern (C) alias static void function (SpinButton* this_, void* user_data=null) signal_value_changed;
23871 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23872 return signal_connect_data(&this, cast(char*)"value-changed",
23873 cast(GObject2.Callback)cb, data, null, cf);
23876 // The wrapped signal is emitted right after the spinbutton wraps
23877 // from its maximum to minimum value or vice-versa.
23878 extern (C) alias static void function (SpinButton* this_, void* user_data=null) signal_wrapped;
23879 ulong signal_connect(string name:"wrapped", CB/*:signal_wrapped*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23880 return signal_connect_data(&this, cast(char*)"wrapped",
23881 cast(GObject2.Callback)cb, data, null, cf);
23885 struct SpinButtonClass {
23886 EntryClass parent_class;
23887 extern (C) int function (SpinButton* spin_button, double* new_value) input;
23888 extern (C) int function (SpinButton* spin_button) output;
23889 extern (C) void function (SpinButton* spin_button) value_changed;
23890 extern (C) void function (SpinButton* spin_button, ScrollType scroll) change_value;
23891 extern (C) void function (SpinButton* spin_button) wrapped;
23892 extern (C) void function () _gtk_reserved1;
23893 extern (C) void function () _gtk_reserved2;
23894 extern (C) void function () _gtk_reserved3;
23897 enum SpinButtonUpdatePolicy {
23898 ALWAYS = 0,
23899 IF_VALID = 1
23901 enum SpinType {
23902 STEP_FORWARD = 0,
23903 STEP_BACKWARD = 1,
23904 PAGE_FORWARD = 2,
23905 PAGE_BACKWARD = 3,
23906 HOME = 4,
23907 END = 5,
23908 USER_DEFINED = 6
23911 // A GtkSpinner widget displays an icon-size spinning animation.
23912 // It is often used as an alternative to a #GtkProgressBar for
23913 // displaying indefinite activity, instead of actual progress.
23914 // To start the animation, use gtk_spinner_start(), to stop it
23915 // use gtk_spinner_stop().
23916 struct Spinner /* : DrawingArea */ {
23917 alias parent this;
23918 alias parent super_;
23919 alias parent drawingarea;
23920 DrawingArea parent;
23921 SpinnerPrivate* priv;
23924 // Returns a new spinner widget. Not yet started.
23925 // RETURNS: a new #GtkSpinner
23926 static Spinner* new_() {
23927 return gtk_spinner_new();
23929 // Starts the animation of the spinner.
23930 void start() {
23931 gtk_spinner_start(&this);
23933 // Stops the animation of the spinner.
23934 void stop() {
23935 gtk_spinner_stop(&this);
23939 struct SpinnerClass {
23940 DrawingAreaClass parent_class;
23943 struct SpinnerPrivate {
23946 enum StateType {
23947 NORMAL = 0,
23948 ACTIVE = 1,
23949 PRELIGHT = 2,
23950 SELECTED = 3,
23951 INSENSITIVE = 4
23953 struct StatusIcon /* : GObject.Object */ {
23954 alias parent_instance this;
23955 alias parent_instance super_;
23956 alias parent_instance object;
23957 GObject2.Object parent_instance;
23958 StatusIconPrivate* priv;
23961 // Creates an empty status icon object.
23962 // RETURNS: a new #GtkStatusIcon
23963 static StatusIcon* /*new*/ new_() {
23964 return gtk_status_icon_new();
23967 // Creates a status icon displaying the file @filename.
23968 // The image will be scaled down to fit in the available
23969 // space in the notification area, if necessary.
23970 // RETURNS: a new #GtkStatusIcon
23971 // <filename>: a filename
23972 static StatusIcon* /*new*/ new_from_file(char* filename) {
23973 return gtk_status_icon_new_from_file(filename);
23976 // Creates a status icon displaying a #GIcon. If the icon is a
23977 // themed icon, it will be updated when the theme changes.
23978 // RETURNS: a new #GtkStatusIcon
23979 // <icon>: a #GIcon
23980 static StatusIcon* /*new*/ new_from_gicon(Gio2.Icon* icon) {
23981 return gtk_status_icon_new_from_gicon(icon);
23984 // Creates a status icon displaying an icon from the current icon theme.
23985 // If the current icon theme is changed, the icon will be updated
23986 // appropriately.
23987 // RETURNS: a new #GtkStatusIcon
23988 // <icon_name>: an icon name
23989 static StatusIcon* /*new*/ new_from_icon_name(char* icon_name) {
23990 return gtk_status_icon_new_from_icon_name(icon_name);
23993 // Creates a status icon displaying @pixbuf.
23994 // The image will be scaled down to fit in the available
23995 // space in the notification area, if necessary.
23996 // RETURNS: a new #GtkStatusIcon
23997 // <pixbuf>: a #GdkPixbuf
23998 static StatusIcon* /*new*/ new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) {
23999 return gtk_status_icon_new_from_pixbuf(pixbuf);
24002 // Creates a status icon displaying a stock icon. Sample stock icon
24003 // names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. You can register your
24004 // own stock icon names, see gtk_icon_factory_add_default() and
24005 // gtk_icon_factory_add().
24006 // RETURNS: a new #GtkStatusIcon
24007 // <stock_id>: a stock icon id
24008 static StatusIcon* /*new*/ new_from_stock(char* stock_id) {
24009 return gtk_status_icon_new_from_stock(stock_id);
24012 // Menu positioning function to use with gtk_menu_popup()
24013 // to position @menu aligned to the status icon @user_data.
24014 // <menu>: the #GtkMenu
24015 // <x>: return location for the x position
24016 // <y>: return location for the y position
24017 // <push_in>: whether the first menu item should be offset (pushed in) to be aligned with the menu popup position (only useful for GtkOptionMenu).
24018 // <user_data>: the status icon to position the menu on
24019 static void position_menu(Menu* menu, int* x, int* y, int* push_in, void* user_data) {
24020 gtk_status_icon_position_menu(menu, x, y, push_in, user_data);
24023 // Returns whether the icon is blinking, see
24024 // gtk_status_icon_set_blinking().
24025 // RETURNS: %TRUE if the icon is blinking
24026 int get_blinking() {
24027 return gtk_status_icon_get_blinking(&this);
24030 // Obtains information about the location of the status icon
24031 // on screen. This information can be used to e.g. position
24032 // popups like notification bubbles.
24033 // See gtk_status_icon_position_menu() for a more convenient
24034 // alternative for positioning menus.
24035 // Note that some platforms do not allow GTK+ to provide
24036 // this information, and even on platforms that do allow it,
24037 // the information is not reliable unless the status icon
24038 // is embedded in a notification area, see
24039 // gtk_status_icon_is_embedded().
24040 // been filled in
24041 // RETURNS: %TRUE if the location information has
24042 // <screen>: return location for the screen, or %NULL if the information is not needed
24043 // <area>: return location for the area occupied by the status icon, or %NULL
24044 // <orientation>: return location for the orientation of the panel in which the status icon is embedded, or %NULL. A panel at the top or bottom of the screen is horizontal, a panel at the left or right is vertical.
24045 int get_geometry(/*out*/ Gdk2.Screen** screen=null, /*out*/ Gdk2.Rectangle* area=null, /*out*/ Orientation* orientation=null) {
24046 return gtk_status_icon_get_geometry(&this, screen, area, orientation);
24049 // Retrieves the #GIcon being displayed by the #GtkStatusIcon.
24050 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
24051 // %GTK_IMAGE_GICON (see gtk_status_icon_get_storage_type()).
24052 // The caller of this function does not own a reference to the
24053 // returned #GIcon.
24054 // If this function fails, @icon is left unchanged;
24055 // RETURNS: the displayed icon, or %NULL if the image is empty
24056 Gio2.Icon* get_gicon() {
24057 return gtk_status_icon_get_gicon(&this);
24060 // Returns the current value of the has-tooltip property.
24061 // See #GtkStatusIcon:has-tooltip for more information.
24062 // RETURNS: current value of has-tooltip on @status_icon.
24063 int get_has_tooltip() {
24064 return gtk_status_icon_get_has_tooltip(&this);
24067 // Gets the name of the icon being displayed by the #GtkStatusIcon.
24068 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
24069 // %GTK_IMAGE_ICON_NAME (see gtk_status_icon_get_storage_type()).
24070 // The returned string is owned by the #GtkStatusIcon and should not
24071 // be freed or modified.
24072 // RETURNS: name of the displayed icon, or %NULL if the image is empty.
24073 char* get_icon_name() {
24074 return gtk_status_icon_get_icon_name(&this);
24077 // Gets the #GdkPixbuf being displayed by the #GtkStatusIcon.
24078 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
24079 // %GTK_IMAGE_PIXBUF (see gtk_status_icon_get_storage_type()).
24080 // The caller of this function does not own a reference to the
24081 // returned pixbuf.
24082 // or %NULL if the image is empty.
24083 // RETURNS: the displayed pixbuf,
24084 GdkPixbuf2.Pixbuf* get_pixbuf() {
24085 return gtk_status_icon_get_pixbuf(&this);
24088 // Returns the #GdkScreen associated with @status_icon.
24089 // RETURNS: a #GdkScreen.
24090 Gdk2.Screen* get_screen() {
24091 return gtk_status_icon_get_screen(&this);
24094 // Gets the size in pixels that is available for the image.
24095 // Stock icons and named icons adapt their size automatically
24096 // if the size of the notification area changes. For other
24097 // storage types, the size-changed signal can be used to
24098 // react to size changes.
24099 // Note that the returned size is only meaningful while the
24100 // status icon is embedded (see gtk_status_icon_is_embedded()).
24101 // RETURNS: the size that is available for the image
24102 int get_size() {
24103 return gtk_status_icon_get_size(&this);
24106 // Gets the id of the stock icon being displayed by the #GtkStatusIcon.
24107 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
24108 // %GTK_IMAGE_STOCK (see gtk_status_icon_get_storage_type()).
24109 // The returned string is owned by the #GtkStatusIcon and should not
24110 // be freed or modified.
24111 // or %NULL if the image is empty.
24112 // RETURNS: stock id of the displayed stock icon,
24113 char* get_stock() {
24114 return gtk_status_icon_get_stock(&this);
24117 // Gets the type of representation being used by the #GtkStatusIcon
24118 // to store image data. If the #GtkStatusIcon has no image data,
24119 // the return value will be %GTK_IMAGE_EMPTY.
24120 // RETURNS: the image representation being used
24121 ImageType get_storage_type() {
24122 return gtk_status_icon_get_storage_type(&this);
24125 // Gets the title of this tray icon. See gtk_status_icon_set_title().
24126 // RETURNS: the title of the status icon
24127 char* get_title() {
24128 return gtk_status_icon_get_title(&this);
24131 // Gets the contents of the tooltip for @status_icon.
24132 // returned string with g_free() when done.
24133 // RETURNS: the tooltip text, or %NULL. You should free the
24134 char* /*new*/ get_tooltip_markup() {
24135 return gtk_status_icon_get_tooltip_markup(&this);
24138 // Gets the contents of the tooltip for @status_icon.
24139 // returned string with g_free() when done.
24140 // RETURNS: the tooltip text, or %NULL. You should free the
24141 char* /*new*/ get_tooltip_text() {
24142 return gtk_status_icon_get_tooltip_text(&this);
24145 // Returns whether the status icon is visible or not.
24146 // Note that being visible does not guarantee that
24147 // the user can actually see the icon, see also
24148 // gtk_status_icon_is_embedded().
24149 // RETURNS: %TRUE if the status icon is visible
24150 int get_visible() {
24151 return gtk_status_icon_get_visible(&this);
24154 // This function is only useful on the X11/freedesktop.org platform.
24155 // It returns a window ID for the widget in the underlying
24156 // status icon implementation. This is useful for the Galago
24157 // notification service, which can send a window ID in the protocol
24158 // in order for the server to position notification windows
24159 // pointing to a status icon reliably.
24160 // This function is not intended for other use cases which are
24161 // more likely to be met by one of the non-X11 specific methods, such
24162 // as gtk_status_icon_position_menu().
24163 // underlying X11 Window
24164 // RETURNS: An 32 bit unsigned integer identifier for the
24165 uint get_x11_window_id() {
24166 return gtk_status_icon_get_x11_window_id(&this);
24169 // Returns whether the status icon is embedded in a notification
24170 // area.
24171 // a notification area.
24172 // RETURNS: %TRUE if the status icon is embedded in
24173 int is_embedded() {
24174 return gtk_status_icon_is_embedded(&this);
24177 // Makes the status icon start or stop blinking.
24178 // Note that blinking user interface elements may be problematic
24179 // for some users, and thus may be turned off, in which case
24180 // this setting has no effect.
24181 // <blinking>: %TRUE to turn blinking on, %FALSE to turn it off
24182 void set_blinking(int blinking) {
24183 gtk_status_icon_set_blinking(&this, blinking);
24186 // Makes @status_icon display the file @filename.
24187 // See gtk_status_icon_new_from_file() for details.
24188 // <filename>: a filename
24189 void set_from_file(char* filename) {
24190 gtk_status_icon_set_from_file(&this, filename);
24193 // Makes @status_icon display the #GIcon.
24194 // See gtk_status_icon_new_from_gicon() for details.
24195 // <icon>: a GIcon
24196 void set_from_gicon(Gio2.Icon* icon) {
24197 gtk_status_icon_set_from_gicon(&this, icon);
24200 // Makes @status_icon display the icon named @icon_name from the
24201 // current icon theme.
24202 // See gtk_status_icon_new_from_icon_name() for details.
24203 // <icon_name>: an icon name
24204 void set_from_icon_name(char* icon_name) {
24205 gtk_status_icon_set_from_icon_name(&this, icon_name);
24208 // Makes @status_icon display @pixbuf.
24209 // See gtk_status_icon_new_from_pixbuf() for details.
24210 // <pixbuf>: a #GdkPixbuf or %NULL
24211 void set_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf=null) {
24212 gtk_status_icon_set_from_pixbuf(&this, pixbuf);
24215 // Makes @status_icon display the stock icon with the id @stock_id.
24216 // See gtk_status_icon_new_from_stock() for details.
24217 // <stock_id>: a stock icon id
24218 void set_from_stock(char* stock_id) {
24219 gtk_status_icon_set_from_stock(&this, stock_id);
24222 // Sets the has-tooltip property on @status_icon to @has_tooltip.
24223 // See #GtkStatusIcon:has-tooltip for more information.
24224 // <has_tooltip>: whether or not @status_icon has a tooltip
24225 void set_has_tooltip(int has_tooltip) {
24226 gtk_status_icon_set_has_tooltip(&this, has_tooltip);
24229 // Sets the name of this tray icon.
24230 // This should be a string identifying this icon. It is may be
24231 // used for sorting the icons in the tray and will not be shown to
24232 // the user.
24233 // <name>: the name
24234 void set_name(char* name) {
24235 gtk_status_icon_set_name(&this, name);
24238 // Sets the #GdkScreen where @status_icon is displayed; if
24239 // the icon is already mapped, it will be unmapped, and
24240 // then remapped on the new screen.
24241 // <screen>: a #GdkScreen
24242 void set_screen(Gdk2.Screen* screen) {
24243 gtk_status_icon_set_screen(&this, screen);
24246 // Sets the title of this tray icon.
24247 // This should be a short, human-readable, localized string
24248 // describing the tray icon. It may be used by tools like screen
24249 // readers to render the tray icon.
24250 // <title>: the title
24251 void set_title(char* title) {
24252 gtk_status_icon_set_title(&this, title);
24255 // Sets the tooltip of the status icon.
24256 // <tooltip_text>: the tooltip text, or %NULL
24257 void set_tooltip(char* tooltip_text=null) {
24258 gtk_status_icon_set_tooltip(&this, tooltip_text);
24261 // Sets @markup as the contents of the tooltip, which is marked up with
24262 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
24263 // This function will take care of setting #GtkStatusIcon:has-tooltip to %TRUE
24264 // and of the default handler for the #GtkStatusIcon::query-tooltip signal.
24265 // See also the #GtkStatusIcon:tooltip-markup property and
24266 // gtk_tooltip_set_markup().
24267 // <markup>: the contents of the tooltip for @status_icon, or %NULL
24268 void set_tooltip_markup(char* markup=null) {
24269 gtk_status_icon_set_tooltip_markup(&this, markup);
24272 // Sets @text as the contents of the tooltip.
24273 // This function will take care of setting #GtkStatusIcon:has-tooltip to
24274 // %TRUE and of the default handler for the #GtkStatusIcon::query-tooltip
24275 // signal.
24276 // See also the #GtkStatusIcon:tooltip-text property and
24277 // gtk_tooltip_set_text().
24278 // <text>: the contents of the tooltip for @status_icon
24279 void set_tooltip_text(char* text) {
24280 gtk_status_icon_set_tooltip_text(&this, text);
24283 // Shows or hides a status icon.
24284 // <visible>: %TRUE to show the status icon, %FALSE to hide it
24285 void set_visible(int visible) {
24286 gtk_status_icon_set_visible(&this, visible);
24289 // Gets emitted when the user activates the status icon.
24290 // If and how status icons can activated is platform-dependent.
24291 // Unlike most G_SIGNAL_ACTION signals, this signal is meant to
24292 // be used by applications and should be wrapped by language bindings.
24293 extern (C) alias static void function (StatusIcon* this_, void* user_data=null) signal_activate;
24295 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24296 return super_.signal_connect!name(cb, data, cf);
24299 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24300 return signal_connect_data(&this, cast(char*)"activate",
24301 cast(GObject2.Callback)cb, data, null, cf);
24304 // The ::button-press-event signal will be emitted when a button
24305 // (typically from a mouse) is pressed.
24306 // Whether this event is emitted is platform-dependent. Use the ::activate
24307 // and ::popup-menu signals in preference.
24308 // for the event. %FALSE to propagate the event further.
24309 // RETURNS: %TRUE to stop other handlers from being invoked
24310 // <event>: the #GdkEventButton which triggered this signal
24311 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) signal_button_press_event;
24312 ulong signal_connect(string name:"button-press-event", CB/*:signal_button_press_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24313 return signal_connect_data(&this, cast(char*)"button-press-event",
24314 cast(GObject2.Callback)cb, data, null, cf);
24317 // The ::button-release-event signal will be emitted when a button
24318 // (typically from a mouse) is released.
24319 // Whether this event is emitted is platform-dependent. Use the ::activate
24320 // and ::popup-menu signals in preference.
24321 // for the event. %FALSE to propagate the event further.
24322 // RETURNS: %TRUE to stop other handlers from being invoked
24323 // <event>: the #GdkEventButton which triggered this signal
24324 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) signal_button_release_event;
24325 ulong signal_connect(string name:"button-release-event", CB/*:signal_button_release_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24326 return signal_connect_data(&this, cast(char*)"button-release-event",
24327 cast(GObject2.Callback)cb, data, null, cf);
24330 // Gets emitted when the user brings up the context menu
24331 // of the status icon. Whether status icons can have context
24332 // menus and how these are activated is platform-dependent.
24333 // The @button and @activate_time parameters should be
24334 // passed as the last to arguments to gtk_menu_popup().
24335 // Unlike most G_SIGNAL_ACTION signals, this signal is meant to
24336 // be used by applications and should be wrapped by language bindings.
24337 // <button>: the button that was pressed, or 0 if the signal is not emitted in response to a button press event
24338 // <activate_time>: the timestamp of the event that triggered the signal emission
24339 extern (C) alias static void function (StatusIcon* this_, c_uint button, c_uint activate_time, void* user_data=null) signal_popup_menu;
24340 ulong signal_connect(string name:"popup-menu", CB/*:signal_popup_menu*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24341 return signal_connect_data(&this, cast(char*)"popup-menu",
24342 cast(GObject2.Callback)cb, data, null, cf);
24345 // Emitted when the #GtkSettings:gtk-tooltip-timeout has expired with the
24346 // cursor hovering above @status_icon; or emitted when @status_icon got
24347 // focus in keyboard mode.
24348 // Using the given coordinates, the signal handler should determine
24349 // whether a tooltip should be shown for @status_icon. If this is
24350 // the case %TRUE should be returned, %FALSE otherwise. Note that if
24351 // should not be used.
24352 // The signal handler is free to manipulate @tooltip with the therefore
24353 // destined function calls.
24354 // Whether this signal is emitted is platform-dependent.
24355 // For plain text tooltips, use #GtkStatusIcon:tooltip-text in preference.
24356 // RETURNS: %TRUE if @tooltip should be shown right now, %FALSE otherwise.
24357 // <x>: the x coordinate of the cursor position where the request has been emitted, relative to @status_icon
24358 // <y>: the y coordinate of the cursor position where the request has been emitted, relative to @status_icon
24359 // <keyboard_mode>: %TRUE if the tooltip was trigged using the keyboard
24360 // <tooltip>: a #GtkTooltip
24361 extern (C) alias static c_int function (StatusIcon* this_, int x, int y, c_int keyboard_mode, Tooltip* tooltip, void* user_data=null) signal_query_tooltip;
24362 ulong signal_connect(string name:"query-tooltip", CB/*:signal_query_tooltip*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24363 return signal_connect_data(&this, cast(char*)"query-tooltip",
24364 cast(GObject2.Callback)cb, data, null, cf);
24367 // The ::scroll-event signal is emitted when a button in the 4 to 7
24368 // range is pressed. Wheel mice are usually configured to generate
24369 // button press events for buttons 4 and 5 when the wheel is turned.
24370 // Whether this event is emitted is platform-dependent.
24371 // %FALSE to propagate the event further.
24372 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
24373 // <event>: the #GdkEventScroll which triggered this signal
24374 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) signal_scroll_event;
24375 ulong signal_connect(string name:"scroll-event", CB/*:signal_scroll_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24376 return signal_connect_data(&this, cast(char*)"scroll-event",
24377 cast(GObject2.Callback)cb, data, null, cf);
24380 // Gets emitted when the size available for the image
24381 // changes, e.g. because the notification area got resized.
24382 // size. Otherwise, GTK+ will scale the icon as necessary.
24383 // RETURNS: %TRUE if the icon was updated for the new
24384 // <size>: the new size
24385 extern (C) alias static c_int function (StatusIcon* this_, int size, void* user_data=null) signal_size_changed;
24386 ulong signal_connect(string name:"size-changed", CB/*:signal_size_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24387 return signal_connect_data(&this, cast(char*)"size-changed",
24388 cast(GObject2.Callback)cb, data, null, cf);
24392 struct StatusIconClass {
24393 GObject2.ObjectClass parent_class;
24394 extern (C) void function (StatusIcon* status_icon) activate;
24395 extern (C) void function (StatusIcon* status_icon, uint button, uint activate_time) popup_menu;
24396 extern (C) int function (StatusIcon* status_icon, int size) size_changed;
24397 extern (C) int function (StatusIcon* status_icon, Gdk2.EventButton* event) button_press_event;
24398 extern (C) int function (StatusIcon* status_icon, Gdk2.EventButton* event) button_release_event;
24399 extern (C) int function (StatusIcon* status_icon, Gdk2.EventScroll* event) scroll_event;
24400 extern (C) int function (StatusIcon* status_icon, int x, int y, int keyboard_mode, Tooltip* tooltip) query_tooltip;
24401 void* __gtk_reserved1, __gtk_reserved2;
24404 struct StatusIconPrivate {
24407 struct Statusbar /* : HBox */ {
24408 alias parent_widget this;
24409 alias parent_widget super_;
24410 alias parent_widget hbox;
24411 HBox parent_widget;
24412 Widget* frame, label;
24413 GLib2.SList* messages, keys;
24414 uint seq_context_id, seq_message_id;
24415 Gdk2.Window* grip_window;
24416 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24417 uint, "has_resize_grip", 1,
24418 uint, "__dummy32A", 31));
24421 // Creates a new #GtkStatusbar ready for messages.
24422 // RETURNS: the new #GtkStatusbar
24423 static Statusbar* new_() {
24424 return gtk_statusbar_new();
24427 // Returns a new context identifier, given a description
24428 // of the actual context. Note that the description is
24429 // <emphasis>not</emphasis> shown in the UI.
24430 // RETURNS: an integer id
24431 // <context_description>: textual description of what context the new message is being used in
24432 uint get_context_id(char* context_description) {
24433 return gtk_statusbar_get_context_id(&this, context_description);
24436 // Returns whether the statusbar has a resize grip.
24437 // RETURNS: %TRUE if the statusbar has a resize grip.
24438 int get_has_resize_grip() {
24439 return gtk_statusbar_get_has_resize_grip(&this);
24442 // Retrieves the box containing the label widget.
24443 // RETURNS: a #GtkBox
24444 Widget* get_message_area() {
24445 return gtk_statusbar_get_message_area(&this);
24448 // Removes the first message in the #GtkStatusBar's stack
24449 // with the given context id.
24450 // Note that this may not change the displayed message, if
24451 // the message at the top of the stack has a different
24452 // context id.
24453 // <context_id>: a context identifier
24454 void pop(uint context_id) {
24455 gtk_statusbar_pop(&this, context_id);
24458 // Pushes a new message onto a statusbar's stack.
24459 // gtk_statusbar_remove().
24460 // RETURNS: a message id that can be used with
24461 // <context_id>: the message's context id, as returned by gtk_statusbar_get_context_id()
24462 // <text>: the message to add to the statusbar
24463 uint push(uint context_id, char* text) {
24464 return gtk_statusbar_push(&this, context_id, text);
24467 // Forces the removal of a message from a statusbar's stack.
24468 // The exact @context_id and @message_id must be specified.
24469 // <context_id>: a context identifier
24470 // <message_id>: a message identifier, as returned by gtk_statusbar_push()
24471 void remove(uint context_id, uint message_id) {
24472 gtk_statusbar_remove(&this, context_id, message_id);
24475 // Forces the removal of all messages from a statusbar's
24476 // stack with the exact @context_id.
24477 // <context_id>: a context identifier
24478 void remove_all(uint context_id) {
24479 gtk_statusbar_remove_all(&this, context_id);
24482 // Sets whether the statusbar has a resize grip.
24483 // %TRUE by default.
24484 // <setting>: %TRUE to have a resize grip
24485 void set_has_resize_grip(int setting) {
24486 gtk_statusbar_set_has_resize_grip(&this, setting);
24489 // Is emitted whenever a new message is popped off a statusbar's stack.
24490 // <context_id>: the context id of the relevant message/statusbar.
24491 // <text>: the message that was just popped.
24492 extern (C) alias static void function (Statusbar* this_, c_uint context_id, char* text, void* user_data=null) signal_text_popped;
24494 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24495 return super_.signal_connect!name(cb, data, cf);
24498 ulong signal_connect(string name:"text-popped", CB/*:signal_text_popped*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24499 return signal_connect_data(&this, cast(char*)"text-popped",
24500 cast(GObject2.Callback)cb, data, null, cf);
24503 // Is emitted whenever a new message gets pushed onto a statusbar's stack.
24504 // <context_id>: the context id of the relevant message/statusbar.
24505 // <text>: the message that was pushed.
24506 extern (C) alias static void function (Statusbar* this_, c_uint context_id, char* text, void* user_data=null) signal_text_pushed;
24507 ulong signal_connect(string name:"text-pushed", CB/*:signal_text_pushed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24508 return signal_connect_data(&this, cast(char*)"text-pushed",
24509 cast(GObject2.Callback)cb, data, null, cf);
24513 struct StatusbarClass {
24514 HBoxClass parent_class;
24515 void* reserved;
24516 extern (C) void function (Statusbar* statusbar, uint context_id, char* text) text_pushed;
24517 extern (C) void function (Statusbar* statusbar, uint context_id, char* text) text_popped;
24518 extern (C) void function () _gtk_reserved1;
24519 extern (C) void function () _gtk_reserved2;
24520 extern (C) void function () _gtk_reserved3;
24521 extern (C) void function () _gtk_reserved4;
24524 struct StockItem {
24525 char* stock_id, label;
24526 Gdk2.ModifierType modifier;
24527 uint keyval;
24528 char* translation_domain;
24531 // Unintrospectable method: copy() / gtk_stock_item_copy()
24532 // Copies a stock item, mostly useful for language bindings and not in applications.
24533 // RETURNS: a new #GtkStockItem
24534 StockItem* copy() {
24535 return gtk_stock_item_copy(&this);
24538 // Frees a stock item allocated on the heap, such as one returned by
24539 // gtk_stock_item_copy(). Also frees the fields inside the stock item,
24540 // if they are not %NULL.
24541 void free() {
24542 gtk_stock_item_free(&this);
24546 struct Style /* : GObject.Object */ {
24547 alias parent_instance this;
24548 alias parent_instance super_;
24549 alias parent_instance object;
24550 GObject2.Object parent_instance;
24551 Gdk2.Color[5] fg, bg, light, dark, mid, text, base, text_aa;
24552 Gdk2.Color black, white;
24553 Pango.FontDescription* font_desc;
24554 int xthickness, ythickness;
24555 Gdk2.GC*[5] fg_gc, bg_gc, light_gc, dark_gc, mid_gc, text_gc, base_gc, text_aa_gc;
24556 Gdk2.GC* black_gc, white_gc;
24557 Gdk2.Pixmap*[5] bg_pixmap;
24558 private int attach_count, depth;
24559 private Gdk2.Colormap* colormap;
24560 private Gdk2.Font* private_font;
24561 private Pango.FontDescription* private_font_desc;
24562 private RcStyle* rc_style;
24563 private GLib2.SList* styles;
24564 private void*[0] property_cache;
24565 private GLib2.SList* icon_factories;
24568 // Creates a new #GtkStyle.
24569 // RETURNS: a new #GtkStyle.
24570 static Style* /*new*/ new_() {
24571 return gtk_style_new();
24573 void apply_default_background(Gdk2.Window* window, int set_bg, StateType state_type, Gdk2.Rectangle* area, int x, int y, int width, int height) {
24574 gtk_style_apply_default_background(&this, window, set_bg, state_type, area, x, y, width, height);
24577 // Unintrospectable method: attach() / gtk_style_attach()
24578 // Attaches a style to a window; this process allocates the
24579 // colors and creates the GC's for the style - it specializes
24580 // it to a particular visual and colormap. The process may
24581 // involve the creation of a new style if the style has already
24582 // been attached to a window with a different style and colormap.
24583 // Since this function may return a new object, you have to use it
24584 // in the following way:
24585 // <literal>style = gtk_style_attach (style, window)</literal>
24586 // If the style is newly created, the style parameter
24587 // will be unref'ed, and the new style will have
24588 // a reference count belonging to the caller.
24589 // RETURNS: Either @style, or a newly-created #GtkStyle.
24590 // <window>: a #GdkWindow.
24591 Style* attach(Gdk2.Window* window) {
24592 return gtk_style_attach(&this, window);
24595 // Creates a copy of the passed in #GtkStyle object.
24596 // RETURNS: a copy of @style
24597 Style* /*new*/ copy() {
24598 return gtk_style_copy(&this);
24601 // Detaches a style from a window. If the style is not attached
24602 // to any windows anymore, it is unrealized. See gtk_style_attach().
24603 void detach() {
24604 gtk_style_detach(&this);
24607 // Unintrospectable method: get() / gtk_style_get()
24608 // Gets the values of a multiple style properties for @widget_type
24609 // from @style.
24610 // <widget_type>: the #GType of a descendant of #GtkWidget
24611 // <first_property_name>: the name of the first style property to get
24612 /+ Not available -- variadic methods unsupported - use the C function directly.
24613 alias gtk_style_get get; // Variadic
24616 // Gets the #GdkFont to use for the given style. This is
24617 // meant only as a replacement for direct access to @style->font
24618 // and should not be used in new code. New code should
24619 // use @style->font_desc instead.
24620 // by the style; if you want to keep around a copy, you must
24621 // call gdk_font_ref().
24622 // RETURNS: the #GdkFont for the style. This font is owned
24623 Gdk2.Font* /*new*/ get_font() {
24624 return gtk_style_get_font(&this);
24627 // Queries the value of a style property corresponding to a
24628 // widget class is in the given style.
24629 // <widget_type>: the #GType of a descendant of #GtkWidget
24630 // <property_name>: the name of the style property to get
24631 // <value>: a #GValue where the value of the property being queried will be stored
24632 void get_style_property(Type widget_type, char* property_name, GObject2.Value* value) {
24633 gtk_style_get_style_property(&this, widget_type, property_name, value);
24636 // Unintrospectable method: get_valist() / gtk_style_get_valist()
24637 // Non-vararg variant of gtk_style_get().
24638 // Used primarily by language bindings.
24639 // <widget_type>: the #GType of a descendant of #GtkWidget
24640 // <first_property_name>: the name of the first style property to get
24641 // <var_args>: a <type>va_list</type> of pairs of property names and locations to return the property values, starting with the location for @first_property_name.
24642 void get_valist(Type widget_type, char* first_property_name, va_list var_args) {
24643 gtk_style_get_valist(&this, widget_type, first_property_name, var_args);
24646 // Looks up @color_name in the style's logical color mappings,
24647 // filling in @color and returning %TRUE if found, otherwise
24648 // returning %FALSE. Do not cache the found mapping, because
24649 // it depends on the #GtkStyle and might change when a theme
24650 // switch occurs.
24651 // RETURNS: %TRUE if the mapping was found.
24652 // <color_name>: the name of the logical color to look up
24653 // <color>: the #GdkColor to fill in
24654 int lookup_color(char* color_name, /*out*/ Gdk2.Color* color) {
24655 return gtk_style_lookup_color(&this, color_name, color);
24658 // Looks up @stock_id in the icon factories associated with @style
24659 // and the default icon factory, returning an icon set if found,
24660 // otherwise %NULL.
24661 // RETURNS: icon set of @stock_id
24662 // <stock_id>: an icon name
24663 IconSet* lookup_icon_set(char* stock_id) {
24664 return gtk_style_lookup_icon_set(&this, stock_id);
24667 // Unintrospectable method: ref() / gtk_style_ref()
24668 // Increase the reference count of @style.
24669 // RETURNS: @style.
24670 Style* ref_() {
24671 return gtk_style_ref(&this);
24674 // Renders the icon specified by @source at the given @size
24675 // according to the given parameters and returns the result in a
24676 // pixbuf.
24677 // containing the rendered icon
24678 // RETURNS: a newly-created #GdkPixbuf
24679 // <source>: the #GtkIconSource specifying the icon to render
24680 // <direction>: a text direction
24681 // <state>: a state
24682 // <size>: (type int) the size to render the icon at. A size of (GtkIconSize)-1 means render at the size of the source and don't scale.
24683 // <widget>: the widget
24684 // <detail>: a style detail
24685 GdkPixbuf2.Pixbuf* /*new*/ render_icon(IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) {
24686 return gtk_style_render_icon(&this, source, direction, state, size, widget, detail);
24689 // Sets the background of @window to the background color or pixmap
24690 // specified by @style for the given state.
24691 // <window>: a #GdkWindow
24692 // <state_type>: a state
24693 void set_background(Gdk2.Window* window, StateType state_type) {
24694 gtk_style_set_background(&this, window, state_type);
24697 // Sets the #GdkFont to use for a given style. This is
24698 // meant only as a replacement for direct access to style->font
24699 // and should not be used in new code. New code should
24700 // use style->font_desc instead.
24701 // <font>: a #GdkFont, or %NULL to use the #GdkFont corresponding to style->font_desc.
24702 void set_font(Gdk2.Font* font=null) {
24703 gtk_style_set_font(&this, font);
24705 // Decrease the reference count of @style.
24706 void unref() {
24707 gtk_style_unref(&this);
24710 // Emitted when the style has been initialized for a particular
24711 // colormap and depth. Connecting to this signal is probably seldom
24712 // useful since most of the time applications and widgets only
24713 // deal with styles that have been already realized.
24714 extern (C) alias static void function (Style* this_, void* user_data=null) signal_realize;
24716 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24717 return super_.signal_connect!name(cb, data, cf);
24720 ulong signal_connect(string name:"realize", CB/*:signal_realize*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24721 return signal_connect_data(&this, cast(char*)"realize",
24722 cast(GObject2.Callback)cb, data, null, cf);
24725 // Emitted when the aspects of the style specific to a particular colormap
24726 // and depth are being cleaned up. A connection to this signal can be useful
24727 // if a widget wants to cache objects like a #GdkGC as object data on #GtkStyle.
24728 // This signal provides a convenient place to free such cached objects.
24729 extern (C) alias static void function (Style* this_, void* user_data=null) signal_unrealize;
24730 ulong signal_connect(string name:"unrealize", CB/*:signal_unrealize*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24731 return signal_connect_data(&this, cast(char*)"unrealize",
24732 cast(GObject2.Callback)cb, data, null, cf);
24736 struct StyleClass {
24737 GObject2.ObjectClass parent_class;
24738 extern (C) void function (Style* style) realize;
24739 extern (C) void function (Style* style) unrealize;
24740 extern (C) void function (Style* style, Style* src) copy;
24741 // Unintrospectable functionp: clone() / ()
24742 extern (C) Style* function (Style* style) clone;
24743 extern (C) void function (Style* style, RcStyle* rc_style) init_from_rc;
24745 // <window>: a #GdkWindow
24746 // <state_type>: a state
24747 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type) set_background;
24749 // RETURNS: a newly-created #GdkPixbuf
24750 // <source>: the #GtkIconSource specifying the icon to render
24751 // <direction>: a text direction
24752 // <state>: a state
24753 // <size>: (type int) the size to render the icon at. A size of (GtkIconSize)-1 means render at the size of the source and don't scale.
24754 // <widget>: the widget
24755 // <detail>: a style detail
24756 extern (C) GdkPixbuf2.Pixbuf* /*new*/ function (Style* style, IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) render_icon;
24757 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x1, int x2, int y) draw_hline;
24758 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int y1_, int y2_, int x) draw_vline;
24759 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_shadow;
24760 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.Point* point, int npoints, int fill) draw_polygon;
24761 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, ArrowType arrow_type, int fill, int x, int y, int width, int height) draw_arrow;
24762 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_diamond;
24763 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, char* string_) draw_string;
24764 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_box;
24765 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_flat_box;
24766 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_check;
24767 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_option;
24768 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_tab;
24769 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) draw_shadow_gap;
24770 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) draw_box_gap;
24771 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side) draw_extension;
24772 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_focus;
24773 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) draw_slider;
24774 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) draw_handle;
24775 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, ExpanderStyle expander_style) draw_expander;
24776 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, int use_text, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, Pango.Layout* layout) draw_layout;
24777 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.WindowEdge edge, int x, int y, int width, int height) draw_resize_grip;
24778 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, uint step, int x, int y, int width, int height) draw_spinner;
24779 extern (C) void function () _gtk_reserved1;
24780 extern (C) void function () _gtk_reserved2;
24781 extern (C) void function () _gtk_reserved3;
24782 extern (C) void function () _gtk_reserved4;
24783 extern (C) void function () _gtk_reserved5;
24784 extern (C) void function () _gtk_reserved6;
24785 extern (C) void function () _gtk_reserved7;
24786 extern (C) void function () _gtk_reserved8;
24787 extern (C) void function () _gtk_reserved9;
24788 extern (C) void function () _gtk_reserved10;
24789 extern (C) void function () _gtk_reserved11;
24792 enum SubmenuDirection {
24793 LEFT = 0,
24794 RIGHT = 1
24796 enum SubmenuPlacement {
24797 TOP_BOTTOM = 0,
24798 LEFT_RIGHT = 1
24800 enum int TEXT_VIEW_PRIORITY_VALIDATE = 5;
24801 enum int TYPE_FUNDAMENTAL_LAST = -1;
24802 struct Table /* : Container */ {
24803 alias container this;
24804 alias container super_;
24805 Container container;
24806 GLib2.List* children;
24807 TableRowCol* rows, cols;
24808 ushort nrows, ncols, column_spacing, row_spacing;
24809 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24810 uint, "homogeneous", 1,
24811 uint, "__dummy32A", 31));
24813 static Table* new_(uint rows, uint columns, int homogeneous) {
24814 return gtk_table_new(rows, columns, homogeneous);
24816 void attach(Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach, AttachOptions xoptions, AttachOptions yoptions, uint xpadding, uint ypadding) {
24817 gtk_table_attach(&this, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding);
24819 void attach_defaults(Widget* widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) {
24820 gtk_table_attach_defaults(&this, widget, left_attach, right_attach, top_attach, bottom_attach);
24823 // Gets the amount of space between column @col, and
24824 // column @col + 1. See gtk_table_set_col_spacing().
24825 // RETURNS: the column spacing
24826 // <column>: a column in the table, 0 indicates the first column
24827 uint get_col_spacing(uint column) {
24828 return gtk_table_get_col_spacing(&this, column);
24831 // Gets the default column spacing for the table. This is
24832 // the spacing that will be used for newly added columns.
24833 // (See gtk_table_set_col_spacings())
24834 // RETURNS: the default column spacing
24835 uint get_default_col_spacing() {
24836 return gtk_table_get_default_col_spacing(&this);
24839 // Gets the default row spacing for the table. This is
24840 // the spacing that will be used for newly added rows.
24841 // (See gtk_table_set_row_spacings())
24842 // RETURNS: the default row spacing
24843 uint get_default_row_spacing() {
24844 return gtk_table_get_default_row_spacing(&this);
24847 // Returns whether the table cells are all constrained to the same
24848 // width and height. (See gtk_table_set_homogenous ())
24849 // RETURNS: %TRUE if the cells are all constrained to the same size
24850 int get_homogeneous() {
24851 return gtk_table_get_homogeneous(&this);
24854 // Gets the amount of space between row @row, and
24855 // row @row + 1. See gtk_table_set_row_spacing().
24856 // RETURNS: the row spacing
24857 // <row>: a row in the table, 0 indicates the first row
24858 uint get_row_spacing(uint row) {
24859 return gtk_table_get_row_spacing(&this, row);
24862 // Returns the number of rows and columns in the table.
24863 // <rows>: return location for the number of rows, or %NULL
24864 // <columns>: return location for the number of columns, or %NULL
24865 void get_size(/*out*/ uint* rows=null, /*out*/ uint* columns=null) {
24866 gtk_table_get_size(&this, rows, columns);
24868 void resize(uint rows, uint columns) {
24869 gtk_table_resize(&this, rows, columns);
24871 void set_col_spacing(uint column, uint spacing) {
24872 gtk_table_set_col_spacing(&this, column, spacing);
24874 void set_col_spacings(uint spacing) {
24875 gtk_table_set_col_spacings(&this, spacing);
24877 void set_homogeneous(int homogeneous) {
24878 gtk_table_set_homogeneous(&this, homogeneous);
24880 void set_row_spacing(uint row, uint spacing) {
24881 gtk_table_set_row_spacing(&this, row, spacing);
24883 void set_row_spacings(uint spacing) {
24884 gtk_table_set_row_spacings(&this, spacing);
24888 struct TableChild {
24889 Widget* widget;
24890 ushort left_attach, right_attach, top_attach, bottom_attach, xpadding, ypadding;
24891 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24892 uint, "xexpand", 1,
24893 uint, "yexpand", 1,
24894 uint, "xshrink", 1,
24895 uint, "yshrink", 1,
24896 uint, "xfill", 1,
24897 uint, "yfill", 1,
24898 uint, "__dummy32A", 26));
24901 struct TableClass {
24902 ContainerClass parent_class;
24905 struct TableRowCol {
24906 ushort requisition, allocation, spacing;
24907 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24908 uint, "need_expand", 1,
24909 uint, "need_shrink", 1,
24910 uint, "expand", 1,
24911 uint, "shrink", 1,
24912 uint, "empty", 1,
24913 uint, "__dummy32A", 27));
24916 struct TargetEntry {
24917 char* target;
24918 uint flags, info;
24921 enum TargetFlags {
24922 SAME_APP = 1,
24923 SAME_WIDGET = 2,
24924 OTHER_APP = 4,
24925 OTHER_WIDGET = 8
24927 struct TargetList {
24928 GLib2.List* list;
24929 uint ref_count;
24932 // Creates a new #GtkTargetList from an array of #GtkTargetEntry.
24933 // RETURNS: the new #GtkTargetList.
24934 // <targets>: Pointer to an array of #GtkTargetEntry
24935 // <ntargets>: number of entries in @targets.
24936 static TargetList* /*new*/ new_(TargetEntry* targets, uint ntargets) {
24937 return gtk_target_list_new(targets, ntargets);
24940 // Appends another target to a #GtkTargetList.
24941 // <target>: the interned atom representing the target
24942 // <flags>: the flags for this target
24943 // <info>: an ID that will be passed back to the application
24944 void add(Gdk2.Atom target, uint flags, uint info) {
24945 gtk_target_list_add(&this, target, flags, info);
24948 // Appends the image targets supported by #GtkSelection to
24949 // the target list. All targets are added with the same @info.
24950 // <info>: an ID that will be passed back to the application
24951 // <writable>: whether to add only targets for which GTK+ knows how to convert a pixbuf into the format
24952 void add_image_targets(uint info, int writable) {
24953 gtk_target_list_add_image_targets(&this, info, writable);
24956 // Appends the rich text targets registered with
24957 // gtk_text_buffer_register_serialize_format() or
24958 // gtk_text_buffer_register_deserialize_format() to the target list. All
24959 // targets are added with the same @info.
24960 // <info>: an ID that will be passed back to the application
24961 // <deserializable>: if %TRUE, then deserializable rich text formats will be added, serializable formats otherwise.
24962 // <buffer>: a #GtkTextBuffer.
24963 void add_rich_text_targets(uint info, int deserializable, TextBuffer* buffer) {
24964 gtk_target_list_add_rich_text_targets(&this, info, deserializable, buffer);
24967 // Prepends a table of #GtkTargetEntry to a target list.
24968 // <targets>: the table of #GtkTargetEntry
24969 // <ntargets>: number of targets in the table
24970 void add_table(TargetEntry* targets, uint ntargets) {
24971 gtk_target_list_add_table(&this, targets, ntargets);
24974 // Appends the text targets supported by #GtkSelection to
24975 // the target list. All targets are added with the same @info.
24976 // <info>: an ID that will be passed back to the application
24977 void add_text_targets(uint info) {
24978 gtk_target_list_add_text_targets(&this, info);
24981 // Appends the URI targets supported by #GtkSelection to
24982 // the target list. All targets are added with the same @info.
24983 // <info>: an ID that will be passed back to the application
24984 void add_uri_targets(uint info) {
24985 gtk_target_list_add_uri_targets(&this, info);
24988 // Looks up a given target in a #GtkTargetList.
24989 // RETURNS: %TRUE if the target was found, otherwise %FALSE
24990 // <target>: an interned atom representing the target to search for
24991 // <info>: a pointer to the location to store application info for target, or %NULL
24992 int find(Gdk2.Atom target, uint* info) {
24993 return gtk_target_list_find(&this, target, info);
24996 // Increases the reference count of a #GtkTargetList by one.
24997 // RETURNS: the passed in #GtkTargetList.
24998 TargetList* /*new*/ ref_() {
24999 return gtk_target_list_ref(&this);
25002 // Removes a target from a target list.
25003 // <target>: the interned atom representing the target
25004 void remove(Gdk2.Atom target) {
25005 gtk_target_list_remove(&this, target);
25008 // Decreases the reference count of a #GtkTargetList by one.
25009 // If the resulting reference count is zero, frees the list.
25010 void unref() {
25011 gtk_target_list_unref(&this);
25015 struct TargetPair {
25016 Gdk2.Atom target;
25017 uint flags, info;
25020 struct TearoffMenuItem /* : MenuItem */ {
25021 alias menu_item this;
25022 alias menu_item super_;
25023 alias menu_item menuitem;
25024 MenuItem menu_item;
25025 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
25026 uint, "torn_off", 1,
25027 uint, "__dummy32A", 31));
25029 static TearoffMenuItem* new_() {
25030 return gtk_tearoff_menu_item_new();
25034 struct TearoffMenuItemClass {
25035 MenuItemClass parent_class;
25036 extern (C) void function () _gtk_reserved1;
25037 extern (C) void function () _gtk_reserved2;
25038 extern (C) void function () _gtk_reserved3;
25039 extern (C) void function () _gtk_reserved4;
25042 struct TextAppearance {
25043 Gdk2.Color bg_color, fg_color;
25044 Gdk2.Bitmap* bg_stipple, fg_stipple;
25045 int rise;
25046 private void* padding1;
25047 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
25048 uint, "underline", 4,
25049 uint, "strikethrough", 1,
25050 uint, "draw_bg", 1,
25051 uint, "inside_selection", 1,
25052 uint, "is_text", 1,
25053 uint, "pad1", 1,
25054 uint, "pad2", 1,
25055 uint, "pad3", 1,
25056 uint, "pad4", 1,
25057 uint, "__dummy32A", 20));
25060 struct TextAttrAppearance {
25061 Pango.Attribute attr;
25062 TextAppearance appearance;
25065 struct TextAttributes {
25066 private uint refcount;
25067 TextAppearance appearance;
25068 Justification justification;
25069 TextDirection direction;
25070 Pango.FontDescription* font;
25071 double font_scale;
25072 int left_margin, indent, right_margin, pixels_above_lines, pixels_below_lines, pixels_inside_wrap;
25073 Pango.TabArray* tabs;
25074 WrapMode wrap_mode;
25075 Pango.Language* language;
25076 private Gdk2.Color* pg_bg_color;
25077 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
25078 uint, "invisible", 1,
25079 uint, "bg_full_height", 1,
25080 uint, "editable", 1,
25081 uint, "realized", 1,
25082 uint, "pad1", 1,
25083 uint, "pad2", 1,
25084 uint, "pad3", 1,
25085 uint, "pad4", 1,
25086 uint, "__dummy32A", 24));
25089 // Creates a #GtkTextAttributes, which describes
25090 // a set of properties on some text.
25091 // RETURNS: a new #GtkTextAttributes
25092 static TextAttributes* /*new*/ new_() {
25093 return gtk_text_attributes_new();
25096 // Copies @src and returns a new #GtkTextAttributes.
25097 // RETURNS: a copy of @src
25098 TextAttributes* /*new*/ copy() {
25099 return gtk_text_attributes_copy(&this);
25102 // Copies the values from @src to @dest so that @dest has the same values
25103 // as @src. Frees existing values in @dest.
25104 // <dest>: another #GtkTextAttributes
25105 void copy_values(TextAttributes* dest) {
25106 gtk_text_attributes_copy_values(&this, dest);
25109 // Increments the reference count on @values.
25110 // RETURNS: the #GtkTextAttributes that were passed in
25111 TextAttributes* /*new*/ ref_() {
25112 return gtk_text_attributes_ref(&this);
25115 // Decrements the reference count on @values, freeing the structure
25116 // if the reference count reaches 0.
25117 void unref() {
25118 gtk_text_attributes_unref(&this);
25122 struct TextBTree {
25125 struct TextBuffer /* : GObject.Object */ {
25126 alias parent_instance this;
25127 alias parent_instance super_;
25128 alias parent_instance object;
25129 GObject2.Object parent_instance;
25130 TextTagTable* tag_table;
25131 TextBTree* btree;
25132 GLib2.SList* clipboard_contents_buffers, selection_clipboards;
25133 TextLogAttrCache* log_attr_cache;
25134 uint user_action_count;
25135 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
25136 uint, "modified", 1,
25137 uint, "has_selection", 1,
25138 uint, "__dummy32A", 30));
25141 // Creates a new text buffer.
25142 // RETURNS: a new text buffer
25143 // <table>: a tag table, or %NULL to create a new one
25144 static TextBuffer* /*new*/ new_(TextTagTable* table=null) {
25145 return gtk_text_buffer_new(table);
25148 // Adds the mark at position @where. The mark must not be added to
25149 // another buffer, and if its name is not %NULL then there must not
25150 // be another mark in the buffer with the same name.
25151 // Emits the "mark-set" signal as notification of the mark's initial
25152 // placement.
25153 // <mark>: the mark to add
25154 // <where>: location to place mark
25155 void add_mark(TextMark* mark, TextIter* where) {
25156 gtk_text_buffer_add_mark(&this, mark, where);
25159 // Adds @clipboard to the list of clipboards in which the selection
25160 // contents of @buffer are available. In most cases, @clipboard will be
25161 // the #GtkClipboard of type %GDK_SELECTION_PRIMARY for a view of @buffer.
25162 // <clipboard>: a #GtkClipboard
25163 void add_selection_clipboard(Clipboard* clipboard) {
25164 gtk_text_buffer_add_selection_clipboard(&this, clipboard);
25167 // Emits the "apply-tag" signal on @buffer. The default
25168 // handler for the signal applies @tag to the given range.
25169 // <tag>: a #GtkTextTag
25170 // <start>: one bound of range to be tagged
25171 // <end>: other bound of range to be tagged
25172 void apply_tag(TextTag* tag, TextIter* start, TextIter* end) {
25173 gtk_text_buffer_apply_tag(&this, tag, start, end);
25176 // Calls gtk_text_tag_table_lookup() on the buffer's tag table to
25177 // get a #GtkTextTag, then calls gtk_text_buffer_apply_tag().
25178 // <name>: name of a named #GtkTextTag
25179 // <start>: one bound of range to be tagged
25180 // <end>: other bound of range to be tagged
25181 void apply_tag_by_name(char* name, TextIter* start, TextIter* end) {
25182 gtk_text_buffer_apply_tag_by_name(&this, name, start, end);
25185 // Performs the appropriate action as if the user hit the delete
25186 // key with the cursor at the position specified by @iter. In the
25187 // normal case a single character will be deleted, but when
25188 // combining accents are involved, more than one character can
25189 // be deleted, and when precomposed character and accent combinations
25190 // are involved, less than one character will be deleted.
25191 // Because the buffer is modified, all outstanding iterators become
25192 // invalid after calling this function; however, the @iter will be
25193 // re-initialized to point to the location where text was deleted.
25194 // RETURNS: %TRUE if the buffer was modified
25195 // <iter>: a position in @buffer
25196 // <interactive>: whether the deletion is caused by user interaction
25197 // <default_editable>: whether the buffer is editable by default
25198 int backspace(TextIter* iter, int interactive, int default_editable) {
25199 return gtk_text_buffer_backspace(&this, iter, interactive, default_editable);
25202 // Called to indicate that the buffer operations between here and a
25203 // call to gtk_text_buffer_end_user_action() are part of a single
25204 // user-visible operation. The operations between
25205 // gtk_text_buffer_begin_user_action() and
25206 // gtk_text_buffer_end_user_action() can then be grouped when creating
25207 // an undo stack. #GtkTextBuffer maintains a count of calls to
25208 // gtk_text_buffer_begin_user_action() that have not been closed with
25209 // a call to gtk_text_buffer_end_user_action(), and emits the
25210 // "begin-user-action" and "end-user-action" signals only for the
25211 // outermost pair of calls. This allows you to build user actions
25212 // from other user actions.
25213 // The "interactive" buffer mutation functions, such as
25214 // gtk_text_buffer_insert_interactive(), automatically call begin/end
25215 // user action around the buffer operations they perform, so there's
25216 // no need to add extra calls if you user action consists solely of a
25217 // single call to one of those functions.
25218 void begin_user_action() {
25219 gtk_text_buffer_begin_user_action(&this);
25222 // Copies the currently-selected text to a clipboard.
25223 // <clipboard>: the #GtkClipboard object to copy to
25224 void copy_clipboard(Clipboard* clipboard) {
25225 gtk_text_buffer_copy_clipboard(&this, clipboard);
25228 // This is a convenience function which simply creates a child anchor
25229 // with gtk_text_child_anchor_new() and inserts it into the buffer
25230 // with gtk_text_buffer_insert_child_anchor(). The new anchor is
25231 // owned by the buffer; no reference count is returned to
25232 // the caller of gtk_text_buffer_create_child_anchor().
25233 // RETURNS: the created child anchor
25234 // <iter>: location in the buffer
25235 TextChildAnchor* create_child_anchor(TextIter* iter) {
25236 return gtk_text_buffer_create_child_anchor(&this, iter);
25239 // Creates a mark at position @where. If @mark_name is %NULL, the mark
25240 // is anonymous; otherwise, the mark can be retrieved by name using
25241 // gtk_text_buffer_get_mark(). If a mark has left gravity, and text is
25242 // inserted at the mark's current location, the mark will be moved to
25243 // the left of the newly-inserted text. If the mark has right gravity
25244 // (@left_gravity = %FALSE), the mark will end up on the right of
25245 // newly-inserted text. The standard left-to-right cursor is a mark
25246 // with right gravity (when you type, the cursor stays on the right
25247 // side of the text you're typing).
25248 // The caller of this function does <emphasis>not</emphasis> own a
25249 // reference to the returned #GtkTextMark, so you can ignore the
25250 // return value if you like. Marks are owned by the buffer and go
25251 // away when the buffer does.
25252 // Emits the "mark-set" signal as notification of the mark's initial
25253 // placement.
25254 // RETURNS: the new #GtkTextMark object
25255 // <mark_name>: name for mark, or %NULL
25256 // <where>: location to place mark
25257 // <left_gravity>: whether the mark has left gravity
25258 TextMark* create_mark(char* mark_name, TextIter* where, int left_gravity) {
25259 return gtk_text_buffer_create_mark(&this, mark_name, where, left_gravity);
25262 // Unintrospectable method: create_tag() / gtk_text_buffer_create_tag()
25263 // Creates a tag and adds it to the tag table for @buffer.
25264 // Equivalent to calling gtk_text_tag_new() and then adding the
25265 // tag to the buffer's tag table. The returned tag is owned by
25266 // the buffer's tag table, so the ref count will be equal to one.
25267 // If @tag_name is %NULL, the tag is anonymous.
25268 // If @tag_name is non-%NULL, a tag called @tag_name must not already
25269 // exist in the tag table for this buffer.
25270 // The @first_property_name argument and subsequent arguments are a list
25271 // of properties to set on the tag, as with g_object_set().
25272 // RETURNS: a new tag
25273 // <tag_name>: name of the new tag, or %NULL
25274 // <first_property_name>: name of first property to set, or %NULL
25275 /+ Not available -- variadic methods unsupported - use the C function directly.
25276 alias gtk_text_buffer_create_tag create_tag; // Variadic
25279 // Copies the currently-selected text to a clipboard, then deletes
25280 // said text if it's editable.
25281 // <clipboard>: the #GtkClipboard object to cut to
25282 // <default_editable>: default editability of the buffer
25283 void cut_clipboard(Clipboard* clipboard, int default_editable) {
25284 gtk_text_buffer_cut_clipboard(&this, clipboard, default_editable);
25287 // Deletes text between @start and @end. The order of @start and @end
25288 // is not actually relevant; gtk_text_buffer_delete() will reorder
25289 // them. This function actually emits the "delete-range" signal, and
25290 // the default handler of that signal deletes the text. Because the
25291 // buffer is modified, all outstanding iterators become invalid after
25292 // calling this function; however, the @start and @end will be
25293 // re-initialized to point to the location where text was deleted.
25294 // <start>: a position in @buffer
25295 // <end>: another position in @buffer
25296 void delete_(TextIter* start, TextIter* end) {
25297 gtk_text_buffer_delete(&this, start, end);
25300 // Deletes all <emphasis>editable</emphasis> text in the given range.
25301 // Calls gtk_text_buffer_delete() for each editable sub-range of
25302 // [@start,@end). @start and @end are revalidated to point to
25303 // the location of the last deleted range, or left untouched if
25304 // no text was deleted.
25305 // RETURNS: whether some text was actually deleted
25306 // <start_iter>: start of range to delete
25307 // <end_iter>: end of range
25308 // <default_editable>: whether the buffer is editable by default
25309 int delete_interactive(TextIter* start_iter, TextIter* end_iter, int default_editable) {
25310 return gtk_text_buffer_delete_interactive(&this, start_iter, end_iter, default_editable);
25313 // Deletes @mark, so that it's no longer located anywhere in the
25314 // buffer. Removes the reference the buffer holds to the mark, so if
25315 // you haven't called g_object_ref() on the mark, it will be freed. Even
25316 // if the mark isn't freed, most operations on @mark become
25317 // invalid, until it gets added to a buffer again with
25318 // gtk_text_buffer_add_mark(). Use gtk_text_mark_get_deleted() to
25319 // find out if a mark has been removed from its buffer.
25320 // The "mark-deleted" signal will be emitted as notification after
25321 // the mark is deleted.
25322 // <mark>: a #GtkTextMark in @buffer
25323 void delete_mark(TextMark* mark) {
25324 gtk_text_buffer_delete_mark(&this, mark);
25327 // Deletes the mark named @name; the mark must exist. See
25328 // gtk_text_buffer_delete_mark() for details.
25329 // <name>: name of a mark in @buffer
25330 void delete_mark_by_name(char* name) {
25331 gtk_text_buffer_delete_mark_by_name(&this, name);
25334 // Deletes the range between the "insert" and "selection_bound" marks,
25335 // that is, the currently-selected text. If @interactive is %TRUE,
25336 // the editability of the selection will be considered (users can't delete
25337 // uneditable text).
25338 // RETURNS: whether there was a non-empty selection to delete
25339 // <interactive>: whether the deletion is caused by user interaction
25340 // <default_editable>: whether the buffer is editable by default
25341 int delete_selection(int interactive, int default_editable) {
25342 return gtk_text_buffer_delete_selection(&this, interactive, default_editable);
25345 // This function deserializes rich text in format @format and inserts
25346 // it at @iter.
25347 // gtk_text_buffer_register_deserialize_format() or
25348 // gtk_text_buffer_register_deserialize_tagset() beforehand.
25349 // RETURNS: %TRUE on success, %FALSE otherwise.
25350 // <content_buffer>: the #GtkTextBuffer to deserialize into
25351 // <format>: the rich text format to use for deserializing
25352 // <iter>: insertion point for the deserialized text
25353 // <data>: data to deserialize
25354 // <length>: length of @data
25355 int deserialize(TextBuffer* content_buffer, Gdk2.Atom format, TextIter* iter, ubyte* data, size_t length, GLib2.Error** error=null) {
25356 return gtk_text_buffer_deserialize(&this, content_buffer, format, iter, data, length, error);
25359 // This functions returns the value set with
25360 // gtk_text_buffer_deserialize_set_can_create_tags()
25361 // RETURNS: whether deserializing this format may create tags
25362 // <format>: a #GdkAtom representing a registered rich text format
25363 int deserialize_get_can_create_tags(Gdk2.Atom format) {
25364 return gtk_text_buffer_deserialize_get_can_create_tags(&this, format);
25367 // Use this function to allow a rich text deserialization function to
25368 // create new tags in the receiving buffer. Note that using this
25369 // function is almost always a bad idea, because the rich text
25370 // functions you register should know how to map the rich text format
25371 // they handler to your text buffers set of tags.
25372 // The ability of creating new (arbitrary!) tags in the receiving buffer
25373 // is meant for special rich text formats like the internal one that
25374 // is registered using gtk_text_buffer_register_deserialize_tagset(),
25375 // because that format is essentially a dump of the internal structure
25376 // of the source buffer, including its tag names.
25377 // You should allow creation of tags only if you know what you are
25378 // doing, e.g. if you defined a tagset name for your application
25379 // suite's text buffers and you know that it's fine to receive new
25380 // tags from these buffers, because you know that your application can
25381 // handle the newly created tags.
25382 // <format>: a #GdkAtom representing a registered rich text format
25383 // <can_create_tags>: whether deserializing this format may create tags
25384 void deserialize_set_can_create_tags(Gdk2.Atom format, int can_create_tags) {
25385 gtk_text_buffer_deserialize_set_can_create_tags(&this, format, can_create_tags);
25388 // Should be paired with a call to gtk_text_buffer_begin_user_action().
25389 // See that function for a full explanation.
25390 void end_user_action() {
25391 gtk_text_buffer_end_user_action(&this);
25394 // Retrieves the first and last iterators in the buffer, i.e. the
25395 // entire buffer lies within the range [@start,@end).
25396 // <start>: iterator to initialize with first position in the buffer
25397 // <end>: iterator to initialize with the end iterator
25398 void get_bounds(/*out*/ TextIter* start, /*out*/ TextIter* end) {
25399 gtk_text_buffer_get_bounds(&this, start, end);
25402 // Gets the number of characters in the buffer; note that characters
25403 // and bytes are not the same, you can't e.g. expect the contents of
25404 // the buffer in string form to be this many bytes long. The character
25405 // count is cached, so this function is very fast.
25406 // RETURNS: number of characters in the buffer
25407 int get_char_count() {
25408 return gtk_text_buffer_get_char_count(&this);
25411 // This function returns the list of targets this text buffer can
25412 // provide for copying and as DND source. The targets in the list are
25413 // added with %info values from the #GtkTextBufferTargetInfo enum,
25414 // using gtk_target_list_add_rich_text_targets() and
25415 // gtk_target_list_add_text_targets().
25416 // RETURNS: the #GtkTargetList
25417 TargetList* get_copy_target_list() {
25418 return gtk_text_buffer_get_copy_target_list(&this);
25421 // This function returns the rich text deserialize formats registered
25422 // with @buffer using gtk_text_buffer_register_deserialize_format() or
25423 // gtk_text_buffer_register_deserialize_tagset()
25424 // #GdkAtom<!-- -->s representing the registered formats.
25425 // RETURNS: an array of
25426 // <n_formats>: return location for the number of formats
25427 Gdk2.Atom* /*new container*/ get_deserialize_formats(/*out*/ int* n_formats) {
25428 return gtk_text_buffer_get_deserialize_formats(&this, n_formats);
25431 // Initializes @iter with the "end iterator," one past the last valid
25432 // character in the text buffer. If dereferenced with
25433 // gtk_text_iter_get_char(), the end iterator has a character value of
25434 // 0. The entire buffer lies in the range from the first position in
25435 // the buffer (call gtk_text_buffer_get_start_iter() to get
25436 // character position 0) to the end iterator.
25437 // <iter>: iterator to initialize
25438 void get_end_iter(/*out*/ TextIter* iter) {
25439 gtk_text_buffer_get_end_iter(&this, iter);
25442 // Indicates whether the buffer has some text currently selected.
25443 // RETURNS: %TRUE if the there is text selected
25444 int get_has_selection() {
25445 return gtk_text_buffer_get_has_selection(&this);
25448 // Returns the mark that represents the cursor (insertion point).
25449 // Equivalent to calling gtk_text_buffer_get_mark() to get the mark
25450 // named "insert", but very slightly more efficient, and involves less
25451 // typing.
25452 // RETURNS: insertion point mark
25453 TextMark* get_insert() {
25454 return gtk_text_buffer_get_insert(&this);
25457 // Obtains the location of @anchor within @buffer.
25458 // <iter>: an iterator to be initialized
25459 // <anchor>: a child anchor that appears in @buffer
25460 void get_iter_at_child_anchor(/*out*/ TextIter* iter, TextChildAnchor* anchor) {
25461 gtk_text_buffer_get_iter_at_child_anchor(&this, iter, anchor);
25464 // Initializes @iter to the start of the given line.
25465 // <iter>: iterator to initialize
25466 // <line_number>: line number counting from 0
25467 void get_iter_at_line(/*out*/ TextIter* iter, int line_number) {
25468 gtk_text_buffer_get_iter_at_line(&this, iter, line_number);
25471 // Obtains an iterator pointing to @byte_index within the given line.
25472 // beyond the end of the line. Note <emphasis>bytes</emphasis>, not
25473 // characters; UTF-8 may encode one character as multiple bytes.
25474 // <iter>: iterator to initialize
25475 // <line_number>: line number counting from 0
25476 // <byte_index>: byte index from start of line
25477 void get_iter_at_line_index(/*out*/ TextIter* iter, int line_number, int byte_index) {
25478 gtk_text_buffer_get_iter_at_line_index(&this, iter, line_number, byte_index);
25481 // Obtains an iterator pointing to @char_offset within the given
25482 // line. The @char_offset must exist, offsets off the end of the line
25483 // are not allowed. Note <emphasis>characters</emphasis>, not bytes;
25484 // UTF-8 may encode one character as multiple bytes.
25485 // <iter>: iterator to initialize
25486 // <line_number>: line number counting from 0
25487 // <char_offset>: char offset from start of line
25488 void get_iter_at_line_offset(/*out*/ TextIter* iter, int line_number, int char_offset) {
25489 gtk_text_buffer_get_iter_at_line_offset(&this, iter, line_number, char_offset);
25492 // Initializes @iter with the current position of @mark.
25493 // <iter>: iterator to initialize
25494 // <mark>: a #GtkTextMark in @buffer
25495 void get_iter_at_mark(/*out*/ TextIter* iter, TextMark* mark) {
25496 gtk_text_buffer_get_iter_at_mark(&this, iter, mark);
25499 // Initializes @iter to a position @char_offset chars from the start
25500 // of the entire buffer. If @char_offset is -1 or greater than the number
25501 // of characters in the buffer, @iter is initialized to the end iterator,
25502 // the iterator one past the last valid character in the buffer.
25503 // <iter>: iterator to initialize
25504 // <char_offset>: char offset from start of buffer, counting from 0, or -1
25505 void get_iter_at_offset(/*out*/ TextIter* iter, int char_offset) {
25506 gtk_text_buffer_get_iter_at_offset(&this, iter, char_offset);
25509 // Obtains the number of lines in the buffer. This value is cached, so
25510 // the function is very fast.
25511 // RETURNS: number of lines in the buffer
25512 int get_line_count() {
25513 return gtk_text_buffer_get_line_count(&this);
25516 // Returns the mark named @name in buffer @buffer, or %NULL if no such
25517 // mark exists in the buffer.
25518 // RETURNS: a #GtkTextMark, or %NULL
25519 // <name>: a mark name
25520 TextMark* get_mark(char* name) {
25521 return gtk_text_buffer_get_mark(&this, name);
25524 // Indicates whether the buffer has been modified since the last call
25525 // to gtk_text_buffer_set_modified() set the modification flag to
25526 // %FALSE. Used for example to enable a "save" function in a text
25527 // editor.
25528 // RETURNS: %TRUE if the buffer has been modified
25529 int get_modified() {
25530 return gtk_text_buffer_get_modified(&this);
25533 // This function returns the list of targets this text buffer supports
25534 // for pasting and as DND destination. The targets in the list are
25535 // added with %info values from the #GtkTextBufferTargetInfo enum,
25536 // using gtk_target_list_add_rich_text_targets() and
25537 // gtk_target_list_add_text_targets().
25538 // RETURNS: the #GtkTargetList
25539 TargetList* get_paste_target_list() {
25540 return gtk_text_buffer_get_paste_target_list(&this);
25543 // Returns the mark that represents the selection bound. Equivalent
25544 // to calling gtk_text_buffer_get_mark() to get the mark named
25545 // "selection_bound", but very slightly more efficient, and involves
25546 // less typing.
25547 // The currently-selected text in @buffer is the region between the
25548 // "selection_bound" and "insert" marks. If "selection_bound" and
25549 // "insert" are in the same place, then there is no current selection.
25550 // gtk_text_buffer_get_selection_bounds() is another convenient function
25551 // for handling the selection, if you just want to know whether there's a
25552 // selection and what its bounds are.
25553 // RETURNS: selection bound mark
25554 TextMark* get_selection_bound() {
25555 return gtk_text_buffer_get_selection_bound(&this);
25558 // Returns %TRUE if some text is selected; places the bounds
25559 // of the selection in @start and @end (if the selection has length 0,
25560 // then @start and @end are filled in with the same value).
25561 // NULL, then they are not filled in, but the return value still indicates
25562 // whether text is selected.
25563 // RETURNS: whether the selection has nonzero length
25564 // <start>: iterator to initialize with selection start
25565 // <end>: iterator to initialize with selection end
25566 int get_selection_bounds(/*out*/ TextIter* start, /*out*/ TextIter* end) {
25567 return gtk_text_buffer_get_selection_bounds(&this, start, end);
25570 // This function returns the rich text serialize formats registered
25571 // with @buffer using gtk_text_buffer_register_serialize_format() or
25572 // gtk_text_buffer_register_serialize_tagset()
25573 // #GdkAtom<!-- -->s representing the registered formats.
25574 // RETURNS: an array of
25575 // <n_formats>: return location for the number of formats
25576 Gdk2.Atom* /*new container*/ get_serialize_formats(/*out*/ int* n_formats) {
25577 return gtk_text_buffer_get_serialize_formats(&this, n_formats);
25580 // Returns the text in the range [@start,@end). Excludes undisplayed
25581 // text (text marked with tags that set the invisibility attribute) if
25582 // 0xFFFC character whenever the buffer contains
25583 // embedded images, so byte and character indexes into
25584 // the returned string <emphasis>do</emphasis> correspond to byte
25585 // and character indexes into the buffer. Contrast with
25586 // gtk_text_buffer_get_text(). Note that 0xFFFC can occur in normal
25587 // text as well, so it is not a reliable indicator that a pixbuf or
25588 // widget is in the buffer.
25589 // RETURNS: an allocated UTF-8 string
25590 // <start>: start of a range
25591 // <end>: end of a range
25592 // <include_hidden_chars>: whether to include invisible text
25593 char* /*new*/ get_slice(TextIter* start, TextIter* end, int include_hidden_chars) {
25594 return gtk_text_buffer_get_slice(&this, start, end, include_hidden_chars);
25597 // Initialized @iter with the first position in the text buffer. This
25598 // is the same as using gtk_text_buffer_get_iter_at_offset() to get
25599 // the iter at character offset 0.
25600 // <iter>: iterator to initialize
25601 void get_start_iter(/*out*/ TextIter* iter) {
25602 gtk_text_buffer_get_start_iter(&this, iter);
25605 // Get the #GtkTextTagTable associated with this buffer.
25606 // RETURNS: the buffer's tag table
25607 TextTagTable* get_tag_table() {
25608 return gtk_text_buffer_get_tag_table(&this);
25611 // Returns the text in the range [@start,@end). Excludes undisplayed
25612 // text (text marked with tags that set the invisibility attribute) if
25613 // representing embedded images, so byte and character indexes into
25614 // the returned string do <emphasis>not</emphasis> correspond to byte
25615 // and character indexes into the buffer. Contrast with
25616 // gtk_text_buffer_get_slice().
25617 // RETURNS: an allocated UTF-8 string
25618 // <start>: start of a range
25619 // <end>: end of a range
25620 // <include_hidden_chars>: whether to include invisible text
25621 char* /*new*/ get_text(TextIter* start, TextIter* end, int include_hidden_chars) {
25622 return gtk_text_buffer_get_text(&this, start, end, include_hidden_chars);
25625 // Inserts @len bytes of @text at position @iter. If @len is -1,
25626 // entirety. Emits the "insert-text" signal; insertion actually occurs
25627 // in the default handler for the signal. @iter is invalidated when
25628 // insertion occurs (because the buffer contents change), but the
25629 // default signal handler revalidates it to point to the end of the
25630 // inserted text.
25631 // <iter>: a position in the buffer
25632 // <text>: text in UTF-8 format
25633 // <len>: length of text in bytes, or -1
25634 void insert(TextIter* iter, char* text, int len) {
25635 gtk_text_buffer_insert(&this, iter, text, len);
25638 // Simply calls gtk_text_buffer_insert(), using the current
25639 // cursor position as the insertion point.
25640 // <text>: text in UTF-8 format
25641 // <len>: length of text, in bytes
25642 void insert_at_cursor(char* text, int len) {
25643 gtk_text_buffer_insert_at_cursor(&this, text, len);
25646 // Inserts a child widget anchor into the text buffer at @iter. The
25647 // anchor will be counted as one character in character counts, and
25648 // when obtaining the buffer contents as a string, will be represented
25649 // by the Unicode "object replacement character" 0xFFFC. Note that the
25650 // "slice" variants for obtaining portions of the buffer as a string
25651 // include this character for child anchors, but the "text" variants do
25652 // not. E.g. see gtk_text_buffer_get_slice() and
25653 // gtk_text_buffer_get_text(). Consider
25654 // gtk_text_buffer_create_child_anchor() as a more convenient
25655 // alternative to this function. The buffer will add a reference to
25656 // the anchor, so you can unref it after insertion.
25657 // <iter>: location to insert the anchor
25658 // <anchor>: a #GtkTextChildAnchor
25659 void insert_child_anchor(TextIter* iter, TextChildAnchor* anchor) {
25660 gtk_text_buffer_insert_child_anchor(&this, iter, anchor);
25663 // Like gtk_text_buffer_insert(), but the insertion will not occur if
25664 // want to prevent insertions at ineditable locations if the insertion
25665 // results from a user action (is interactive).
25666 // have a tag affecting editability applied to it. Typically the
25667 // result of gtk_text_view_get_editable() is appropriate here.
25668 // RETURNS: whether text was actually inserted
25669 // <iter>: a position in @buffer
25670 // <text>: some UTF-8 text
25671 // <len>: length of text in bytes, or -1
25672 // <default_editable>: default editability of buffer
25673 int insert_interactive(TextIter* iter, char* text, int len, int default_editable) {
25674 return gtk_text_buffer_insert_interactive(&this, iter, text, len, default_editable);
25677 // Calls gtk_text_buffer_insert_interactive() at the cursor
25678 // position.
25679 // have a tag affecting editability applied to it. Typically the
25680 // result of gtk_text_view_get_editable() is appropriate here.
25681 // RETURNS: whether text was actually inserted
25682 // <text>: text in UTF-8 format
25683 // <len>: length of text in bytes, or -1
25684 // <default_editable>: default editability of buffer
25685 int insert_interactive_at_cursor(char* text, int len, int default_editable) {
25686 return gtk_text_buffer_insert_interactive_at_cursor(&this, text, len, default_editable);
25689 // Inserts an image into the text buffer at @iter. The image will be
25690 // counted as one character in character counts, and when obtaining
25691 // the buffer contents as a string, will be represented by the Unicode
25692 // "object replacement character" 0xFFFC. Note that the "slice"
25693 // variants for obtaining portions of the buffer as a string include
25694 // this character for pixbufs, but the "text" variants do
25695 // not. e.g. see gtk_text_buffer_get_slice() and
25696 // gtk_text_buffer_get_text().
25697 // <iter>: location to insert the pixbuf
25698 // <pixbuf>: a #GdkPixbuf
25699 void insert_pixbuf(TextIter* iter, GdkPixbuf2.Pixbuf* pixbuf) {
25700 gtk_text_buffer_insert_pixbuf(&this, iter, pixbuf);
25703 // Copies text, tags, and pixbufs between @start and @end (the order
25704 // of @start and @end doesn't matter) and inserts the copy at @iter.
25705 // Used instead of simply getting/inserting text because it preserves
25706 // images and tags. If @start and @end are in a different buffer from
25707 // Implemented via emissions of the insert_text and apply_tag signals,
25708 // so expect those.
25709 // <iter>: a position in @buffer
25710 // <start>: a position in a #GtkTextBuffer
25711 // <end>: another position in the same buffer as @start
25712 void insert_range(TextIter* iter, TextIter* start, TextIter* end) {
25713 gtk_text_buffer_insert_range(&this, iter, start, end);
25716 // Same as gtk_text_buffer_insert_range(), but does nothing if the
25717 // insertion point isn't editable. The @default_editable parameter
25718 // indicates whether the text is editable at @iter if no tags
25719 // enclosing @iter affect editability. Typically the result of
25720 // gtk_text_view_get_editable() is appropriate here.
25721 // RETURNS: whether an insertion was possible at @iter
25722 // <iter>: a position in @buffer
25723 // <start>: a position in a #GtkTextBuffer
25724 // <end>: another position in the same buffer as @start
25725 // <default_editable>: default editability of the buffer
25726 int insert_range_interactive(TextIter* iter, TextIter* start, TextIter* end, int default_editable) {
25727 return gtk_text_buffer_insert_range_interactive(&this, iter, start, end, default_editable);
25730 // Unintrospectable method: insert_with_tags() / gtk_text_buffer_insert_with_tags()
25731 // Inserts @text into @buffer at @iter, applying the list of tags to
25732 // the newly-inserted text. The last tag specified must be NULL to
25733 // terminate the list. Equivalent to calling gtk_text_buffer_insert(),
25734 // then gtk_text_buffer_apply_tag() on the inserted text;
25735 // gtk_text_buffer_insert_with_tags() is just a convenience function.
25736 // <iter>: an iterator in @buffer
25737 // <text>: UTF-8 text
25738 // <len>: length of @text, or -1
25739 // <first_tag>: first tag to apply to @text
25740 /+ Not available -- variadic methods unsupported - use the C function directly.
25741 alias gtk_text_buffer_insert_with_tags insert_with_tags; // Variadic
25744 // Unintrospectable method: insert_with_tags_by_name() / gtk_text_buffer_insert_with_tags_by_name()
25745 // Same as gtk_text_buffer_insert_with_tags(), but allows you
25746 // to pass in tag names instead of tag objects.
25747 // <iter>: position in @buffer
25748 // <text>: UTF-8 text
25749 // <len>: length of @text, or -1
25750 // <first_tag_name>: name of a tag to apply to @text
25751 /+ Not available -- variadic methods unsupported - use the C function directly.
25752 alias gtk_text_buffer_insert_with_tags_by_name insert_with_tags_by_name; // Variadic
25755 // Moves @mark to the new location @where. Emits the "mark-set" signal
25756 // as notification of the move.
25757 // <mark>: a #GtkTextMark
25758 // <where>: new location for @mark in @buffer
25759 void move_mark(TextMark* mark, TextIter* where) {
25760 gtk_text_buffer_move_mark(&this, mark, where);
25763 // Moves the mark named @name (which must exist) to location @where.
25764 // See gtk_text_buffer_move_mark() for details.
25765 // <name>: name of a mark
25766 // <where>: new location for mark
25767 void move_mark_by_name(char* name, TextIter* where) {
25768 gtk_text_buffer_move_mark_by_name(&this, name, where);
25771 // Pastes the contents of a clipboard at the insertion point, or
25772 // we'll ask for the paste data and return, and at some point later
25773 // after the main loop runs, the paste data will be inserted.)
25774 // <clipboard>: the #GtkClipboard to paste from
25775 // <override_location>: location to insert pasted text, or %NULL for at the cursor
25776 // <default_editable>: whether the buffer is editable by default
25777 void paste_clipboard(Clipboard* clipboard, TextIter* override_location, int default_editable) {
25778 gtk_text_buffer_paste_clipboard(&this, clipboard, override_location, default_editable);
25781 // This function moves the "insert" and "selection_bound" marks
25782 // simultaneously. If you move them to the same place in two steps
25783 // with gtk_text_buffer_move_mark(), you will temporarily select a
25784 // region in between their old and new locations, which can be pretty
25785 // inefficient since the temporarily-selected region will force stuff
25786 // to be recalculated. This function moves them as a unit, which can
25787 // be optimized.
25788 // <where>: where to put the cursor
25789 void place_cursor(TextIter* where) {
25790 gtk_text_buffer_place_cursor(&this, where);
25793 // This function registers a rich text deserialization @function along with
25794 // its @mime_type with the passed @buffer.
25795 // newly registered format's mime-type.
25796 // RETURNS: the #GdkAtom that corresponds to the
25797 // <mime_type>: the format's mime-type
25798 // <function>: the deserialize function to register
25799 // <user_data>: @function's user_data
25800 // <user_data_destroy>: a function to call when @user_data is no longer needed
25801 Gdk2.Atom register_deserialize_format(char* mime_type, TextBufferDeserializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy) {
25802 return gtk_text_buffer_register_deserialize_format(&this, mime_type, function_, user_data, user_data_destroy);
25805 // This function registers GTK+'s internal rich text serialization
25806 // format with the passed @buffer. See
25807 // gtk_text_buffer_register_serialize_tagset() for details.
25808 // newly registered format's mime-type.
25809 // RETURNS: the #GdkAtom that corresponds to the
25810 // <tagset_name>: an optional tagset name, on %NULL
25811 Gdk2.Atom register_deserialize_tagset(char* tagset_name=null) {
25812 return gtk_text_buffer_register_deserialize_tagset(&this, tagset_name);
25815 // This function registers a rich text serialization @function along with
25816 // its @mime_type with the passed @buffer.
25817 // newly registered format's mime-type.
25818 // RETURNS: the #GdkAtom that corresponds to the
25819 // <mime_type>: the format's mime-type
25820 // <function>: the serialize function to register
25821 // <user_data>: %function's user_data
25822 // <user_data_destroy>: a function to call when @user_data is no longer needed
25823 Gdk2.Atom register_serialize_format(char* mime_type, TextBufferSerializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy) {
25824 return gtk_text_buffer_register_serialize_format(&this, mime_type, function_, user_data, user_data_destroy);
25827 // This function registers GTK+'s internal rich text serialization
25828 // format with the passed @buffer. The internal format does not comply
25829 // to any standard rich text format and only works between #GtkTextBuffer
25830 // instances. It is capable of serializing all of a text buffer's tags
25831 // and embedded pixbufs.
25832 // This function is just a wrapper around
25833 // gtk_text_buffer_register_serialize_format(). The mime type used
25834 // for registering is "application/x-gtk-text-buffer-rich-text", or
25835 // "application/x-gtk-text-buffer-rich-text;format=@tagset_name" if a
25836 // The @tagset_name can be used to restrict the transfer of rich text
25837 // to buffers with compatible sets of tags, in order to avoid unknown
25838 // tags from being pasted. It is probably the common case to pass an
25839 // identifier != %NULL here, since the %NULL tagset requires the
25840 // receiving buffer to deal with with pasting of arbitrary tags.
25841 // newly registered format's mime-type.
25842 // RETURNS: the #GdkAtom that corresponds to the
25843 // <tagset_name>: an optional tagset name, on %NULL
25844 Gdk2.Atom register_serialize_tagset(char* tagset_name=null) {
25845 return gtk_text_buffer_register_serialize_tagset(&this, tagset_name);
25848 // Removes all tags in the range between @start and @end. Be careful
25849 // with this function; it could remove tags added in code unrelated to
25850 // the code you're currently writing. That is, using this function is
25851 // probably a bad idea if you have two or more unrelated code sections
25852 // that add tags.
25853 // <start>: one bound of range to be untagged
25854 // <end>: other bound of range to be untagged
25855 void remove_all_tags(TextIter* start, TextIter* end) {
25856 gtk_text_buffer_remove_all_tags(&this, start, end);
25859 // Removes a #GtkClipboard added with
25860 // gtk_text_buffer_add_selection_clipboard().
25861 // <clipboard>: a #GtkClipboard added to @buffer by gtk_text_buffer_add_selection_clipboard()
25862 void remove_selection_clipboard(Clipboard* clipboard) {
25863 gtk_text_buffer_remove_selection_clipboard(&this, clipboard);
25866 // Emits the "remove-tag" signal. The default handler for the signal
25867 // removes all occurrences of @tag from the given range. @start and
25868 // <tag>: a #GtkTextTag
25869 // <start>: one bound of range to be untagged
25870 // <end>: other bound of range to be untagged
25871 void remove_tag(TextTag* tag, TextIter* start, TextIter* end) {
25872 gtk_text_buffer_remove_tag(&this, tag, start, end);
25875 // Calls gtk_text_tag_table_lookup() on the buffer's tag table to
25876 // get a #GtkTextTag, then calls gtk_text_buffer_remove_tag().
25877 // <name>: name of a #GtkTextTag
25878 // <start>: one bound of range to be untagged
25879 // <end>: other bound of range to be untagged
25880 void remove_tag_by_name(char* name, TextIter* start, TextIter* end) {
25881 gtk_text_buffer_remove_tag_by_name(&this, name, start, end);
25884 // This function moves the "insert" and "selection_bound" marks
25885 // simultaneously. If you move them in two steps
25886 // with gtk_text_buffer_move_mark(), you will temporarily select a
25887 // region in between their old and new locations, which can be pretty
25888 // inefficient since the temporarily-selected region will force stuff
25889 // to be recalculated. This function moves them as a unit, which can
25890 // be optimized.
25891 // <ins>: where to put the "insert" mark
25892 // <bound>: where to put the "selection_bound" mark
25893 void select_range(TextIter* ins, TextIter* bound) {
25894 gtk_text_buffer_select_range(&this, ins, bound);
25897 // This function serializes the portion of text between @start
25898 // and @end in the rich text format represented by @format.
25899 // gtk_text_buffer_register_serialize_format() or
25900 // gtk_text_buffer_register_serialize_tagset() beforehand.
25901 // data, encoded as @format
25902 // RETURNS: the serialized
25903 // <content_buffer>: the #GtkTextBuffer to serialize
25904 // <format>: the rich text format to use for serializing
25905 // <start>: start of block of text to serialize
25906 // <end>: end of block of test to serialize
25907 // <length>: return location for the length of the serialized data
25908 ubyte* /*new*/ serialize(TextBuffer* content_buffer, Gdk2.Atom format, TextIter* start, TextIter* end, /*out*/ size_t* length) {
25909 return gtk_text_buffer_serialize(&this, content_buffer, format, start, end, length);
25912 // Used to keep track of whether the buffer has been modified since the
25913 // last time it was saved. Whenever the buffer is saved to disk, call
25914 // gtk_text_buffer_set_modified (@buffer, FALSE). When the buffer is modified,
25915 // it will automatically toggled on the modified bit again. When the modified
25916 // bit flips, the buffer emits a "modified-changed" signal.
25917 // <setting>: modification flag setting
25918 void set_modified(int setting) {
25919 gtk_text_buffer_set_modified(&this, setting);
25922 // Deletes current contents of @buffer, and inserts @text instead. If
25923 // <text>: UTF-8 text to insert
25924 // <len>: length of @text in bytes
25925 void set_text(char* text, int len) {
25926 gtk_text_buffer_set_text(&this, text, len);
25929 // This function unregisters a rich text format that was previously
25930 // registered using gtk_text_buffer_register_deserialize_format() or
25931 // gtk_text_buffer_register_deserialize_tagset().
25932 // <format>: a #GdkAtom representing a registered rich text format.
25933 void unregister_deserialize_format(Gdk2.Atom format) {
25934 gtk_text_buffer_unregister_deserialize_format(&this, format);
25937 // This function unregisters a rich text format that was previously
25938 // registered using gtk_text_buffer_register_serialize_format() or
25939 // gtk_text_buffer_register_serialize_tagset()
25940 // <format>: a #GdkAtom representing a registered rich text format.
25941 void unregister_serialize_format(Gdk2.Atom format) {
25942 gtk_text_buffer_unregister_serialize_format(&this, format);
25945 // The ::apply-tag signal is emitted to apply a tag to a
25946 // range of text in a #GtkTextBuffer.
25947 // Applying actually occurs in the default handler.
25948 // Note that if your handler runs before the default handler it must not
25949 // invalidate the @start and @end iters (or has to revalidate them).
25950 // gtk_text_buffer_apply_tag(),
25951 // gtk_text_buffer_insert_with_tags(),
25952 // gtk_text_buffer_insert_range().
25953 // <tag>: the applied tag
25954 // <start>: the start of the range the tag is applied to
25955 // <end>: the end of the range the tag is applied to
25956 extern (C) alias static void function (TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end, void* user_data=null) signal_apply_tag;
25958 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25959 return super_.signal_connect!name(cb, data, cf);
25962 ulong signal_connect(string name:"apply-tag", CB/*:signal_apply_tag*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25963 return signal_connect_data(&this, cast(char*)"apply-tag",
25964 cast(GObject2.Callback)cb, data, null, cf);
25967 // The ::begin-user-action signal is emitted at the beginning of a single
25968 // user-visible operation on a #GtkTextBuffer.
25969 // gtk_text_buffer_begin_user_action(),
25970 // gtk_text_buffer_insert_interactive(),
25971 // gtk_text_buffer_insert_range_interactive(),
25972 // gtk_text_buffer_delete_interactive(),
25973 // gtk_text_buffer_backspace(),
25974 // gtk_text_buffer_delete_selection().
25975 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_begin_user_action;
25976 ulong signal_connect(string name:"begin-user-action", CB/*:signal_begin_user_action*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25977 return signal_connect_data(&this, cast(char*)"begin-user-action",
25978 cast(GObject2.Callback)cb, data, null, cf);
25981 // The ::changed signal is emitted when the content of a #GtkTextBuffer
25982 // has changed.
25983 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_changed;
25984 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25985 return signal_connect_data(&this, cast(char*)"changed",
25986 cast(GObject2.Callback)cb, data, null, cf);
25989 // The ::delete-range signal is emitted to delete a range
25990 // from a #GtkTextBuffer.
25991 // Note that if your handler runs before the default handler it must not
25992 // invalidate the @start and @end iters (or has to revalidate them).
25993 // The default signal handler revalidates the @start and @end iters to
25994 // both point point to the location where text was deleted. Handlers
25995 // which run after the default handler (see g_signal_connect_after())
25996 // do not have access to the deleted text.
25997 // <start>: the start of the range to be deleted
25998 // <end>: the end of the range to be deleted
25999 extern (C) alias static void function (TextBuffer* this_, TextIter* start, TextIter* end, void* user_data=null) signal_delete_range;
26000 ulong signal_connect(string name:"delete-range", CB/*:signal_delete_range*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26001 return signal_connect_data(&this, cast(char*)"delete-range",
26002 cast(GObject2.Callback)cb, data, null, cf);
26005 // The ::end-user-action signal is emitted at the end of a single
26006 // user-visible operation on the #GtkTextBuffer.
26007 // gtk_text_buffer_end_user_action(),
26008 // gtk_text_buffer_insert_interactive(),
26009 // gtk_text_buffer_insert_range_interactive(),
26010 // gtk_text_buffer_delete_interactive(),
26011 // gtk_text_buffer_backspace(),
26012 // gtk_text_buffer_delete_selection(),
26013 // gtk_text_buffer_backspace().
26014 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_end_user_action;
26015 ulong signal_connect(string name:"end-user-action", CB/*:signal_end_user_action*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26016 return signal_connect_data(&this, cast(char*)"end-user-action",
26017 cast(GObject2.Callback)cb, data, null, cf);
26020 // The ::insert-child-anchor signal is emitted to insert a
26021 // #GtkTextChildAnchor in a #GtkTextBuffer.
26022 // Insertion actually occurs in the default handler.
26023 // Note that if your handler runs before the default handler it must
26024 // not invalidate the @location iter (or has to revalidate it).
26025 // The default signal handler revalidates it to be placed after the
26026 // inserted @anchor.
26027 // <location>: position to insert @anchor in @textbuffer
26028 // <anchor>: the #GtkTextChildAnchor to be inserted
26029 extern (C) alias static void function (TextBuffer* this_, TextIter* location, TextChildAnchor* anchor, void* user_data=null) signal_insert_child_anchor;
26030 ulong signal_connect(string name:"insert-child-anchor", CB/*:signal_insert_child_anchor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26031 return signal_connect_data(&this, cast(char*)"insert-child-anchor",
26032 cast(GObject2.Callback)cb, data, null, cf);
26035 // The ::insert-pixbuf signal is emitted to insert a #GdkPixbuf
26036 // in a #GtkTextBuffer. Insertion actually occurs in the default handler.
26037 // Note that if your handler runs before the default handler it must not
26038 // invalidate the @location iter (or has to revalidate it).
26039 // The default signal handler revalidates it to be placed after the
26040 // inserted @pixbuf.
26041 // <location>: position to insert @pixbuf in @textbuffer
26042 // <pixbuf>: the #GdkPixbuf to be inserted
26043 extern (C) alias static void function (TextBuffer* this_, TextIter* location, GdkPixbuf2.Pixbuf* pixbuf, void* user_data=null) signal_insert_pixbuf;
26044 ulong signal_connect(string name:"insert-pixbuf", CB/*:signal_insert_pixbuf*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26045 return signal_connect_data(&this, cast(char*)"insert-pixbuf",
26046 cast(GObject2.Callback)cb, data, null, cf);
26049 // The ::insert-text signal is emitted to insert text in a #GtkTextBuffer.
26050 // Insertion actually occurs in the default handler.
26051 // Note that if your handler runs before the default handler it must not
26052 // invalidate the @location iter (or has to revalidate it).
26053 // The default signal handler revalidates it to point to the end of the
26054 // inserted text.
26055 // gtk_text_buffer_insert(),
26056 // gtk_text_buffer_insert_range().
26057 // <location>: position to insert @text in @textbuffer
26058 // <text>: the UTF-8 text to be inserted
26059 // <len>: length of the inserted text in bytes
26060 extern (C) alias static void function (TextBuffer* this_, TextIter* location, char* text, int len, void* user_data=null) signal_insert_text;
26061 ulong signal_connect(string name:"insert-text", CB/*:signal_insert_text*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26062 return signal_connect_data(&this, cast(char*)"insert-text",
26063 cast(GObject2.Callback)cb, data, null, cf);
26066 // The ::mark-deleted signal is emitted as notification
26067 // after a #GtkTextMark is deleted.
26068 // See also:
26069 // gtk_text_buffer_delete_mark().
26070 // <mark>: The mark that was deleted
26071 extern (C) alias static void function (TextBuffer* this_, TextMark* mark, void* user_data=null) signal_mark_deleted;
26072 ulong signal_connect(string name:"mark-deleted", CB/*:signal_mark_deleted*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26073 return signal_connect_data(&this, cast(char*)"mark-deleted",
26074 cast(GObject2.Callback)cb, data, null, cf);
26077 // The ::mark-set signal is emitted as notification
26078 // after a #GtkTextMark is set.
26079 // gtk_text_buffer_create_mark(),
26080 // gtk_text_buffer_move_mark().
26081 // <location>: The location of @mark in @textbuffer
26082 // <mark>: The mark that is set
26083 extern (C) alias static void function (TextBuffer* this_, TextIter* location, TextMark* mark, void* user_data=null) signal_mark_set;
26084 ulong signal_connect(string name:"mark-set", CB/*:signal_mark_set*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26085 return signal_connect_data(&this, cast(char*)"mark-set",
26086 cast(GObject2.Callback)cb, data, null, cf);
26089 // The ::modified-changed signal is emitted when the modified bit of a
26090 // #GtkTextBuffer flips.
26091 // See also:
26092 // gtk_text_buffer_set_modified().
26093 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_modified_changed;
26094 ulong signal_connect(string name:"modified-changed", CB/*:signal_modified_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26095 return signal_connect_data(&this, cast(char*)"modified-changed",
26096 cast(GObject2.Callback)cb, data, null, cf);
26099 // The paste-done signal is emitted after paste operation has been completed.
26100 // This is useful to properly scroll the view to the end of the pasted text.
26101 // See gtk_text_buffer_paste_clipboard() for more details.
26102 extern (C) alias static void function (TextBuffer* this_, Clipboard* since, void* user_data=null) signal_paste_done;
26103 ulong signal_connect(string name:"paste-done", CB/*:signal_paste_done*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26104 return signal_connect_data(&this, cast(char*)"paste-done",
26105 cast(GObject2.Callback)cb, data, null, cf);
26108 // The ::remove-tag signal is emitted to remove all occurrences of @tag from
26109 // a range of text in a #GtkTextBuffer.
26110 // Removal actually occurs in the default handler.
26111 // Note that if your handler runs before the default handler it must not
26112 // invalidate the @start and @end iters (or has to revalidate them).
26113 // gtk_text_buffer_remove_tag().
26114 // <tag>: the tag to be removed
26115 // <start>: the start of the range the tag is removed from
26116 // <end>: the end of the range the tag is removed from
26117 extern (C) alias static void function (TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end, void* user_data=null) signal_remove_tag;
26118 ulong signal_connect(string name:"remove-tag", CB/*:signal_remove_tag*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26119 return signal_connect_data(&this, cast(char*)"remove-tag",
26120 cast(GObject2.Callback)cb, data, null, cf);
26124 struct TextBufferClass {
26125 GObject2.ObjectClass parent_class;
26126 extern (C) void function (TextBuffer* buffer, TextIter* pos, char* text, int length) insert_text;
26127 // <pixbuf>: a #GdkPixbuf
26128 extern (C) void function (TextBuffer* buffer, TextIter* pos, GdkPixbuf2.Pixbuf* pixbuf) insert_pixbuf;
26129 // <anchor>: a #GtkTextChildAnchor
26130 extern (C) void function (TextBuffer* buffer, TextIter* pos, TextChildAnchor* anchor) insert_child_anchor;
26131 extern (C) void function (TextBuffer* buffer, TextIter* start, TextIter* end) delete_range;
26132 extern (C) void function (TextBuffer* buffer) changed;
26133 extern (C) void function (TextBuffer* buffer) modified_changed;
26134 extern (C) void function (TextBuffer* buffer, TextIter* location, TextMark* mark) mark_set;
26135 extern (C) void function (TextBuffer* buffer, TextMark* mark) mark_deleted;
26136 // <tag>: a #GtkTextTag
26137 extern (C) void function (TextBuffer* buffer, TextTag* tag, TextIter* start_char, TextIter* end_char) apply_tag;
26138 // <tag>: a #GtkTextTag
26139 extern (C) void function (TextBuffer* buffer, TextTag* tag, TextIter* start_char, TextIter* end_char) remove_tag;
26140 extern (C) void function (TextBuffer* buffer) begin_user_action;
26141 extern (C) void function (TextBuffer* buffer) end_user_action;
26142 extern (C) void function (TextBuffer* buffer, Clipboard* clipboard) paste_done;
26143 extern (C) void function () _gtk_reserved1;
26144 extern (C) void function () _gtk_reserved2;
26145 extern (C) void function () _gtk_reserved3;
26146 extern (C) void function () _gtk_reserved4;
26147 extern (C) void function () _gtk_reserved5;
26150 extern (C) alias int function (TextBuffer* register_buffer, TextBuffer* content_buffer, TextIter* iter, ubyte* data, size_t length, int create_tags, void* user_data, GLib2.Error** error=null) TextBufferDeserializeFunc;
26152 extern (C) alias ubyte* function (TextBuffer* register_buffer, TextBuffer* content_buffer, TextIter* start, TextIter* end, size_t* length, void* user_data) TextBufferSerializeFunc;
26154 enum TextBufferTargetInfo {
26155 BUFFER_CONTENTS = -1,
26156 RICH_TEXT = -2,
26157 TEXT = -3
26159 extern (C) alias int function (dchar ch, void* user_data) TextCharPredicate;
26161 struct TextChildAnchor /* : GObject.Object */ {
26162 alias parent_instance this;
26163 alias parent_instance super_;
26164 alias parent_instance object;
26165 GObject2.Object parent_instance;
26166 void* segment;
26169 // Creates a new #GtkTextChildAnchor. Usually you would then insert
26170 // it into a #GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
26171 // To perform the creation and insertion in one step, use the
26172 // convenience function gtk_text_buffer_create_child_anchor().
26173 // RETURNS: a new #GtkTextChildAnchor
26174 static TextChildAnchor* /*new*/ new_() {
26175 return gtk_text_child_anchor_new();
26178 // Determines whether a child anchor has been deleted from
26179 // the buffer. Keep in mind that the child anchor will be
26180 // unreferenced when removed from the buffer, so you need to
26181 // hold your own reference (with g_object_ref()) if you plan
26182 // to use this function &mdash; otherwise all deleted child anchors
26183 // will also be finalized.
26184 // RETURNS: %TRUE if the child anchor has been deleted from its buffer
26185 int get_deleted() {
26186 return gtk_text_child_anchor_get_deleted(&this);
26189 // Gets a list of all widgets anchored at this child anchor.
26190 // The returned list should be freed with g_list_free().
26191 // RETURNS: list of widgets anchored at @anchor
26192 GLib2.List* /*new container*/ get_widgets() {
26193 return gtk_text_child_anchor_get_widgets(&this);
26195 void queue_resize(TextLayout* layout) {
26196 gtk_text_child_anchor_queue_resize(&this, layout);
26198 void register_child(Widget* child, TextLayout* layout) {
26199 gtk_text_child_anchor_register_child(&this, child, layout);
26201 void unregister_child(Widget* child) {
26202 gtk_text_child_anchor_unregister_child(&this, child);
26206 struct TextChildAnchorClass {
26207 GObject2.ObjectClass parent_class;
26208 extern (C) void function () _gtk_reserved1;
26209 extern (C) void function () _gtk_reserved2;
26210 extern (C) void function () _gtk_reserved3;
26211 extern (C) void function () _gtk_reserved4;
26214 struct TextCursorDisplay {
26215 int x, y, height;
26216 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26217 uint, "is_strong", 1,
26218 uint, "is_weak", 1,
26219 uint, "__dummy32A", 30));
26222 enum TextDirection {
26223 NONE = 0,
26224 LTR = 1,
26225 RTL = 2
26227 extern (C) alias void function (OldEditable* editable, uint time_) TextFunction;
26229 struct TextIter {
26230 private void* dummy1, dummy2;
26231 private int dummy3, dummy4, dummy5, dummy6, dummy7, dummy8;
26232 private void* dummy9, dummy10;
26233 private int dummy11, dummy12, dummy13;
26234 private void* dummy14;
26237 // Moves backward by one character offset. Returns %TRUE if movement
26238 // was possible; if @iter was the first in the buffer (character
26239 // offset 0), gtk_text_iter_backward_char () returns %FALSE for convenience when
26240 // writing loops.
26241 // RETURNS: whether movement was possible
26242 int backward_char() {
26243 return gtk_text_iter_backward_char(&this);
26246 // Moves @count characters backward, if possible (if @count would move
26247 // past the start or end of the buffer, moves to the start or end of
26248 // the buffer). The return value indicates whether the iterator moved
26249 // onto a dereferenceable position; if the iterator didn't move, or
26250 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
26251 // the function does nothing and returns %FALSE.
26252 // RETURNS: whether @iter moved and is dereferenceable
26253 // <count>: number of characters to move
26254 int backward_chars(int count) {
26255 return gtk_text_iter_backward_chars(&this, count);
26258 // Like gtk_text_iter_forward_cursor_position(), but moves backward.
26259 // RETURNS: %TRUE if we moved
26260 int backward_cursor_position() {
26261 return gtk_text_iter_backward_cursor_position(&this);
26264 // Moves up to @count cursor positions. See
26265 // gtk_text_iter_forward_cursor_position() for details.
26266 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26267 // <count>: number of positions to move
26268 int backward_cursor_positions(int count) {
26269 return gtk_text_iter_backward_cursor_positions(&this, count);
26272 // Same as gtk_text_iter_forward_find_char(), but goes backward from @iter.
26273 // RETURNS: whether a match was found
26274 // <pred>: function to be called on each character
26275 // <user_data>: user data for @pred
26276 // <limit>: search limit, or %NULL for none
26277 int backward_find_char(TextCharPredicate pred, void* user_data, TextIter* limit=null) {
26278 return gtk_text_iter_backward_find_char(&this, pred, user_data, limit);
26281 // Moves @iter to the start of the previous line. Returns %TRUE if
26282 // function returns %FALSE. Therefore if @iter was already on line 0,
26283 // but not at the start of the line, @iter is snapped to the start of
26284 // the line and the function returns %TRUE. (Note that this implies that
26285 // in a loop calling this function, the line number may not change on
26286 // every iteration, if your first iteration is on line 0.)
26287 // RETURNS: whether @iter moved
26288 int backward_line() {
26289 return gtk_text_iter_backward_line(&this);
26292 // Moves @count lines backward, if possible (if @count would move
26293 // past the start or end of the buffer, moves to the start or end of
26294 // the buffer). The return value indicates whether the iterator moved
26295 // onto a dereferenceable position; if the iterator didn't move, or
26296 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
26297 // the function does nothing and returns %FALSE. If @count is negative,
26298 // moves forward by 0 - @count lines.
26299 // RETURNS: whether @iter moved and is dereferenceable
26300 // <count>: number of lines to move backward
26301 int backward_lines(int count) {
26302 return gtk_text_iter_backward_lines(&this, count);
26305 // Same as gtk_text_iter_forward_search(), but moves backward.
26306 // RETURNS: whether a match was found
26307 // <str>: search string
26308 // <flags>: bitmask of flags affecting the search
26309 // <match_start>: return location for start of match, or %NULL
26310 // <match_end>: return location for end of match, or %NULL
26311 // <limit>: location of last possible @match_start, or %NULL for start of buffer
26312 int backward_search(char* str, TextSearchFlags flags, /*out*/ TextIter* match_start=null, /*out*/ TextIter* match_end=null, TextIter* limit=null) {
26313 return gtk_text_iter_backward_search(&this, str, flags, match_start, match_end, limit);
26316 // Moves backward to the previous sentence start; if @iter is already at
26317 // the start of a sentence, moves backward to the next one. Sentence
26318 // boundaries are determined by Pango and should be correct for nearly
26319 // any language (if not, the correct fix would be to the Pango text
26320 // boundary algorithms).
26321 // RETURNS: %TRUE if @iter moved and is not the end iterator
26322 int backward_sentence_start() {
26323 return gtk_text_iter_backward_sentence_start(&this);
26326 // Calls gtk_text_iter_backward_sentence_start() up to @count times,
26327 // or until it returns %FALSE. If @count is negative, moves forward
26328 // instead of backward.
26329 // RETURNS: %TRUE if @iter moved and is not the end iterator
26330 // <count>: number of sentences to move
26331 int backward_sentence_starts(int count) {
26332 return gtk_text_iter_backward_sentence_starts(&this, count);
26335 // Moves backward to the next toggle (on or off) of the
26336 // #GtkTextTag @tag, or to the next toggle of any tag if
26337 // returns %FALSE, otherwise %TRUE. Does not return toggles
26338 // located at @iter, only toggles before @iter. Sets @iter
26339 // to the location of the toggle, or the start of the buffer
26340 // if no toggle is found.
26341 // RETURNS: whether we found a tag toggle before @iter
26342 // <tag>: a #GtkTextTag, or %NULL
26343 int backward_to_tag_toggle(TextTag* tag=null) {
26344 return gtk_text_iter_backward_to_tag_toggle(&this, tag);
26347 // Moves @iter forward to the previous visible cursor position. See
26348 // gtk_text_iter_backward_cursor_position() for details.
26349 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26350 int backward_visible_cursor_position() {
26351 return gtk_text_iter_backward_visible_cursor_position(&this);
26354 // Moves up to @count visible cursor positions. See
26355 // gtk_text_iter_backward_cursor_position() for details.
26356 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26357 // <count>: number of positions to move
26358 int backward_visible_cursor_positions(int count) {
26359 return gtk_text_iter_backward_visible_cursor_positions(&this, count);
26362 // Moves @iter to the start of the previous visible line. Returns %TRUE if
26363 // function returns %FALSE. Therefore if @iter was already on line 0,
26364 // but not at the start of the line, @iter is snapped to the start of
26365 // the line and the function returns %TRUE. (Note that this implies that
26366 // in a loop calling this function, the line number may not change on
26367 // every iteration, if your first iteration is on line 0.)
26368 // RETURNS: whether @iter moved
26369 int backward_visible_line() {
26370 return gtk_text_iter_backward_visible_line(&this);
26373 // Moves @count visible lines backward, if possible (if @count would move
26374 // past the start or end of the buffer, moves to the start or end of
26375 // the buffer). The return value indicates whether the iterator moved
26376 // onto a dereferenceable position; if the iterator didn't move, or
26377 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
26378 // the function does nothing and returns %FALSE. If @count is negative,
26379 // moves forward by 0 - @count lines.
26380 // RETURNS: whether @iter moved and is dereferenceable
26381 // <count>: number of lines to move backward
26382 int backward_visible_lines(int count) {
26383 return gtk_text_iter_backward_visible_lines(&this, count);
26386 // Moves backward to the previous visible word start. (If @iter is currently
26387 // on a word start, moves backward to the next one after that.) Word breaks
26388 // are determined by Pango and should be correct for nearly any
26389 // language (if not, the correct fix would be to the Pango word break
26390 // algorithms).
26391 // RETURNS: %TRUE if @iter moved and is not the end iterator
26392 int backward_visible_word_start() {
26393 return gtk_text_iter_backward_visible_word_start(&this);
26396 // Calls gtk_text_iter_backward_visible_word_start() up to @count times.
26397 // RETURNS: %TRUE if @iter moved and is not the end iterator
26398 // <count>: number of times to move
26399 int backward_visible_word_starts(int count) {
26400 return gtk_text_iter_backward_visible_word_starts(&this, count);
26403 // Moves backward to the previous word start. (If @iter is currently on a
26404 // word start, moves backward to the next one after that.) Word breaks
26405 // are determined by Pango and should be correct for nearly any
26406 // language (if not, the correct fix would be to the Pango word break
26407 // algorithms).
26408 // RETURNS: %TRUE if @iter moved and is not the end iterator
26409 int backward_word_start() {
26410 return gtk_text_iter_backward_word_start(&this);
26413 // Calls gtk_text_iter_backward_word_start() up to @count times.
26414 // RETURNS: %TRUE if @iter moved and is not the end iterator
26415 // <count>: number of times to move
26416 int backward_word_starts(int count) {
26417 return gtk_text_iter_backward_word_starts(&this, count);
26420 // Returns %TRUE if @tag is toggled on at exactly this point. If @tag
26421 // is %NULL, returns %TRUE if any tag is toggled on at this point. Note
26422 // that the gtk_text_iter_begins_tag () returns %TRUE if @iter is the
26423 // <emphasis>start</emphasis> of the tagged range;
26424 // gtk_text_iter_has_tag () tells you whether an iterator is
26425 // <emphasis>within</emphasis> a tagged range.
26426 // RETURNS: whether @iter is the start of a range tagged with @tag
26427 // <tag>: a #GtkTextTag, or %NULL
26428 int begins_tag(TextTag* tag=null) {
26429 return gtk_text_iter_begins_tag(&this, tag);
26432 // Considering the default editability of the buffer, and tags that
26433 // affect editability, determines whether text inserted at @iter would
26434 // be editable. If text inserted at @iter would be editable then the
26435 // user should be allowed to insert text at @iter.
26436 // gtk_text_buffer_insert_interactive() uses this function to decide
26437 // whether insertions are allowed at a given position.
26438 // RETURNS: whether text inserted at @iter would be editable
26439 // <default_editability>: %TRUE if text is editable by default
26440 int can_insert(int default_editability) {
26441 return gtk_text_iter_can_insert(&this, default_editability);
26444 // A qsort()-style function that returns negative if @lhs is less than
26445 // Ordering is in character offset order, i.e. the first character in the buffer
26446 // is less than the second character in the buffer.
26447 // RETURNS: -1 if @lhs is less than @rhs, 1 if @lhs is greater, 0 if they are equal
26448 // <rhs>: another #GtkTextIter
26449 int compare(TextIter* rhs) {
26450 return gtk_text_iter_compare(&this, rhs);
26453 // Creates a dynamically-allocated copy of an iterator. This function
26454 // is not useful in applications, because iterators can be copied with a
26455 // simple assignment (<literal>GtkTextIter i = j;</literal>). The
26456 // function is used by language bindings.
26457 // RETURNS: a copy of the @iter, free with gtk_text_iter_free ()
26458 TextIter* /*new*/ copy() {
26459 return gtk_text_iter_copy(&this);
26462 // Returns whether the character at @iter is within an editable region
26463 // of text. Non-editable text is "locked" and can't be changed by the
26464 // user via #GtkTextView. This function is simply a convenience
26465 // wrapper around gtk_text_iter_get_attributes (). If no tags applied
26466 // to this text affect editability, @default_setting will be returned.
26467 // You don't want to use this function to decide whether text can be
26468 // inserted at @iter, because for insertion you don't want to know
26469 // whether the char at @iter is inside an editable range, you want to
26470 // know whether a new character inserted at @iter would be inside an
26471 // editable range. Use gtk_text_iter_can_insert() to handle this
26472 // case.
26473 // RETURNS: whether @iter is inside an editable range
26474 // <default_setting>: %TRUE if text is editable by default
26475 int editable(int default_setting) {
26476 return gtk_text_iter_editable(&this, default_setting);
26479 // Returns %TRUE if @iter points to the start of the paragraph
26480 // delimiter characters for a line (delimiters will be either a
26481 // newline, a carriage return, a carriage return followed by a
26482 // newline, or a Unicode paragraph separator character). Note that an
26483 // iterator pointing to the \n of a \r\n pair will not be counted as
26484 // the end of a line, the line ends before the \r. The end iterator is
26485 // considered to be at the end of a line, even though there are no
26486 // paragraph delimiter chars there.
26487 // RETURNS: whether @iter is at the end of a line
26488 int ends_line() {
26489 return gtk_text_iter_ends_line(&this);
26492 // Determines whether @iter ends a sentence. Sentence boundaries are
26493 // determined by Pango and should be correct for nearly any language
26494 // (if not, the correct fix would be to the Pango text boundary
26495 // algorithms).
26496 // RETURNS: %TRUE if @iter is at the end of a sentence.
26497 int ends_sentence() {
26498 return gtk_text_iter_ends_sentence(&this);
26501 // Returns %TRUE if @tag is toggled off at exactly this point. If @tag
26502 // is %NULL, returns %TRUE if any tag is toggled off at this point. Note
26503 // that the gtk_text_iter_ends_tag () returns %TRUE if @iter is the
26504 // <emphasis>end</emphasis> of the tagged range;
26505 // gtk_text_iter_has_tag () tells you whether an iterator is
26506 // <emphasis>within</emphasis> a tagged range.
26507 // RETURNS: whether @iter is the end of a range tagged with @tag
26508 // <tag>: a #GtkTextTag, or %NULL
26509 int ends_tag(TextTag* tag=null) {
26510 return gtk_text_iter_ends_tag(&this, tag);
26513 // Determines whether @iter ends a natural-language word. Word breaks
26514 // are determined by Pango and should be correct for nearly any
26515 // language (if not, the correct fix would be to the Pango word break
26516 // algorithms).
26517 // RETURNS: %TRUE if @iter is at the end of a word
26518 int ends_word() {
26519 return gtk_text_iter_ends_word(&this);
26522 // Tests whether two iterators are equal, using the fastest possible
26523 // mechanism. This function is very fast; you can expect it to perform
26524 // better than e.g. getting the character offset for each iterator and
26525 // comparing the offsets yourself. Also, it's a bit faster than
26526 // gtk_text_iter_compare().
26527 // RETURNS: %TRUE if the iterators point to the same place in the buffer
26528 // <rhs>: another #GtkTextIter
26529 int equal(TextIter* rhs) {
26530 return gtk_text_iter_equal(&this, rhs);
26533 // Moves @iter forward by one character offset. Note that images
26534 // embedded in the buffer occupy 1 character slot, so
26535 // gtk_text_iter_forward_char () may actually move onto an image instead
26536 // of a character, if you have images in your buffer. If @iter is the
26537 // end iterator or one character before it, @iter will now point at
26538 // the end iterator, and gtk_text_iter_forward_char () returns %FALSE for
26539 // convenience when writing loops.
26540 // RETURNS: whether @iter moved and is dereferenceable
26541 int forward_char() {
26542 return gtk_text_iter_forward_char(&this);
26545 // Moves @count characters if possible (if @count would move past the
26546 // start or end of the buffer, moves to the start or end of the
26547 // buffer). The return value indicates whether the new position of
26548 // (the last iterator in the buffer is not dereferenceable). If @count
26549 // is 0, the function does nothing and returns %FALSE.
26550 // RETURNS: whether @iter moved and is dereferenceable
26551 // <count>: number of characters to move, may be negative
26552 int forward_chars(int count) {
26553 return gtk_text_iter_forward_chars(&this, count);
26556 // Moves @iter forward by a single cursor position. Cursor positions
26557 // are (unsurprisingly) positions where the cursor can appear. Perhaps
26558 // surprisingly, there may not be a cursor position between all
26559 // characters. The most common example for European languages would be
26560 // a carriage return/newline sequence. For some Unicode characters,
26561 // the equivalent of say the letter "a" with an accent mark will be
26562 // represented as two characters, first the letter then a "combining
26563 // mark" that causes the accent to be rendered; so the cursor can't go
26564 // between those two characters. See also the #PangoLogAttr structure and
26565 // pango_break() function.
26566 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26567 int forward_cursor_position() {
26568 return gtk_text_iter_forward_cursor_position(&this);
26571 // Moves up to @count cursor positions. See
26572 // gtk_text_iter_forward_cursor_position() for details.
26573 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26574 // <count>: number of positions to move
26575 int forward_cursor_positions(int count) {
26576 return gtk_text_iter_forward_cursor_positions(&this, count);
26579 // Advances @iter, calling @pred on each character. If
26580 // If @pred never returns %TRUE, @iter is set to @limit if
26581 // RETURNS: whether a match was found
26582 // <pred>: a function to be called on each character
26583 // <user_data>: user data for @pred
26584 // <limit>: search limit, or %NULL for none
26585 int forward_find_char(TextCharPredicate pred, void* user_data, TextIter* limit=null) {
26586 return gtk_text_iter_forward_find_char(&this, pred, user_data, limit);
26589 // Moves @iter to the start of the next line. If the iter is already on the
26590 // last line of the buffer, moves the iter to the end of the current line.
26591 // If after the operation, the iter is at the end of the buffer and not
26592 // dereferencable, returns %FALSE. Otherwise, returns %TRUE.
26593 // RETURNS: whether @iter can be dereferenced
26594 int forward_line() {
26595 return gtk_text_iter_forward_line(&this);
26598 // Moves @count lines forward, if possible (if @count would move
26599 // past the start or end of the buffer, moves to the start or end of
26600 // the buffer). The return value indicates whether the iterator moved
26601 // onto a dereferenceable position; if the iterator didn't move, or
26602 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
26603 // the function does nothing and returns %FALSE. If @count is negative,
26604 // moves backward by 0 - @count lines.
26605 // RETURNS: whether @iter moved and is dereferenceable
26606 // <count>: number of lines to move forward
26607 int forward_lines(int count) {
26608 return gtk_text_iter_forward_lines(&this, count);
26611 // Searches forward for @str. Any match is returned by setting
26612 // first character after the match. The search will not continue past
26613 // may wish to use @limit to avoid locking up your UI on large
26614 // buffers.
26615 // If the #GTK_TEXT_SEARCH_VISIBLE_ONLY flag is present, the match may
26616 // have invisible text interspersed in @str. i.e. @str will be a
26617 // possibly-noncontiguous subsequence of the matched range. similarly,
26618 // if you specify #GTK_TEXT_SEARCH_TEXT_ONLY, the match may have
26619 // pixbufs or child widgets mixed inside the matched range. If these
26620 // flags are not given, the match must be exact; the special 0xFFFC
26621 // character in @str will match embedded pixbufs or child widgets.
26622 // RETURNS: whether a match was found
26623 // <str>: a search string
26624 // <flags>: flags affecting how the search is done
26625 // <match_start>: return location for start of match, or %NULL
26626 // <match_end>: return location for end of match, or %NULL
26627 // <limit>: bound for the search, or %NULL for the end of the buffer
26628 int forward_search(char* str, TextSearchFlags flags, /*out*/ TextIter* match_start=null, /*out*/ TextIter* match_end=null, TextIter* limit=null) {
26629 return gtk_text_iter_forward_search(&this, str, flags, match_start, match_end, limit);
26632 // Moves forward to the next sentence end. (If @iter is at the end of
26633 // a sentence, moves to the next end of sentence.) Sentence
26634 // boundaries are determined by Pango and should be correct for nearly
26635 // any language (if not, the correct fix would be to the Pango text
26636 // boundary algorithms).
26637 // RETURNS: %TRUE if @iter moved and is not the end iterator
26638 int forward_sentence_end() {
26639 return gtk_text_iter_forward_sentence_end(&this);
26642 // Calls gtk_text_iter_forward_sentence_end() @count times (or until
26643 // gtk_text_iter_forward_sentence_end() returns %FALSE). If @count is
26644 // negative, moves backward instead of forward.
26645 // RETURNS: %TRUE if @iter moved and is not the end iterator
26646 // <count>: number of sentences to move
26647 int forward_sentence_ends(int count) {
26648 return gtk_text_iter_forward_sentence_ends(&this, count);
26651 // Moves @iter forward to the "end iterator," which points one past the last
26652 // valid character in the buffer. gtk_text_iter_get_char() called on the
26653 // end iterator returns 0, which is convenient for writing loops.
26654 void forward_to_end() {
26655 gtk_text_iter_forward_to_end(&this);
26658 // Moves the iterator to point to the paragraph delimiter characters,
26659 // which will be either a newline, a carriage return, a carriage
26660 // return/newline in sequence, or the Unicode paragraph separator
26661 // character. If the iterator is already at the paragraph delimiter
26662 // characters, moves to the paragraph delimiter characters for the
26663 // next line. If @iter is on the last line in the buffer, which does
26664 // not end in paragraph delimiters, moves to the end iterator (end of
26665 // the last line), and returns %FALSE.
26666 // RETURNS: %TRUE if we moved and the new location is not the end iterator
26667 int forward_to_line_end() {
26668 return gtk_text_iter_forward_to_line_end(&this);
26671 // Moves forward to the next toggle (on or off) of the
26672 // #GtkTextTag @tag, or to the next toggle of any tag if
26673 // returns %FALSE, otherwise %TRUE. Does not return toggles
26674 // located at @iter, only toggles after @iter. Sets @iter to
26675 // the location of the toggle, or to the end of the buffer
26676 // if no toggle is found.
26677 // RETURNS: whether we found a tag toggle after @iter
26678 // <tag>: a #GtkTextTag, or %NULL
26679 int forward_to_tag_toggle(TextTag* tag=null) {
26680 return gtk_text_iter_forward_to_tag_toggle(&this, tag);
26683 // Moves @iter forward to the next visible cursor position. See
26684 // gtk_text_iter_forward_cursor_position() for details.
26685 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26686 int forward_visible_cursor_position() {
26687 return gtk_text_iter_forward_visible_cursor_position(&this);
26690 // Moves up to @count visible cursor positions. See
26691 // gtk_text_iter_forward_cursor_position() for details.
26692 // RETURNS: %TRUE if we moved and the new position is dereferenceable
26693 // <count>: number of positions to move
26694 int forward_visible_cursor_positions(int count) {
26695 return gtk_text_iter_forward_visible_cursor_positions(&this, count);
26698 // Moves @iter to the start of the next visible line. Returns %TRUE if there
26699 // was a next line to move to, and %FALSE if @iter was simply moved to
26700 // the end of the buffer and is now not dereferenceable, or if @iter was
26701 // already at the end of the buffer.
26702 // RETURNS: whether @iter can be dereferenced
26703 int forward_visible_line() {
26704 return gtk_text_iter_forward_visible_line(&this);
26707 // Moves @count visible lines forward, if possible (if @count would move
26708 // past the start or end of the buffer, moves to the start or end of
26709 // the buffer). The return value indicates whether the iterator moved
26710 // onto a dereferenceable position; if the iterator didn't move, or
26711 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
26712 // the function does nothing and returns %FALSE. If @count is negative,
26713 // moves backward by 0 - @count lines.
26714 // RETURNS: whether @iter moved and is dereferenceable
26715 // <count>: number of lines to move forward
26716 int forward_visible_lines(int count) {
26717 return gtk_text_iter_forward_visible_lines(&this, count);
26720 // Moves forward to the next visible word end. (If @iter is currently on a
26721 // word end, moves forward to the next one after that.) Word breaks
26722 // are determined by Pango and should be correct for nearly any
26723 // language (if not, the correct fix would be to the Pango word break
26724 // algorithms).
26725 // RETURNS: %TRUE if @iter moved and is not the end iterator
26726 int forward_visible_word_end() {
26727 return gtk_text_iter_forward_visible_word_end(&this);
26730 // Calls gtk_text_iter_forward_visible_word_end() up to @count times.
26731 // RETURNS: %TRUE if @iter moved and is not the end iterator
26732 // <count>: number of times to move
26733 int forward_visible_word_ends(int count) {
26734 return gtk_text_iter_forward_visible_word_ends(&this, count);
26737 // Moves forward to the next word end. (If @iter is currently on a
26738 // word end, moves forward to the next one after that.) Word breaks
26739 // are determined by Pango and should be correct for nearly any
26740 // language (if not, the correct fix would be to the Pango word break
26741 // algorithms).
26742 // RETURNS: %TRUE if @iter moved and is not the end iterator
26743 int forward_word_end() {
26744 return gtk_text_iter_forward_word_end(&this);
26747 // Calls gtk_text_iter_forward_word_end() up to @count times.
26748 // RETURNS: %TRUE if @iter moved and is not the end iterator
26749 // <count>: number of times to move
26750 int forward_word_ends(int count) {
26751 return gtk_text_iter_forward_word_ends(&this, count);
26754 // Free an iterator allocated on the heap. This function
26755 // is intended for use in language bindings, and is not
26756 // especially useful for applications, because iterators can
26757 // simply be allocated on the stack.
26758 void free() {
26759 gtk_text_iter_free(&this);
26762 // Computes the effect of any tags applied to this spot in the
26763 // text. The @values parameter should be initialized to the default
26764 // settings you wish to use if no tags are in effect. You'd typically
26765 // obtain the defaults from gtk_text_view_get_default_attributes().
26766 // gtk_text_iter_get_attributes () will modify @values, applying the
26767 // effects of any tags present at @iter. If any tags affected @values,
26768 // the function returns %TRUE.
26769 // RETURNS: %TRUE if @values was modified
26770 // <values>: a #GtkTextAttributes to be filled in
26771 int get_attributes(/*out*/ TextAttributes* values) {
26772 return gtk_text_iter_get_attributes(&this, values);
26775 // Returns the #GtkTextBuffer this iterator is associated with.
26776 // RETURNS: the buffer
26777 TextBuffer* get_buffer() {
26778 return gtk_text_iter_get_buffer(&this);
26781 // Returns the number of bytes in the line containing @iter,
26782 // including the paragraph delimiters.
26783 // RETURNS: number of bytes in the line
26784 int get_bytes_in_line() {
26785 return gtk_text_iter_get_bytes_in_line(&this);
26788 // Returns the Unicode character at this iterator. (Equivalent to
26789 // operator* on a C++ iterator.) If the element at this iterator is a
26790 // non-character element, such as an image embedded in the buffer, the
26791 // Unicode "unknown" character 0xFFFC is returned. If invoked on
26792 // the end iterator, zero is returned; zero is not a valid Unicode character.
26793 // So you can write a loop which ends when gtk_text_iter_get_char ()
26794 // returns 0.
26795 // RETURNS: a Unicode character, or 0 if @iter is not dereferenceable
26796 dchar get_char() {
26797 return gtk_text_iter_get_char(&this);
26800 // Returns the number of characters in the line containing @iter,
26801 // including the paragraph delimiters.
26802 // RETURNS: number of characters in the line
26803 int get_chars_in_line() {
26804 return gtk_text_iter_get_chars_in_line(&this);
26807 // If the location at @iter contains a child anchor, the
26808 // anchor is returned (with no new reference count added). Otherwise,
26809 // %NULL is returned.
26810 // RETURNS: the anchor at @iter
26811 TextChildAnchor* get_child_anchor() {
26812 return gtk_text_iter_get_child_anchor(&this);
26815 // A convenience wrapper around gtk_text_iter_get_attributes (),
26816 // which returns the language in effect at @iter. If no tags affecting
26817 // language apply to @iter, the return value is identical to that of
26818 // gtk_get_default_language ().
26819 // RETURNS: language in effect at @iter
26820 Pango.Language* /*new*/ get_language() {
26821 return gtk_text_iter_get_language(&this);
26824 // Returns the line number containing the iterator. Lines in
26825 // a #GtkTextBuffer are numbered beginning with 0 for the first
26826 // line in the buffer.
26827 // RETURNS: a line number
26828 int get_line() {
26829 return gtk_text_iter_get_line(&this);
26832 // Returns the byte index of the iterator, counting
26833 // from the start of a newline-terminated line.
26834 // Remember that #GtkTextBuffer encodes text in
26835 // UTF-8, and that characters can require a variable
26836 // number of bytes to represent.
26837 // RETURNS: distance from start of line, in bytes
26838 int get_line_index() {
26839 return gtk_text_iter_get_line_index(&this);
26842 // Returns the character offset of the iterator,
26843 // counting from the start of a newline-terminated line.
26844 // The first character on the line has offset 0.
26845 // RETURNS: offset from start of line
26846 int get_line_offset() {
26847 return gtk_text_iter_get_line_offset(&this);
26850 // Returns a list of all #GtkTextMark at this location. Because marks
26851 // are not iterable (they don't take up any "space" in the buffer,
26852 // they are just marks in between iterable locations), multiple marks
26853 // can exist in the same place. The returned list is not in any
26854 // meaningful order.
26855 // RETURNS: list of #GtkTextMark
26856 GLib2.SList* /*new container*/ get_marks() {
26857 return gtk_text_iter_get_marks(&this);
26860 // Returns the character offset of an iterator.
26861 // Each character in a #GtkTextBuffer has an offset,
26862 // starting with 0 for the first character in the buffer.
26863 // Use gtk_text_buffer_get_iter_at_offset () to convert an
26864 // offset back into an iterator.
26865 // RETURNS: a character offset
26866 int get_offset() {
26867 return gtk_text_iter_get_offset(&this);
26870 // If the element at @iter is a pixbuf, the pixbuf is returned
26871 // (with no new reference count added). Otherwise,
26872 // %NULL is returned.
26873 // RETURNS: the pixbuf at @iter
26874 GdkPixbuf2.Pixbuf* get_pixbuf() {
26875 return gtk_text_iter_get_pixbuf(&this);
26878 // Returns the text in the given range. A "slice" is an array of
26879 // characters encoded in UTF-8 format, including the Unicode "unknown"
26880 // character 0xFFFC for iterable non-character elements in the buffer,
26881 // such as images. Because images are encoded in the slice, byte and
26882 // character offsets in the returned array will correspond to byte
26883 // offsets in the text buffer. Note that 0xFFFC can occur in normal
26884 // text as well, so it is not a reliable indicator that a pixbuf or
26885 // widget is in the buffer.
26886 // RETURNS: slice of text from the buffer
26887 // <end>: iterator at end of a range
26888 char* /*new*/ get_slice(TextIter* end) {
26889 return gtk_text_iter_get_slice(&this, end);
26892 // Returns a list of tags that apply to @iter, in ascending order of
26893 // priority (highest-priority tags are last). The #GtkTextTag in the
26894 // list don't have a reference added, but you have to free the list
26895 // itself.
26896 // RETURNS: list of #GtkTextTag
26897 GLib2.SList* /*new container*/ get_tags() {
26898 return gtk_text_iter_get_tags(&this);
26901 // Returns <emphasis>text</emphasis> in the given range. If the range
26902 // contains non-text elements such as images, the character and byte
26903 // offsets in the returned string will not correspond to character and
26904 // byte offsets in the buffer. If you want offsets to correspond, see
26905 // gtk_text_iter_get_slice ().
26906 // RETURNS: array of characters from the buffer
26907 // <end>: iterator at end of a range
26908 char* /*new*/ get_text(TextIter* end) {
26909 return gtk_text_iter_get_text(&this, end);
26912 // Returns a list of #GtkTextTag that are toggled on or off at this
26913 // point. (If @toggled_on is %TRUE, the list contains tags that are
26914 // toggled on.) If a tag is toggled on at @iter, then some non-empty
26915 // range of characters following @iter has that tag applied to it. If
26916 // a tag is toggled off, then some non-empty range following @iter
26917 // does <emphasis>not</emphasis> have the tag applied to it.
26918 // RETURNS: tags toggled at this point
26919 // <toggled_on>: %TRUE to get toggled-on tags
26920 GLib2.SList* /*new container*/ get_toggled_tags(int toggled_on) {
26921 return gtk_text_iter_get_toggled_tags(&this, toggled_on);
26924 // Returns the number of bytes from the start of the
26925 // line to the given @iter, not counting bytes that
26926 // are invisible due to tags with the "invisible" flag
26927 // toggled on.
26928 // RETURNS: byte index of @iter with respect to the start of the line
26929 int get_visible_line_index() {
26930 return gtk_text_iter_get_visible_line_index(&this);
26933 // Returns the offset in characters from the start of the
26934 // line to the given @iter, not counting characters that
26935 // are invisible due to tags with the "invisible" flag
26936 // toggled on.
26937 // RETURNS: offset in visible characters from the start of the line
26938 int get_visible_line_offset() {
26939 return gtk_text_iter_get_visible_line_offset(&this);
26942 // Like gtk_text_iter_get_slice (), but invisible text is not included.
26943 // Invisible text is usually invisible because a #GtkTextTag with the
26944 // "invisible" attribute turned on has been applied to it.
26945 // RETURNS: slice of text from the buffer
26946 // <end>: iterator at end of range
26947 char* /*new*/ get_visible_slice(TextIter* end) {
26948 return gtk_text_iter_get_visible_slice(&this, end);
26951 // Like gtk_text_iter_get_text (), but invisible text is not included.
26952 // Invisible text is usually invisible because a #GtkTextTag with the
26953 // "invisible" attribute turned on has been applied to it.
26954 // RETURNS: string containing visible text in the range
26955 // <end>: iterator at end of range
26956 char* /*new*/ get_visible_text(TextIter* end) {
26957 return gtk_text_iter_get_visible_text(&this, end);
26960 // Returns %TRUE if @iter is within a range tagged with @tag.
26961 // RETURNS: whether @iter is tagged with @tag
26962 // <tag>: a #GtkTextTag
26963 int has_tag(TextTag* tag) {
26964 return gtk_text_iter_has_tag(&this, tag);
26967 // Checks whether @iter falls in the range [@start, @end).
26968 // RETURNS: %TRUE if @iter is in the range
26969 // <start>: start of range
26970 // <end>: end of range
26971 int in_range(TextIter* start, TextIter* end) {
26972 return gtk_text_iter_in_range(&this, start, end);
26975 // Determines whether @iter is inside a sentence (as opposed to in
26976 // between two sentences, e.g. after a period and before the first
26977 // letter of the next sentence). Sentence boundaries are determined
26978 // by Pango and should be correct for nearly any language (if not, the
26979 // correct fix would be to the Pango text boundary algorithms).
26980 // RETURNS: %TRUE if @iter is inside a sentence.
26981 int inside_sentence() {
26982 return gtk_text_iter_inside_sentence(&this);
26985 // Determines whether @iter is inside a natural-language word (as
26986 // opposed to say inside some whitespace). Word breaks are determined
26987 // by Pango and should be correct for nearly any language (if not, the
26988 // correct fix would be to the Pango word break algorithms).
26989 // RETURNS: %TRUE if @iter is inside a word
26990 int inside_word() {
26991 return gtk_text_iter_inside_word(&this);
26994 // See gtk_text_iter_forward_cursor_position() or #PangoLogAttr or
26995 // pango_break() for details on what a cursor position is.
26996 // RETURNS: %TRUE if the cursor can be placed at @iter
26997 int is_cursor_position() {
26998 return gtk_text_iter_is_cursor_position(&this);
27001 // Returns %TRUE if @iter is the end iterator, i.e. one past the last
27002 // dereferenceable iterator in the buffer. gtk_text_iter_is_end () is
27003 // the most efficient way to check whether an iterator is the end
27004 // iterator.
27005 // RETURNS: whether @iter is the end iterator
27006 int is_end() {
27007 return gtk_text_iter_is_end(&this);
27010 // Returns %TRUE if @iter is the first iterator in the buffer, that is
27011 // if @iter has a character offset of 0.
27012 // RETURNS: whether @iter is the first in the buffer
27013 int is_start() {
27014 return gtk_text_iter_is_start(&this);
27017 // Swaps the value of @first and @second if @second comes before
27018 // in sequence. Most text buffer functions that take a range call this
27019 // automatically on your behalf, so there's no real reason to call it yourself
27020 // in those cases. There are some exceptions, such as gtk_text_iter_in_range(),
27021 // that expect a pre-sorted range.
27022 // <second>: another #GtkTextIter
27023 void order(TextIter* second) {
27024 gtk_text_iter_order(&this, second);
27027 // Moves iterator @iter to the start of the line @line_number. If
27028 // buffer, moves @iter to the start of the last line in the buffer.
27029 // <line_number>: line number (counted from 0)
27030 void set_line(int line_number) {
27031 gtk_text_iter_set_line(&this, line_number);
27034 // Same as gtk_text_iter_set_line_offset(), but works with a
27035 // <emphasis>byte</emphasis> index. The given byte index must be at
27036 // the start of a character, it can't be in the middle of a UTF-8
27037 // encoded character.
27038 // <byte_on_line>: a byte index relative to the start of @iter's current line
27039 void set_line_index(int byte_on_line) {
27040 gtk_text_iter_set_line_index(&this, byte_on_line);
27043 // Moves @iter within a line, to a new <emphasis>character</emphasis>
27044 // (not byte) offset. The given character offset must be less than or
27045 // equal to the number of characters in the line; if equal, @iter
27046 // moves to the start of the next line. See
27047 // gtk_text_iter_set_line_index() if you have a byte index rather than
27048 // a character offset.
27049 // <char_on_line>: a character offset relative to the start of @iter's current line
27050 void set_line_offset(int char_on_line) {
27051 gtk_text_iter_set_line_offset(&this, char_on_line);
27054 // Sets @iter to point to @char_offset. @char_offset counts from the start
27055 // of the entire text buffer, starting with 0.
27056 // <char_offset>: a character number
27057 void set_offset(int char_offset) {
27058 gtk_text_iter_set_offset(&this, char_offset);
27061 // Like gtk_text_iter_set_line_index(), but the index is in visible
27062 // bytes, i.e. text with a tag making it invisible is not counted
27063 // in the index.
27064 // <byte_on_line>: a byte index
27065 void set_visible_line_index(int byte_on_line) {
27066 gtk_text_iter_set_visible_line_index(&this, byte_on_line);
27069 // Like gtk_text_iter_set_line_offset(), but the offset is in visible
27070 // characters, i.e. text with a tag making it invisible is not
27071 // counted in the offset.
27072 // <char_on_line>: a character offset
27073 void set_visible_line_offset(int char_on_line) {
27074 gtk_text_iter_set_visible_line_offset(&this, char_on_line);
27077 // Returns %TRUE if @iter begins a paragraph,
27078 // i.e. if gtk_text_iter_get_line_offset () would return 0.
27079 // However this function is potentially more efficient than
27080 // gtk_text_iter_get_line_offset () because it doesn't have to compute
27081 // the offset, it just has to see whether it's 0.
27082 // RETURNS: whether @iter begins a line
27083 int starts_line() {
27084 return gtk_text_iter_starts_line(&this);
27087 // Determines whether @iter begins a sentence. Sentence boundaries are
27088 // determined by Pango and should be correct for nearly any language
27089 // (if not, the correct fix would be to the Pango text boundary
27090 // algorithms).
27091 // RETURNS: %TRUE if @iter is at the start of a sentence.
27092 int starts_sentence() {
27093 return gtk_text_iter_starts_sentence(&this);
27096 // Determines whether @iter begins a natural-language word. Word
27097 // breaks are determined by Pango and should be correct for nearly any
27098 // language (if not, the correct fix would be to the Pango word break
27099 // algorithms).
27100 // RETURNS: %TRUE if @iter is at the start of a word
27101 int starts_word() {
27102 return gtk_text_iter_starts_word(&this);
27105 // This is equivalent to (gtk_text_iter_begins_tag () ||
27106 // gtk_text_iter_ends_tag ()), i.e. it tells you whether a range with
27107 // RETURNS: whether @tag is toggled on or off at @iter
27108 // <tag>: a #GtkTextTag, or %NULL
27109 int toggles_tag(TextTag* tag=null) {
27110 return gtk_text_iter_toggles_tag(&this, tag);
27114 struct TextLayout /* : GObject.Object */ {
27115 alias parent_instance this;
27116 alias parent_instance super_;
27117 alias parent_instance object;
27118 GObject2.Object parent_instance;
27119 int screen_width, width, height;
27120 TextBuffer* buffer;
27121 TextAttributes* default_style;
27122 Pango.Context* ltr_context, rtl_context;
27123 TextAttributes* one_style_cache;
27124 TextLineDisplay* one_display_cache;
27125 int wrap_loop_count;
27126 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27127 uint, "cursor_visible", 1,
27128 uint, "cursor_direction", 2,
27129 uint, "keyboard_direction", 2,
27130 uint, "__dummy32A", 27));
27131 char* preedit_string;
27132 Pango.AttrList* preedit_attrs;
27133 int preedit_len, preedit_cursor;
27134 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27135 uint, "overwrite_mode", 1,
27136 uint, "__dummy32B", 31));
27138 static TextLayout* /*new*/ new_() {
27139 return gtk_text_layout_new();
27141 void changed(int y, int old_height, int new_height) {
27142 gtk_text_layout_changed(&this, y, old_height, new_height);
27145 // If the iterator is not fully in the range @top <= y < @bottom,
27146 // then, if possible, move it the minimum distance so that the
27147 // iterator in this range.
27148 // RETURNS: %TRUE if the iterator was moved, otherwise %FALSE.
27149 // <iter>: a #GtkTextIter
27150 // <top>: the top of the range
27151 // <bottom>: the bottom the range
27152 int clamp_iter_to_vrange(TextIter* iter, int top, int bottom) {
27153 return gtk_text_layout_clamp_iter_to_vrange(&this, iter, top, bottom);
27155 void cursors_changed(int y, int old_height, int new_height) {
27156 gtk_text_layout_cursors_changed(&this, y, old_height, new_height);
27158 void default_style_changed() {
27159 gtk_text_layout_default_style_changed(&this);
27161 void draw(Widget* widget, Gdk2.Drawable* drawable, Gdk2.GC* cursor_gc, int x_offset, int y_offset, int x, int y, int width, int height, GLib2.List** widgets) {
27162 gtk_text_layout_draw(&this, widget, drawable, cursor_gc, x_offset, y_offset, x, y, width, height, widgets);
27164 void free_line_data(TextLine* line, TextLineData* line_data) {
27165 gtk_text_layout_free_line_data(&this, line, line_data);
27167 void free_line_display(TextLineDisplay* display) {
27168 gtk_text_layout_free_line_display(&this, display);
27171 // Unintrospectable method: get_buffer() / gtk_text_layout_get_buffer()
27172 // Gets the text buffer used by the layout. See
27173 // gtk_text_layout_set_buffer().
27174 // RETURNS: the text buffer used by the layout.
27175 TextBuffer* get_buffer() {
27176 return gtk_text_layout_get_buffer(&this);
27179 // Given an iterator within a text layout, determine the positions of the
27180 // strong and weak cursors if the insertion point is at that
27181 // iterator. The position of each cursor is stored as a zero-width
27182 // rectangle. The strong cursor location is the location where
27183 // characters of the directionality equal to the base direction of the
27184 // paragraph are inserted. The weak cursor location is the location
27185 // where characters of the directionality opposite to the base
27186 // direction of the paragraph are inserted.
27187 // <iter>: a #GtkTextIter
27188 // <strong_pos>: location to store the strong cursor position (may be %NULL)
27189 // <weak_pos>: location to store the weak cursor position (may be %NULL)
27190 void get_cursor_locations(TextIter* iter, Gdk2.Rectangle* strong_pos=null, Gdk2.Rectangle* weak_pos=null) {
27191 gtk_text_layout_get_cursor_locations(&this, iter, strong_pos, weak_pos);
27194 // Returns whether the insertion cursor will be shown.
27195 // shown, even if the text is editable.
27196 // RETURNS: if %FALSE, the insertion cursor will not be
27197 int get_cursor_visible() {
27198 return gtk_text_layout_get_cursor_visible(&this);
27200 void get_iter_at_line(TextIter* iter, TextLine* line, int byte_offset) {
27201 gtk_text_layout_get_iter_at_line(&this, iter, line, byte_offset);
27203 void get_iter_at_pixel(TextIter* iter, int x, int y) {
27204 gtk_text_layout_get_iter_at_pixel(&this, iter, x, y);
27206 void get_iter_at_position(TextIter* iter, int* trailing, int x, int y) {
27207 gtk_text_layout_get_iter_at_position(&this, iter, trailing, x, y);
27209 void get_iter_location(TextIter* iter, Gdk2.Rectangle* rect) {
27210 gtk_text_layout_get_iter_location(&this, iter, rect);
27213 // Get the iter at the beginning of the line which is displayed
27214 // at the given y.
27215 // <target_iter>: the iterator in which the result is stored
27216 // <y>: the y positition
27217 // <line_top>: location to store the y coordinate of the top of the line. (Can by %NULL)
27218 void get_line_at_y(TextIter* target_iter, int y, int* line_top) {
27219 gtk_text_layout_get_line_at_y(&this, target_iter, y, line_top);
27221 // Unintrospectable method: get_line_display() / gtk_text_layout_get_line_display()
27222 TextLineDisplay* get_line_display(TextLine* line, int size_only) {
27223 return gtk_text_layout_get_line_display(&this, line, size_only);
27226 // Find the range of y coordinates for the paragraph containing
27227 // the given iter.
27228 // <iter>: a #GtkTextIter
27229 // <y>: location to store the top of the paragraph in pixels, or %NULL. or %NULL.
27230 void get_line_yrange(TextIter* iter, int* y, int* height) {
27231 gtk_text_layout_get_line_yrange(&this, iter, y, height);
27233 GLib2.SList* /*new container*/ get_lines(int top_y, int bottom_y, int* first_line_y) {
27234 return gtk_text_layout_get_lines(&this, top_y, bottom_y, first_line_y);
27236 void get_size(int* width, int* height) {
27237 gtk_text_layout_get_size(&this, width, height);
27239 void invalidate(TextIter* start, TextIter* end) {
27240 gtk_text_layout_invalidate(&this, start, end);
27242 void invalidate_cursors(TextIter* start, TextIter* end) {
27243 gtk_text_layout_invalidate_cursors(&this, start, end);
27246 // Check if there are any invalid regions in a #GtkTextLayout's buffer
27247 // RETURNS: %TRUE if any invalid regions were found
27248 int is_valid() {
27249 return gtk_text_layout_is_valid(&this);
27252 // Tests whether an iterator is at the start of a display line.
27253 // <iter>: iterator to test
27254 int iter_starts_line(TextIter* iter) {
27255 return gtk_text_layout_iter_starts_line(&this, iter);
27258 // Move to the beginning or end of a display line.
27259 // <direction>: if negative, move to beginning of line, otherwise
27260 int move_iter_to_line_end(TextIter* iter, int direction) {
27261 return gtk_text_layout_move_iter_to_line_end(&this, iter, direction);
27264 // Move the iterator to the beginning of the next line. The
27265 // lines of a wrapped paragraph are treated as distinct for
27266 // this operation.
27267 // <iter>: a #GtkTextIter
27268 int move_iter_to_next_line(TextIter* iter) {
27269 return gtk_text_layout_move_iter_to_next_line(&this, iter);
27272 // Move the iterator to the beginning of the previous line. The lines
27273 // of a wrapped paragraph are treated as distinct for this operation.
27274 // <iter>: a #GtkTextIter
27275 int move_iter_to_previous_line(TextIter* iter) {
27276 return gtk_text_layout_move_iter_to_previous_line(&this, iter);
27279 // Keeping the iterator on the same line of the layout, move it to the
27280 // specified X coordinate. The lines of a wrapped paragraph are
27281 // treated as distinct for this operation.
27282 // <iter>: a #GtkTextIter
27283 // <x>: X coordinate
27284 void move_iter_to_x(TextIter* iter, int x) {
27285 gtk_text_layout_move_iter_to_x(&this, iter, x);
27288 // Move the iterator a given number of characters visually, treating
27289 // it as the strong cursor position. If @count is positive, then the
27290 // new strong cursor position will be @count positions to the right of
27291 // the old cursor position. If @count is negative then the new strong
27292 // cursor position will be @count positions to the left of the old
27293 // cursor position.
27294 // In the presence of bidirection text, the correspondence
27295 // between logical and visual order will depend on the direction
27296 // of the current run, and there may be jumps when the cursor
27297 // is moved off of the end of a run.
27298 // <iter>: a #GtkTextIter
27299 // <count>: number of characters to move (negative moves left, positive moves right)
27300 int move_iter_visually(TextIter* iter, int count) {
27301 return gtk_text_layout_move_iter_visually(&this, iter, count);
27303 void set_buffer(TextBuffer* buffer=null) {
27304 gtk_text_layout_set_buffer(&this, buffer);
27306 void set_contexts(Pango.Context* ltr_context, Pango.Context* rtl_context) {
27307 gtk_text_layout_set_contexts(&this, ltr_context, rtl_context);
27310 // Sets which text directions (left-to-right and/or right-to-left) for
27311 // which cursors will be drawn for the insertion point. The visual
27312 // point at which new text is inserted depends on whether the new
27313 // text is right-to-left or left-to-right, so it may be desired to
27314 // make the drawn position of the cursor depend on the keyboard state.
27315 // <direction>: the new direction(s) for which to draw cursors. %GTK_TEXT_DIR_NONE means draw cursors for both left-to-right insertion and right-to-left insertion. (The two cursors will be visually distinguished.)
27316 void set_cursor_direction(TextDirection direction) {
27317 gtk_text_layout_set_cursor_direction(&this, direction);
27320 // Sets whether the insertion cursor should be shown. Generally,
27321 // widgets using #GtkTextLayout will hide the cursor when the
27322 // widget does not have the input focus.
27323 // <cursor_visible>: If %FALSE, then the insertion cursor will not be shown, even if the text is editable.
27324 void set_cursor_visible(int cursor_visible) {
27325 gtk_text_layout_set_cursor_visible(&this, cursor_visible);
27327 void set_default_style(TextAttributes* values) {
27328 gtk_text_layout_set_default_style(&this, values);
27331 // Sets the keyboard direction; this is used as for the bidirectional
27332 // base direction for the line with the cursor if the line contains
27333 // only neutral characters.
27334 // <keyboard_dir>: the current direction of the keyboard.
27335 void set_keyboard_direction(TextDirection keyboard_dir) {
27336 gtk_text_layout_set_keyboard_direction(&this, keyboard_dir);
27339 // Sets overwrite mode
27340 // <overwrite>: overwrite mode
27341 void set_overwrite_mode(int overwrite) {
27342 gtk_text_layout_set_overwrite_mode(&this, overwrite);
27345 // Set the preedit string and attributes. The preedit string is a
27346 // string showing text that is currently being edited and not
27347 // yet committed into the buffer.
27348 // <preedit_string>: a string to display at the insertion point
27349 // <preedit_attrs>: a #PangoAttrList of attributes that apply to @preedit_string
27350 // <cursor_pos>: position of cursor within preedit string in chars
27351 void set_preedit_string(char* preedit_string, Pango.AttrList* preedit_attrs, int cursor_pos) {
27352 gtk_text_layout_set_preedit_string(&this, preedit_string, preedit_attrs, cursor_pos);
27354 void set_screen_width(int width) {
27355 gtk_text_layout_set_screen_width(&this, width);
27357 void spew() {
27358 gtk_text_layout_spew(&this);
27361 // Validate regions of a #GtkTextLayout. The ::changed signal will
27362 // be emitted for each region validated.
27363 // <max_pixels>: the maximum number of pixels to validate. (No more than one paragraph beyond this limit will be validated)
27364 void validate(int max_pixels) {
27365 gtk_text_layout_validate(&this, max_pixels);
27368 // Ensure that a region of a #GtkTextLayout is valid. The ::changed
27369 // signal will be emitted if any lines are validated.
27370 // <y0_>: offset from the top of the line pointed to by @anchor at which to begin validation. (The offset here is in pixels after validation.)
27371 // <y1_>: offset from the top of the line pointed to by @anchor at which to end validation. (The offset here is in pixels after validation.)
27372 void validate_yrange(TextIter* anchor_line, int y0_, int y1_) {
27373 gtk_text_layout_validate_yrange(&this, anchor_line, y0_, y1_);
27375 // Unintrospectable method: wrap() / gtk_text_layout_wrap()
27376 TextLineData* wrap(TextLine* line, TextLineData* line_data) {
27377 return gtk_text_layout_wrap(&this, line, line_data);
27379 void wrap_loop_end() {
27380 gtk_text_layout_wrap_loop_end(&this);
27382 void wrap_loop_start() {
27383 gtk_text_layout_wrap_loop_start(&this);
27385 extern (C) alias static void function (TextLayout* this_, Object* object, int p0, int p1, void* user_data=null) signal_allocate_child;
27387 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27388 return super_.signal_connect!name(cb, data, cf);
27391 ulong signal_connect(string name:"allocate-child", CB/*:signal_allocate_child*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27392 return signal_connect_data(&this, cast(char*)"allocate-child",
27393 cast(GObject2.Callback)cb, data, null, cf);
27395 extern (C) alias static void function (TextLayout* this_, int object, int p0, int p1, void* user_data=null) signal_changed;
27396 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27397 return signal_connect_data(&this, cast(char*)"changed",
27398 cast(GObject2.Callback)cb, data, null, cf);
27400 extern (C) alias static void function (TextLayout* this_, void* user_data=null) signal_invalidated;
27401 ulong signal_connect(string name:"invalidated", CB/*:signal_invalidated*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27402 return signal_connect_data(&this, cast(char*)"invalidated",
27403 cast(GObject2.Callback)cb, data, null, cf);
27407 struct TextLayoutClass {
27408 GObject2.ObjectClass parent_class;
27409 extern (C) void function (TextLayout* layout) invalidated;
27410 extern (C) void function (TextLayout* layout, int y, int old_height, int new_height) changed;
27411 // Unintrospectable functionp: wrap() / ()
27412 extern (C) TextLineData* function (TextLayout* layout, TextLine* line, TextLineData* line_data) wrap;
27413 extern (C) void function (TextLayout* layout, TextLine* line, Pango.LogAttr** attrs, int* n_attrs) get_log_attrs;
27414 extern (C) void function (TextLayout* layout, TextIter* start, TextIter* end) invalidate;
27415 extern (C) void function (TextLayout* layout, TextLine* line, TextLineData* line_data) free_line_data;
27416 extern (C) void function (TextLayout* layout, Widget* child, int x, int y) allocate_child;
27417 extern (C) void function (TextLayout* layout, TextIter* start, TextIter* end) invalidate_cursors;
27418 extern (C) void function () _gtk_reserved1;
27419 extern (C) void function () _gtk_reserved2;
27420 extern (C) void function () _gtk_reserved3;
27423 struct TextLine {
27426 struct TextLineData {
27429 struct TextLineDisplay {
27430 Pango.Layout* layout;
27431 GLib2.SList* cursors, shaped_objects;
27432 TextDirection direction;
27433 int width, total_width, height, x_offset, left_margin, right_margin, top_margin, bottom_margin, insert_index;
27434 int size_only;
27435 TextLine* line;
27436 Gdk2.Color* pg_bg_color;
27437 Gdk2.Rectangle block_cursor;
27438 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27439 uint, "cursors_invalid", 1,
27440 uint, "has_block_cursor", 1,
27441 uint, "cursor_at_line_end", 1,
27442 uint, "__dummy32A", 29));
27445 struct TextLogAttrCache {
27448 struct TextMark /* : GObject.Object */ {
27449 alias parent_instance this;
27450 alias parent_instance super_;
27451 alias parent_instance object;
27452 GObject2.Object parent_instance;
27453 void* segment;
27456 // Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark().
27457 // If @name is %NULL, the mark is anonymous; otherwise, the mark can be
27458 // retrieved by name using gtk_text_buffer_get_mark(). If a mark has left
27459 // gravity, and text is inserted at the mark's current location, the mark
27460 // will be moved to the left of the newly-inserted text. If the mark has
27461 // right gravity (@left_gravity = %FALSE), the mark will end up on the
27462 // right of newly-inserted text. The standard left-to-right cursor is a
27463 // mark with right gravity (when you type, the cursor stays on the right
27464 // side of the text you're typing).
27465 // RETURNS: new #GtkTextMark
27466 // <name>: mark name or %NULL
27467 // <left_gravity>: whether the mark should have left gravity
27468 static TextMark* /*new*/ new_(char* name, int left_gravity) {
27469 return gtk_text_mark_new(name, left_gravity);
27472 // Gets the buffer this mark is located inside,
27473 // or %NULL if the mark is deleted.
27474 // RETURNS: the mark's #GtkTextBuffer
27475 TextBuffer* get_buffer() {
27476 return gtk_text_mark_get_buffer(&this);
27479 // Returns %TRUE if the mark has been removed from its buffer
27480 // with gtk_text_buffer_delete_mark(). See gtk_text_buffer_add_mark()
27481 // for a way to add it to a buffer again.
27482 // RETURNS: whether the mark is deleted
27483 int get_deleted() {
27484 return gtk_text_mark_get_deleted(&this);
27487 // Determines whether the mark has left gravity.
27488 // RETURNS: %TRUE if the mark has left gravity, %FALSE otherwise
27489 int get_left_gravity() {
27490 return gtk_text_mark_get_left_gravity(&this);
27493 // Returns the mark name; returns NULL for anonymous marks.
27494 // RETURNS: mark name
27495 char* get_name() {
27496 return gtk_text_mark_get_name(&this);
27499 // Returns %TRUE if the mark is visible (i.e. a cursor is displayed
27500 // for it).
27501 // RETURNS: %TRUE if visible
27502 int get_visible() {
27503 return gtk_text_mark_get_visible(&this);
27506 // Sets the visibility of @mark; the insertion point is normally
27507 // visible, i.e. you can see it as a vertical bar. Also, the text
27508 // widget uses a visible mark to indicate where a drop will occur when
27509 // dragging-and-dropping text. Most other marks are not visible.
27510 // Marks are not visible by default.
27511 // <setting>: visibility of mark
27512 void set_visible(int setting) {
27513 gtk_text_mark_set_visible(&this, setting);
27517 struct TextMarkClass {
27518 GObject2.ObjectClass parent_class;
27519 extern (C) void function () _gtk_reserved1;
27520 extern (C) void function () _gtk_reserved2;
27521 extern (C) void function () _gtk_reserved3;
27522 extern (C) void function () _gtk_reserved4;
27525 struct TextPendingScroll {
27528 enum TextSearchFlags {
27529 VISIBLE_ONLY = 1,
27530 TEXT_ONLY = 2
27532 struct TextTag /* : GObject.Object */ {
27533 alias parent_instance this;
27534 alias parent_instance super_;
27535 alias parent_instance object;
27536 GObject2.Object parent_instance;
27537 TextTagTable* table;
27538 char* name;
27539 int priority;
27540 TextAttributes* values;
27541 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27542 uint, "bg_color_set", 1,
27543 uint, "bg_stipple_set", 1,
27544 uint, "fg_color_set", 1,
27545 uint, "scale_set", 1,
27546 uint, "fg_stipple_set", 1,
27547 uint, "justification_set", 1,
27548 uint, "left_margin_set", 1,
27549 uint, "indent_set", 1,
27550 uint, "rise_set", 1,
27551 uint, "strikethrough_set", 1,
27552 uint, "right_margin_set", 1,
27553 uint, "pixels_above_lines_set", 1,
27554 uint, "pixels_below_lines_set", 1,
27555 uint, "pixels_inside_wrap_set", 1,
27556 uint, "tabs_set", 1,
27557 uint, "underline_set", 1,
27558 uint, "wrap_mode_set", 1,
27559 uint, "bg_full_height_set", 1,
27560 uint, "invisible_set", 1,
27561 uint, "editable_set", 1,
27562 uint, "language_set", 1,
27563 uint, "pg_bg_color_set", 1,
27564 uint, "accumulative_margin", 1,
27565 uint, "pad1", 1,
27566 uint, "__dummy32A", 8));
27569 // Creates a #GtkTextTag. Configure the tag using object arguments,
27570 // i.e. using g_object_set().
27571 // RETURNS: a new #GtkTextTag
27572 // <name>: tag name, or %NULL
27573 static TextTag* /*new*/ new_(char* name=null) {
27574 return gtk_text_tag_new(name);
27577 // Emits the "event" signal on the #GtkTextTag.
27578 // RETURNS: result of signal emission (whether the event was handled)
27579 // <event_object>: object that received the event, such as a widget
27580 // <event>: the event
27581 // <iter>: location where the event was received
27582 int event(GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter) {
27583 return gtk_text_tag_event(&this, event_object, event, iter);
27586 // Get the tag priority.
27587 // RETURNS: The tag's priority.
27588 int get_priority() {
27589 return gtk_text_tag_get_priority(&this);
27592 // Sets the priority of a #GtkTextTag. Valid priorities are
27593 // start at 0 and go to one less than gtk_text_tag_table_get_size().
27594 // Each tag in a table has a unique priority; setting the priority
27595 // of one tag shifts the priorities of all the other tags in the
27596 // table to maintain a unique priority for each tag. Higher priority
27597 // tags "win" if two tags both set the same text attribute. When adding
27598 // a tag to a tag table, it will be assigned the highest priority in
27599 // the table by default; so normally the precedence of a set of tags
27600 // is the order in which they were added to the table, or created with
27601 // gtk_text_buffer_create_tag(), which adds the tag to the buffer's table
27602 // automatically.
27603 // <priority>: the new priority
27604 void set_priority(int priority) {
27605 gtk_text_tag_set_priority(&this, priority);
27608 // The ::event signal is emitted when an event occurs on a region of the
27609 // buffer marked with this tag.
27610 // event. %FALSE to propagate the event further.
27611 // RETURNS: %TRUE to stop other handlers from being invoked for the
27612 // <object>: the object the event was fired from (typically a #GtkTextView)
27613 // <event>: the event which triggered the signal
27614 // <iter>: a #GtkTextIter pointing at the location the event occured
27615 extern (C) alias static c_int function (TextTag* this_, GObject2.Object* object, Gdk2.Event* event, TextIter* iter, void* user_data=null) signal_event;
27617 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27618 return super_.signal_connect!name(cb, data, cf);
27621 ulong signal_connect(string name:"event", CB/*:signal_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27622 return signal_connect_data(&this, cast(char*)"event",
27623 cast(GObject2.Callback)cb, data, null, cf);
27627 struct TextTagClass {
27628 GObject2.ObjectClass parent_class;
27630 // RETURNS: result of signal emission (whether the event was handled)
27631 // <event_object>: object that received the event, such as a widget
27632 // <event>: the event
27633 // <iter>: location where the event was received
27634 extern (C) int function (TextTag* tag, GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter) event;
27635 extern (C) void function () _gtk_reserved1;
27636 extern (C) void function () _gtk_reserved2;
27637 extern (C) void function () _gtk_reserved3;
27638 extern (C) void function () _gtk_reserved4;
27642 // You may wish to begin by reading the <link linkend="TextWidget">text widget
27643 // conceptual overview</link> which gives an overview of all the objects and data
27644 // types related to the text widget and how they work together.
27645 // <refsect2 id="GtkTextTagTable-BUILDER-UI">
27646 // <title>GtkTextTagTables as GtkBuildable</title>
27647 // <para>
27648 // The GtkTextTagTable implementation of the GtkBuildable interface
27649 // supports adding tags by specifying "tag" as the "type"
27650 // attribute of a &lt;child&gt; element.
27651 // </para>
27652 // <example>
27653 // <title>A UI definition fragment specifying tags</title>
27654 // <programlisting><![CDATA[
27655 // <object class="GtkTextTagTable">
27656 // <child type="tag">
27657 // <object class="GtkTextTag"/>
27658 // </child>
27659 // </object>
27660 // ]]></programlisting>
27661 // </example>
27662 // </refsect2>
27663 struct TextTagTable /* : GObject.Object */ {
27664 alias parent_instance this;
27665 alias parent_instance super_;
27666 alias parent_instance object;
27667 GObject2.Object parent_instance;
27668 GLib2.HashTable* hash;
27669 GLib2.SList* anonymous;
27670 int anon_count;
27671 GLib2.SList* buffers;
27674 // Creates a new #GtkTextTagTable. The table contains no tags by
27675 // default.
27676 // RETURNS: a new #GtkTextTagTable
27677 static TextTagTable* /*new*/ new_() {
27678 return gtk_text_tag_table_new();
27681 // Add a tag to the table. The tag is assigned the highest priority
27682 // in the table.
27683 // the same name as an already-added tag.
27684 // <tag>: a #GtkTextTag
27685 void add(TextTag* tag) {
27686 gtk_text_tag_table_add(&this, tag);
27689 // Calls @func on each tag in @table, with user data @data.
27690 // Note that the table may not be modified while iterating
27691 // over it (you can't add/remove tags).
27692 // <func>: a function to call on each tag
27693 // <data>: user data
27694 void foreach_(TextTagTableForeach func, void* data) {
27695 gtk_text_tag_table_foreach(&this, func, data);
27698 // Returns the size of the table (number of tags)
27699 // RETURNS: number of tags in @table
27700 int get_size() {
27701 return gtk_text_tag_table_get_size(&this);
27704 // Look up a named tag.
27705 // RETURNS: The tag, or %NULL if none by that name is in the table.
27706 // <name>: name of a tag
27707 TextTag* lookup(char* name) {
27708 return gtk_text_tag_table_lookup(&this, name);
27711 // Remove a tag from the table. This will remove the table's
27712 // reference to the tag, so be careful - the tag will end
27713 // up destroyed if you don't have a reference to it.
27714 // <tag>: a #GtkTextTag
27715 void remove(TextTag* tag) {
27716 gtk_text_tag_table_remove(&this, tag);
27718 extern (C) alias static void function (TextTagTable* this_, TextTag* object, void* user_data=null) signal_tag_added;
27720 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27721 return super_.signal_connect!name(cb, data, cf);
27724 ulong signal_connect(string name:"tag-added", CB/*:signal_tag_added*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27725 return signal_connect_data(&this, cast(char*)"tag-added",
27726 cast(GObject2.Callback)cb, data, null, cf);
27728 extern (C) alias static void function (TextTagTable* this_, TextTag* object, c_int p0, void* user_data=null) signal_tag_changed;
27729 ulong signal_connect(string name:"tag-changed", CB/*:signal_tag_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27730 return signal_connect_data(&this, cast(char*)"tag-changed",
27731 cast(GObject2.Callback)cb, data, null, cf);
27733 extern (C) alias static void function (TextTagTable* this_, TextTag* object, void* user_data=null) signal_tag_removed;
27734 ulong signal_connect(string name:"tag-removed", CB/*:signal_tag_removed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27735 return signal_connect_data(&this, cast(char*)"tag-removed",
27736 cast(GObject2.Callback)cb, data, null, cf);
27740 struct TextTagTableClass {
27741 GObject2.ObjectClass parent_class;
27742 extern (C) void function (TextTagTable* table, TextTag* tag, int size_changed) tag_changed;
27743 extern (C) void function (TextTagTable* table, TextTag* tag) tag_added;
27744 extern (C) void function (TextTagTable* table, TextTag* tag) tag_removed;
27745 extern (C) void function () _gtk_reserved1;
27746 extern (C) void function () _gtk_reserved2;
27747 extern (C) void function () _gtk_reserved3;
27748 extern (C) void function () _gtk_reserved4;
27751 extern (C) alias void function (TextTag* tag, void* data) TextTagTableForeach;
27753 struct TextView /* : Container */ {
27754 alias parent_instance this;
27755 alias parent_instance super_;
27756 alias parent_instance container;
27757 Container parent_instance;
27758 void** layout;
27759 TextBuffer* buffer;
27760 uint selection_drag_handler, scroll_timeout;
27761 int pixels_above_lines, pixels_below_lines, pixels_inside_wrap;
27762 WrapMode wrap_mode;
27763 Justification justify;
27764 int left_margin, right_margin, indent;
27765 Pango.TabArray* tabs;
27766 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27767 uint, "editable", 1,
27768 uint, "overwrite_mode", 1,
27769 uint, "cursor_visible", 1,
27770 uint, "need_im_reset", 1,
27771 uint, "accepts_tab", 1,
27772 uint, "width_changed", 1,
27773 uint, "onscreen_validated", 1,
27774 uint, "mouse_cursor_obscured", 1,
27775 uint, "__dummy32A", 24));
27776 TextWindow* text_window, left_window, right_window, top_window, bottom_window;
27777 Adjustment* hadjustment, vadjustment;
27778 int xoffset, yoffset, width, height, virtual_cursor_x, virtual_cursor_y;
27779 TextMark* first_para_mark;
27780 int first_para_pixels;
27781 TextMark* dnd_mark;
27782 uint blink_timeout, first_validate_idle, incremental_validate_idle;
27783 IMContext* im_context;
27784 Widget* popup_menu;
27785 int drag_start_x, drag_start_y;
27786 GLib2.SList* children;
27787 TextPendingScroll* pending_scroll;
27788 int pending_place_cursor_button;
27791 // Creates a new #GtkTextView. If you don't call gtk_text_view_set_buffer()
27792 // before using the text view, an empty default buffer will be created
27793 // for you. Get the buffer with gtk_text_view_get_buffer(). If you want
27794 // to specify your own buffer, consider gtk_text_view_new_with_buffer().
27795 // RETURNS: a new #GtkTextView
27796 static TextView* new_() {
27797 return gtk_text_view_new();
27800 // Creates a new #GtkTextView widget displaying the buffer
27801 // this function is equivalent to gtk_text_view_new(). The
27802 // text view adds its own reference count to the buffer; it does not
27803 // take over an existing reference.
27804 // RETURNS: a new #GtkTextView.
27805 // <buffer>: a #GtkTextBuffer
27806 static TextView* new_with_buffer(TextBuffer* buffer) {
27807 return gtk_text_view_new_with_buffer(buffer);
27810 // Adds a child widget in the text buffer, at the given @anchor.
27811 // <child>: a #GtkWidget
27812 // <anchor>: a #GtkTextChildAnchor in the #GtkTextBuffer for @text_view
27813 void add_child_at_anchor(Widget* child, TextChildAnchor* anchor) {
27814 gtk_text_view_add_child_at_anchor(&this, child, anchor);
27817 // Adds a child at fixed coordinates in one of the text widget's
27818 // windows. The window must have nonzero size (see
27819 // gtk_text_view_set_border_window_size()). Note that the child
27820 // coordinates are given relative to the #GdkWindow in question, and
27821 // that these coordinates have no sane relationship to scrolling. When
27822 // placing a child in #GTK_TEXT_WINDOW_WIDGET, scrolling is
27823 // irrelevant, the child floats above all scrollable areas. But when
27824 // placing a child in one of the scrollable windows (border windows or
27825 // text window), you'll need to compute the child's correct position
27826 // in buffer coordinates any time scrolling occurs or buffer changes
27827 // occur, and then call gtk_text_view_move_child() to update the
27828 // child's position. Unfortunately there's no good way to detect that
27829 // scrolling has occurred, using the current API; a possible hack
27830 // would be to update all child positions when the scroll adjustments
27831 // change or the text buffer changes. See bug 64518 on
27832 // bugzilla.gnome.org for status of fixing this issue.
27833 // <child>: a #GtkWidget
27834 // <which_window>: which window the child should appear in
27835 // <xpos>: X position of child in window coordinates
27836 // <ypos>: Y position of child in window coordinates
27837 void add_child_in_window(Widget* child, TextWindowType which_window, int xpos, int ypos) {
27838 gtk_text_view_add_child_in_window(&this, child, which_window, xpos, ypos);
27841 // Moves the given @iter backward by one display (wrapped) line.
27842 // A display line is different from a paragraph. Paragraphs are
27843 // separated by newlines or other paragraph separator characters.
27844 // Display lines are created by line-wrapping a paragraph. If
27845 // wrapping is turned off, display lines and paragraphs will be the
27846 // same. Display lines are divided differently for each view, since
27847 // they depend on the view's width; paragraphs are the same in all
27848 // views, since they depend on the contents of the #GtkTextBuffer.
27849 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
27850 // <iter>: a #GtkTextIter
27851 int backward_display_line(TextIter* iter) {
27852 return gtk_text_view_backward_display_line(&this, iter);
27855 // Moves the given @iter backward to the next display line start.
27856 // A display line is different from a paragraph. Paragraphs are
27857 // separated by newlines or other paragraph separator characters.
27858 // Display lines are created by line-wrapping a paragraph. If
27859 // wrapping is turned off, display lines and paragraphs will be the
27860 // same. Display lines are divided differently for each view, since
27861 // they depend on the view's width; paragraphs are the same in all
27862 // views, since they depend on the contents of the #GtkTextBuffer.
27863 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
27864 // <iter>: a #GtkTextIter
27865 int backward_display_line_start(TextIter* iter) {
27866 return gtk_text_view_backward_display_line_start(&this, iter);
27869 // Converts coordinate (@buffer_x, @buffer_y) to coordinates for the window
27870 // Note that you can't convert coordinates for a nonexisting window (see
27871 // gtk_text_view_set_border_window_size()).
27872 // <win>: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
27873 // <buffer_x>: buffer x coordinate
27874 // <buffer_y>: buffer y coordinate
27875 // <window_x>: window x coordinate return location or %NULL
27876 // <window_y>: window y coordinate return location or %NULL
27877 void buffer_to_window_coords(TextWindowType win, int buffer_x, int buffer_y, /*out*/ int* window_x=null, /*out*/ int* window_y=null) {
27878 gtk_text_view_buffer_to_window_coords(&this, win, buffer_x, buffer_y, window_x, window_y);
27881 // Moves the given @iter forward by one display (wrapped) line.
27882 // A display line is different from a paragraph. Paragraphs are
27883 // separated by newlines or other paragraph separator characters.
27884 // Display lines are created by line-wrapping a paragraph. If
27885 // wrapping is turned off, display lines and paragraphs will be the
27886 // same. Display lines are divided differently for each view, since
27887 // they depend on the view's width; paragraphs are the same in all
27888 // views, since they depend on the contents of the #GtkTextBuffer.
27889 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
27890 // <iter>: a #GtkTextIter
27891 int forward_display_line(TextIter* iter) {
27892 return gtk_text_view_forward_display_line(&this, iter);
27895 // Moves the given @iter forward to the next display line end.
27896 // A display line is different from a paragraph. Paragraphs are
27897 // separated by newlines or other paragraph separator characters.
27898 // Display lines are created by line-wrapping a paragraph. If
27899 // wrapping is turned off, display lines and paragraphs will be the
27900 // same. Display lines are divided differently for each view, since
27901 // they depend on the view's width; paragraphs are the same in all
27902 // views, since they depend on the contents of the #GtkTextBuffer.
27903 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
27904 // <iter>: a #GtkTextIter
27905 int forward_display_line_end(TextIter* iter) {
27906 return gtk_text_view_forward_display_line_end(&this, iter);
27909 // Returns whether pressing the Tab key inserts a tab characters.
27910 // gtk_text_view_set_accepts_tab().
27911 // %FALSE if pressing the Tab key moves the keyboard focus.
27912 // RETURNS: %TRUE if pressing the Tab key inserts a tab character,
27913 int get_accepts_tab() {
27914 return gtk_text_view_get_accepts_tab(&this);
27917 // Gets the width of the specified border window. See
27918 // gtk_text_view_set_border_window_size().
27919 // RETURNS: width of window
27920 // <type>: window to return size from
27921 int get_border_window_size(TextWindowType type) {
27922 return gtk_text_view_get_border_window_size(&this, type);
27925 // Returns the #GtkTextBuffer being displayed by this text view.
27926 // The reference count on the buffer is not incremented; the caller
27927 // of this function won't own a new reference.
27928 // RETURNS: a #GtkTextBuffer
27929 TextBuffer* get_buffer() {
27930 return gtk_text_view_get_buffer(&this);
27933 // Find out whether the cursor is being displayed.
27934 // RETURNS: whether the insertion mark is visible
27935 int get_cursor_visible() {
27936 return gtk_text_view_get_cursor_visible(&this);
27939 // Obtains a copy of the default text attributes. These are the
27940 // attributes used for text unless a tag overrides them.
27941 // You'd typically pass the default attributes in to
27942 // gtk_text_iter_get_attributes() in order to get the
27943 // attributes in effect at a given text position.
27944 // The return value is a copy owned by the caller of this function,
27945 // and should be freed.
27946 // RETURNS: a new #GtkTextAttributes
27947 TextAttributes* /*new*/ get_default_attributes() {
27948 return gtk_text_view_get_default_attributes(&this);
27951 // Returns the default editability of the #GtkTextView. Tags in the
27952 // buffer may override this setting for some ranges of text.
27953 // RETURNS: whether text is editable by default
27954 int get_editable() {
27955 return gtk_text_view_get_editable(&this);
27958 // Gets the horizontal-scrolling #GtkAdjustment.
27959 // RETURNS: pointer to the horizontal #GtkAdjustment
27960 Adjustment* get_hadjustment() {
27961 return gtk_text_view_get_hadjustment(&this);
27964 // Gets the default indentation of paragraphs in @text_view.
27965 // Tags in the view's buffer may override the default.
27966 // The indentation may be negative.
27967 // RETURNS: number of pixels of indentation
27968 int get_indent() {
27969 return gtk_text_view_get_indent(&this);
27972 // Retrieves the iterator at buffer coordinates @x and @y. Buffer
27973 // coordinates are coordinates for the entire buffer, not just the
27974 // currently-displayed portion. If you have coordinates from an
27975 // event, you have to convert those to buffer coordinates with
27976 // gtk_text_view_window_to_buffer_coords().
27977 // <iter>: a #GtkTextIter
27978 // <x>: x position, in buffer coordinates
27979 // <y>: y position, in buffer coordinates
27980 void get_iter_at_location(/*out*/ TextIter* iter, int x, int y) {
27981 gtk_text_view_get_iter_at_location(&this, iter, x, y);
27984 // Retrieves the iterator pointing to the character at buffer
27985 // coordinates @x and @y. Buffer coordinates are coordinates for
27986 // the entire buffer, not just the currently-displayed portion.
27987 // If you have coordinates from an event, you have to convert
27988 // those to buffer coordinates with
27989 // gtk_text_view_window_to_buffer_coords().
27990 // Note that this is different from gtk_text_view_get_iter_at_location(),
27991 // which returns cursor locations, i.e. positions <emphasis>between</emphasis>
27992 // characters.
27993 // <iter>: a #GtkTextIter
27994 // <trailing>: if non-%NULL, location to store an integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.
27995 // <x>: x position, in buffer coordinates
27996 // <y>: y position, in buffer coordinates
27997 void get_iter_at_position(/*out*/ TextIter* iter, /*out*/ int* trailing, int x, int y) {
27998 gtk_text_view_get_iter_at_position(&this, iter, trailing, x, y);
28001 // Gets a rectangle which roughly contains the character at @iter.
28002 // The rectangle position is in buffer coordinates; use
28003 // gtk_text_view_buffer_to_window_coords() to convert these
28004 // coordinates to coordinates for one of the windows in the text view.
28005 // <iter>: a #GtkTextIter
28006 // <location>: bounds of the character at @iter
28007 void get_iter_location(TextIter* iter, /*out*/ Gdk2.Rectangle* location) {
28008 gtk_text_view_get_iter_location(&this, iter, location);
28011 // Gets the default justification of paragraphs in @text_view.
28012 // Tags in the buffer may override the default.
28013 // RETURNS: default justification
28014 Justification get_justification() {
28015 return gtk_text_view_get_justification(&this);
28018 // Gets the default left margin size of paragraphs in the @text_view.
28019 // Tags in the buffer may override the default.
28020 // RETURNS: left margin in pixels
28021 int get_left_margin() {
28022 return gtk_text_view_get_left_margin(&this);
28025 // Gets the #GtkTextIter at the start of the line containing
28026 // the coordinate @y. @y is in buffer coordinates, convert from
28027 // window coordinates with gtk_text_view_window_to_buffer_coords().
28028 // If non-%NULL, @line_top will be filled with the coordinate of the top
28029 // edge of the line.
28030 // <target_iter>: a #GtkTextIter
28031 // <y>: a y coordinate
28032 // <line_top>: return location for top coordinate of the line
28033 void get_line_at_y(/*out*/ TextIter* target_iter, int y, /*out*/ int* line_top) {
28034 gtk_text_view_get_line_at_y(&this, target_iter, y, line_top);
28037 // Gets the y coordinate of the top of the line containing @iter,
28038 // and the height of the line. The coordinate is a buffer coordinate;
28039 // convert to window coordinates with gtk_text_view_buffer_to_window_coords().
28040 // <iter>: a #GtkTextIter
28041 // <y>: return location for a y coordinate
28042 // <height>: return location for a height
28043 void get_line_yrange(TextIter* iter, /*out*/ int* y, /*out*/ int* height) {
28044 gtk_text_view_get_line_yrange(&this, iter, y, height);
28047 // Returns whether the #GtkTextView is in overwrite mode or not.
28048 // RETURNS: whether @text_view is in overwrite mode or not.
28049 int get_overwrite() {
28050 return gtk_text_view_get_overwrite(&this);
28053 // Gets the default number of pixels to put above paragraphs.
28054 // RETURNS: default number of pixels above paragraphs
28055 int get_pixels_above_lines() {
28056 return gtk_text_view_get_pixels_above_lines(&this);
28059 // Gets the value set by gtk_text_view_set_pixels_below_lines().
28060 // RETURNS: default number of blank pixels below paragraphs
28061 int get_pixels_below_lines() {
28062 return gtk_text_view_get_pixels_below_lines(&this);
28065 // Gets the value set by gtk_text_view_set_pixels_inside_wrap().
28066 // RETURNS: default number of pixels of blank space between wrapped lines
28067 int get_pixels_inside_wrap() {
28068 return gtk_text_view_get_pixels_inside_wrap(&this);
28071 // Gets the default right margin for text in @text_view. Tags
28072 // in the buffer may override the default.
28073 // RETURNS: right margin in pixels
28074 int get_right_margin() {
28075 return gtk_text_view_get_right_margin(&this);
28078 // Gets the default tabs for @text_view. Tags in the buffer may
28079 // override the defaults. The returned array will be %NULL if
28080 // "standard" (8-space) tabs are used. Free the return value
28081 // with pango_tab_array_free().
28082 // tabs are used; must be freed with pango_tab_array_free().
28083 // RETURNS: copy of default tab array, or %NULL if "standard"
28084 Pango.TabArray* /*new*/ get_tabs() {
28085 return gtk_text_view_get_tabs(&this);
28088 // Gets the vertical-scrolling #GtkAdjustment.
28089 // RETURNS: pointer to the vertical #GtkAdjustment
28090 Adjustment* get_vadjustment() {
28091 return gtk_text_view_get_vadjustment(&this);
28094 // Fills @visible_rect with the currently-visible
28095 // region of the buffer, in buffer coordinates. Convert to window coordinates
28096 // with gtk_text_view_buffer_to_window_coords().
28097 // <visible_rect>: rectangle to fill
28098 void get_visible_rect(/*out*/ Gdk2.Rectangle* visible_rect) {
28099 gtk_text_view_get_visible_rect(&this, visible_rect);
28102 // Retrieves the #GdkWindow corresponding to an area of the text view;
28103 // possible windows include the overall widget window, child windows
28104 // on the left, right, top, bottom, and the window that displays the
28105 // text buffer. Windows are %NULL and nonexistent if their width or
28106 // height is 0, and are nonexistent before the widget has been
28107 // realized.
28108 // RETURNS: a #GdkWindow, or %NULL
28109 // <win>: window to get
28110 Gdk2.Window* get_window(TextWindowType win) {
28111 return gtk_text_view_get_window(&this, win);
28114 // Usually used to find out which window an event corresponds to.
28115 // If you connect to an event signal on @text_view, this function
28116 // should be called on <literal>event-&gt;window</literal> to
28117 // see which window it was.
28118 // RETURNS: the window type.
28119 // <window>: a window type
28120 TextWindowType get_window_type(Gdk2.Window* window) {
28121 return gtk_text_view_get_window_type(&this, window);
28124 // Gets the line wrapping for the view.
28125 // RETURNS: the line wrap setting
28126 WrapMode get_wrap_mode() {
28127 return gtk_text_view_get_wrap_mode(&this);
28130 // Allow the #GtkTextView input method to internally handle key press
28131 // and release events. If this function returns %TRUE, then no further
28132 // processing should be done for this key event. See
28133 // gtk_im_context_filter_keypress().
28134 // Note that you are expected to call this function from your handler
28135 // when overriding key event handling. This is needed in the case when
28136 // you need to insert your own key handling between the input method
28137 // and the default key event handling of the #GtkTextView.
28138 // |[
28139 // static gboolean
28140 // gtk_foo_bar_key_press_event (GtkWidget *widget,
28141 // GdkEventKey *event)
28142 // {
28143 // if ((key->keyval == GDK_Return || key->keyval == GDK_KP_Enter))
28144 // {
28145 // if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (view), event))
28146 // return TRUE;
28147 // }
28148 // /&ast; Do some stuff &ast;/
28149 // return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event);
28150 // }
28151 // ]|
28152 // RETURNS: %TRUE if the input method handled the key event.
28153 // <event>: the key event
28154 int im_context_filter_keypress(Gdk2.EventKey* event) {
28155 return gtk_text_view_im_context_filter_keypress(&this, event);
28158 // Updates the position of a child, as for gtk_text_view_add_child_in_window().
28159 // <child>: child widget already added to the text view
28160 // <xpos>: new X position in window coordinates
28161 // <ypos>: new Y position in window coordinates
28162 void move_child(Widget* child, int xpos, int ypos) {
28163 gtk_text_view_move_child(&this, child, xpos, ypos);
28166 // Moves a mark within the buffer so that it's
28167 // located within the currently-visible text area.
28168 // RETURNS: %TRUE if the mark moved (wasn't already onscreen)
28169 // <mark>: a #GtkTextMark
28170 int move_mark_onscreen(TextMark* mark) {
28171 return gtk_text_view_move_mark_onscreen(&this, mark);
28174 // Move the iterator a given number of characters visually, treating
28175 // it as the strong cursor position. If @count is positive, then the
28176 // new strong cursor position will be @count positions to the right of
28177 // the old cursor position. If @count is negative then the new strong
28178 // cursor position will be @count positions to the left of the old
28179 // cursor position.
28180 // In the presence of bi-directional text, the correspondence
28181 // between logical and visual order will depend on the direction
28182 // of the current run, and there may be jumps when the cursor
28183 // is moved off of the end of a run.
28184 // RETURNS: %TRUE if @iter moved and is not on the end iterator
28185 // <iter>: a #GtkTextIter
28186 // <count>: number of characters to move (negative moves left, positive moves right)
28187 int move_visually(TextIter* iter, int count) {
28188 return gtk_text_view_move_visually(&this, iter, count);
28191 // Moves the cursor to the currently visible region of the
28192 // buffer, it it isn't there already.
28193 // RETURNS: %TRUE if the cursor had to be moved.
28194 int place_cursor_onscreen() {
28195 return gtk_text_view_place_cursor_onscreen(&this);
28198 // Reset the input method context of the text view if needed.
28199 // This can be necessary in the case where modifying the buffer
28200 // would confuse on-going input method behavior.
28201 void reset_im_context() {
28202 gtk_text_view_reset_im_context(&this);
28205 // Scrolls @text_view the minimum distance such that @mark is contained
28206 // within the visible area of the widget.
28207 // <mark>: a mark in the buffer for @text_view
28208 void scroll_mark_onscreen(TextMark* mark) {
28209 gtk_text_view_scroll_mark_onscreen(&this, mark);
28212 // Scrolls @text_view so that @iter is on the screen in the position
28213 // indicated by @xalign and @yalign. An alignment of 0.0 indicates
28214 // left or top, 1.0 indicates right or bottom, 0.5 means center.
28215 // If @use_align is %FALSE, the text scrolls the minimal distance to
28216 // get the mark onscreen, possibly not scrolling at all. The effective
28217 // screen for purposes of this function is reduced by a margin of size
28218 // Note that this function uses the currently-computed height of the
28219 // lines in the text buffer. Line heights are computed in an idle
28220 // handler; so this function may not have the desired effect if it's
28221 // called before the height computations. To avoid oddness, consider
28222 // using gtk_text_view_scroll_to_mark() which saves a point to be
28223 // scrolled to after line validation.
28224 // RETURNS: %TRUE if scrolling occurred
28225 // <iter>: a #GtkTextIter
28226 // <within_margin>: margin as a [0.0,0.5) fraction of screen size
28227 // <use_align>: whether to use alignment arguments (if %FALSE, just get the mark onscreen)
28228 // <xalign>: horizontal alignment of mark within visible area
28229 // <yalign>: vertical alignment of mark within visible area
28230 int scroll_to_iter(TextIter* iter, double within_margin, int use_align, double xalign, double yalign) {
28231 return gtk_text_view_scroll_to_iter(&this, iter, within_margin, use_align, xalign, yalign);
28234 // Scrolls @text_view so that @mark is on the screen in the position
28235 // indicated by @xalign and @yalign. An alignment of 0.0 indicates
28236 // left or top, 1.0 indicates right or bottom, 0.5 means center.
28237 // If @use_align is %FALSE, the text scrolls the minimal distance to
28238 // get the mark onscreen, possibly not scrolling at all. The effective
28239 // screen for purposes of this function is reduced by a margin of size
28240 // <mark>: a #GtkTextMark
28241 // <within_margin>: margin as a [0.0,0.5) fraction of screen size
28242 // <use_align>: whether to use alignment arguments (if %FALSE, just get the mark onscreen)
28243 // <xalign>: horizontal alignment of mark within visible area
28244 // <yalign>: vertical alignment of mark within visible area
28245 void scroll_to_mark(TextMark* mark, double within_margin, int use_align, double xalign, double yalign) {
28246 gtk_text_view_scroll_to_mark(&this, mark, within_margin, use_align, xalign, yalign);
28249 // Sets the behavior of the text widget when the Tab key is pressed.
28250 // If @accepts_tab is %TRUE, a tab character is inserted. If @accepts_tab
28251 // is %FALSE the keyboard focus is moved to the next widget in the focus
28252 // chain.
28253 // <accepts_tab>: %TRUE if pressing the Tab key should insert a tab character, %FALSE, if pressing the Tab key should move the keyboard focus.
28254 void set_accepts_tab(int accepts_tab) {
28255 gtk_text_view_set_accepts_tab(&this, accepts_tab);
28258 // Sets the width of %GTK_TEXT_WINDOW_LEFT or %GTK_TEXT_WINDOW_RIGHT,
28259 // or the height of %GTK_TEXT_WINDOW_TOP or %GTK_TEXT_WINDOW_BOTTOM.
28260 // Automatically destroys the corresponding window if the size is set
28261 // to 0, and creates the window if the size is set to non-zero. This
28262 // function can only be used for the "border windows," it doesn't work
28263 // with #GTK_TEXT_WINDOW_WIDGET, #GTK_TEXT_WINDOW_TEXT, or
28264 // #GTK_TEXT_WINDOW_PRIVATE.
28265 // <type>: window to affect
28266 // <size>: width or height of the window
28267 void set_border_window_size(TextWindowType type, int size) {
28268 gtk_text_view_set_border_window_size(&this, type, size);
28271 // Sets @buffer as the buffer being displayed by @text_view. The previous
28272 // buffer displayed by the text view is unreferenced, and a reference is
28273 // added to @buffer. If you owned a reference to @buffer before passing it
28274 // to this function, you must remove that reference yourself; #GtkTextView
28275 // will not "adopt" it.
28276 // <buffer>: a #GtkTextBuffer
28277 void set_buffer(TextBuffer* buffer=null) {
28278 gtk_text_view_set_buffer(&this, buffer);
28281 // Toggles whether the insertion point is displayed. A buffer with no editable
28282 // text probably shouldn't have a visible cursor, so you may want to turn
28283 // the cursor off.
28284 // <setting>: whether to show the insertion cursor
28285 void set_cursor_visible(int setting) {
28286 gtk_text_view_set_cursor_visible(&this, setting);
28289 // Sets the default editability of the #GtkTextView. You can override
28290 // this default setting with tags in the buffer, using the "editable"
28291 // attribute of tags.
28292 // <setting>: whether it's editable
28293 void set_editable(int setting) {
28294 gtk_text_view_set_editable(&this, setting);
28297 // Sets the default indentation for paragraphs in @text_view.
28298 // Tags in the buffer may override the default.
28299 // <indent>: indentation in pixels
28300 void set_indent(int indent) {
28301 gtk_text_view_set_indent(&this, indent);
28304 // Sets the default justification of text in @text_view.
28305 // Tags in the view's buffer may override the default.
28306 // <justification>: justification
28307 void set_justification(Justification justification) {
28308 gtk_text_view_set_justification(&this, justification);
28311 // Sets the default left margin for text in @text_view.
28312 // Tags in the buffer may override the default.
28313 // <left_margin>: left margin in pixels
28314 void set_left_margin(int left_margin) {
28315 gtk_text_view_set_left_margin(&this, left_margin);
28318 // Changes the #GtkTextView overwrite mode.
28319 // <overwrite>: %TRUE to turn on overwrite mode, %FALSE to turn it off
28320 void set_overwrite(int overwrite) {
28321 gtk_text_view_set_overwrite(&this, overwrite);
28324 // Sets the default number of blank pixels above paragraphs in @text_view.
28325 // Tags in the buffer for @text_view may override the defaults.
28326 // <pixels_above_lines>: pixels above paragraphs
28327 void set_pixels_above_lines(int pixels_above_lines) {
28328 gtk_text_view_set_pixels_above_lines(&this, pixels_above_lines);
28331 // Sets the default number of pixels of blank space
28332 // to put below paragraphs in @text_view. May be overridden
28333 // by tags applied to @text_view's buffer.
28334 // <pixels_below_lines>: pixels below paragraphs
28335 void set_pixels_below_lines(int pixels_below_lines) {
28336 gtk_text_view_set_pixels_below_lines(&this, pixels_below_lines);
28339 // Sets the default number of pixels of blank space to leave between
28340 // display/wrapped lines within a paragraph. May be overridden by
28341 // tags in @text_view's buffer.
28342 // <pixels_inside_wrap>: default number of pixels between wrapped lines
28343 void set_pixels_inside_wrap(int pixels_inside_wrap) {
28344 gtk_text_view_set_pixels_inside_wrap(&this, pixels_inside_wrap);
28347 // Sets the default right margin for text in the text view.
28348 // Tags in the buffer may override the default.
28349 // <right_margin>: right margin in pixels
28350 void set_right_margin(int right_margin) {
28351 gtk_text_view_set_right_margin(&this, right_margin);
28354 // Sets the default tab stops for paragraphs in @text_view.
28355 // Tags in the buffer may override the default.
28356 // <tabs>: tabs as a #PangoTabArray
28357 void set_tabs(Pango.TabArray* tabs) {
28358 gtk_text_view_set_tabs(&this, tabs);
28361 // Sets the line wrapping for the view.
28362 // <wrap_mode>: a #GtkWrapMode
28363 void set_wrap_mode(WrapMode wrap_mode) {
28364 gtk_text_view_set_wrap_mode(&this, wrap_mode);
28367 // Determines whether @iter is at the start of a display line.
28368 // See gtk_text_view_forward_display_line() for an explanation of
28369 // display lines vs. paragraphs.
28370 // RETURNS: %TRUE if @iter begins a wrapped line
28371 // <iter>: a #GtkTextIter
28372 int starts_display_line(TextIter* iter) {
28373 return gtk_text_view_starts_display_line(&this, iter);
28376 // Converts coordinates on the window identified by @win to buffer
28377 // coordinates, storing the result in (@buffer_x,@buffer_y).
28378 // Note that you can't convert coordinates for a nonexisting window (see
28379 // gtk_text_view_set_border_window_size()).
28380 // <win>: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
28381 // <window_x>: window x coordinate
28382 // <window_y>: window y coordinate
28383 // <buffer_x>: buffer x coordinate return location or %NULL
28384 // <buffer_y>: buffer y coordinate return location or %NULL
28385 void window_to_buffer_coords(TextWindowType win, int window_x, int window_y, /*out*/ int* buffer_x=null, /*out*/ int* buffer_y=null) {
28386 gtk_text_view_window_to_buffer_coords(&this, win, window_x, window_y, buffer_x, buffer_y);
28389 // The ::backspace signal is a
28390 // <link linkend="keybinding-signals">keybinding signal</link>
28391 // which gets emitted when the user asks for it.
28392 // The default bindings for this signal are
28393 // Backspace and Shift-Backspace.
28394 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_backspace;
28396 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28397 return super_.signal_connect!name(cb, data, cf);
28400 ulong signal_connect(string name:"backspace", CB/*:signal_backspace*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28401 return signal_connect_data(&this, cast(char*)"backspace",
28402 cast(GObject2.Callback)cb, data, null, cf);
28405 // The ::copy-clipboard signal is a
28406 // <link linkend="keybinding-signals">keybinding signal</link>
28407 // which gets emitted to copy the selection to the clipboard.
28408 // The default bindings for this signal are
28409 // Ctrl-c and Ctrl-Insert.
28410 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_copy_clipboard;
28411 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28412 return signal_connect_data(&this, cast(char*)"copy-clipboard",
28413 cast(GObject2.Callback)cb, data, null, cf);
28416 // The ::cut-clipboard signal is a
28417 // <link linkend="keybinding-signals">keybinding signal</link>
28418 // which gets emitted to cut the selection to the clipboard.
28419 // The default bindings for this signal are
28420 // Ctrl-x and Shift-Delete.
28421 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_cut_clipboard;
28422 ulong signal_connect(string name:"cut-clipboard", CB/*:signal_cut_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28423 return signal_connect_data(&this, cast(char*)"cut-clipboard",
28424 cast(GObject2.Callback)cb, data, null, cf);
28427 // The ::delete-from-cursor signal is a
28428 // <link linkend="keybinding-signals">keybinding signal</link>
28429 // which gets emitted when the user initiates a text deletion.
28430 // If the @type is %GTK_DELETE_CHARS, GTK+ deletes the selection
28431 // if there is one, otherwise it deletes the requested number
28432 // of characters.
28433 // The default bindings for this signal are
28434 // Delete for deleting a character, Ctrl-Delete for
28435 // deleting a word and Ctrl-Backspace for deleting a word
28436 // backwords.
28437 // <type>: the granularity of the deletion, as a #GtkDeleteType
28438 // <count>: the number of @type units to delete
28439 extern (C) alias static void function (TextView* this_, DeleteType* type, int count, void* user_data=null) signal_delete_from_cursor;
28440 ulong signal_connect(string name:"delete-from-cursor", CB/*:signal_delete_from_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28441 return signal_connect_data(&this, cast(char*)"delete-from-cursor",
28442 cast(GObject2.Callback)cb, data, null, cf);
28445 // The ::insert-at-cursor signal is a
28446 // <link linkend="keybinding-signals">keybinding signal</link>
28447 // which gets emitted when the user initiates the insertion of a
28448 // fixed string at the cursor.
28449 // This signal has no default bindings.
28450 // <string>: the string to insert
28451 extern (C) alias static void function (TextView* this_, char* string_, void* user_data=null) signal_insert_at_cursor;
28452 ulong signal_connect(string name:"insert-at-cursor", CB/*:signal_insert_at_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28453 return signal_connect_data(&this, cast(char*)"insert-at-cursor",
28454 cast(GObject2.Callback)cb, data, null, cf);
28457 // The ::move-cursor signal is a
28458 // <link linkend="keybinding-signals">keybinding signal</link>
28459 // which gets emitted when the user initiates a cursor movement.
28460 // If the cursor is not visible in @text_view, this signal causes
28461 // the viewport to be moved instead.
28462 // Applications should not connect to it, but may emit it with
28463 // g_signal_emit_by_name() if they need to control the cursor
28464 // programmatically.
28465 // The default bindings for this signal come in two variants,
28466 // the variant with the Shift modifier extends the selection,
28467 // the variant without the Shift modifer does not.
28468 // There are too many key combinations to list them all here.
28469 // <itemizedlist>
28470 // <listitem>Arrow keys move by individual characters/lines</listitem>
28471 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
28472 // <listitem>Home/End keys move to the ends of the buffer</listitem>
28473 // <listitem>PageUp/PageDown keys move vertically by pages</listitem>
28474 // <listitem>Ctrl-PageUp/PageDown keys move horizontally by pages</listitem>
28475 // </itemizedlist>
28476 // <step>: the granularity of the move, as a #GtkMovementStep
28477 // <count>: the number of @step units to move
28478 // <extend_selection>: %TRUE if the move should extend the selection
28479 extern (C) alias static void function (TextView* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) signal_move_cursor;
28480 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28481 return signal_connect_data(&this, cast(char*)"move-cursor",
28482 cast(GObject2.Callback)cb, data, null, cf);
28485 // The ::move-viewport signal is a
28486 // <link linkend="keybinding-signals">keybinding signal</link>
28487 // which can be bound to key combinations to allow the user
28488 // to move the viewport, i.e. change what part of the text view
28489 // is visible in a containing scrolled window.
28490 // There are no default bindings for this signal.
28491 // <step>: the granularity of the move, as a #GtkMovementStep
28492 // <count>: the number of @step units to move
28493 extern (C) alias static void function (TextView* this_, ScrollStep* step, int count, void* user_data=null) signal_move_viewport;
28494 ulong signal_connect(string name:"move-viewport", CB/*:signal_move_viewport*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28495 return signal_connect_data(&this, cast(char*)"move-viewport",
28496 cast(GObject2.Callback)cb, data, null, cf);
28499 // The ::page-horizontally signal is a
28500 // <link linkend="keybinding-signals">keybinding signal</link>
28501 // which can be bound to key combinations to allow the user
28502 // to initiate horizontal cursor movement by pages.
28503 // This signal should not be used anymore, instead use the
28504 // #GtkTextview::move-cursor signal with the #GTK_MOVEMENT_HORIZONTAL_PAGES
28505 // granularity.
28506 // <count>: the number of @step units to move
28507 // <extend_selection>: %TRUE if the move should extend the selection
28508 extern (C) alias static void function (TextView* this_, int count, c_int extend_selection, void* user_data=null) signal_page_horizontally;
28509 ulong signal_connect(string name:"page-horizontally", CB/*:signal_page_horizontally*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28510 return signal_connect_data(&this, cast(char*)"page-horizontally",
28511 cast(GObject2.Callback)cb, data, null, cf);
28514 // The ::paste-clipboard signal is a
28515 // <link linkend="keybinding-signals">keybinding signal</link>
28516 // which gets emitted to paste the contents of the clipboard
28517 // into the text view.
28518 // The default bindings for this signal are
28519 // Ctrl-v and Shift-Insert.
28520 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_paste_clipboard;
28521 ulong signal_connect(string name:"paste-clipboard", CB/*:signal_paste_clipboard*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28522 return signal_connect_data(&this, cast(char*)"paste-clipboard",
28523 cast(GObject2.Callback)cb, data, null, cf);
28526 // The ::populate-popup signal gets emitted before showing the
28527 // context menu of the text view.
28528 // If you need to add items to the context menu, connect
28529 // to this signal and append your menuitems to the @menu.
28530 // <menu>: the menu that is being populated
28531 extern (C) alias static void function (TextView* this_, Menu* menu, void* user_data=null) signal_populate_popup;
28532 ulong signal_connect(string name:"populate-popup", CB/*:signal_populate_popup*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28533 return signal_connect_data(&this, cast(char*)"populate-popup",
28534 cast(GObject2.Callback)cb, data, null, cf);
28537 // If an input method is used, the typed text will not immediately
28538 // be committed to the buffer. So if you are interested in the text,
28539 // connect to this signal.
28540 // This signal is only emitted if the text at the given position
28541 // is actually editable.
28542 // <preedit>: the current preedit string
28543 extern (C) alias static void function (TextView* this_, char* preedit, void* user_data=null) signal_preedit_changed;
28544 ulong signal_connect(string name:"preedit-changed", CB/*:signal_preedit_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28545 return signal_connect_data(&this, cast(char*)"preedit-changed",
28546 cast(GObject2.Callback)cb, data, null, cf);
28549 // The ::select-all signal is a
28550 // <link linkend="keybinding-signals">keybinding signal</link>
28551 // which gets emitted to select or unselect the complete
28552 // contents of the text view.
28553 // The default bindings for this signal are Ctrl-a and Ctrl-/
28554 // for selecting and Shift-Ctrl-a and Ctrl-\ for unselecting.
28555 // <select>: %TRUE to select, %FALSE to unselect
28556 extern (C) alias static void function (TextView* this_, c_int select, void* user_data=null) signal_select_all;
28557 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28558 return signal_connect_data(&this, cast(char*)"select-all",
28559 cast(GObject2.Callback)cb, data, null, cf);
28562 // The ::set-anchor signal is a
28563 // <link linkend="keybinding-signals">keybinding signal</link>
28564 // which gets emitted when the user initiates setting the "anchor"
28565 // mark. The "anchor" mark gets placed at the same position as the
28566 // "insert" mark.
28567 // This signal has no default bindings.
28568 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_set_anchor;
28569 ulong signal_connect(string name:"set-anchor", CB/*:signal_set_anchor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28570 return signal_connect_data(&this, cast(char*)"set-anchor",
28571 cast(GObject2.Callback)cb, data, null, cf);
28574 // Set the scroll adjustments for the text view. Usually scrolled containers
28575 // like #GtkScrolledWindow will emit this signal to connect two instances
28576 // of #GtkScrollbar to the scroll directions of the #GtkTextView.
28577 extern (C) alias static void function (TextView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
28578 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28579 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
28580 cast(GObject2.Callback)cb, data, null, cf);
28583 // The ::toggle-cursor-visible signal is a
28584 // <link linkend="keybinding-signals">keybinding signal</link>
28585 // which gets emitted to toggle the visibility of the cursor.
28586 // The default binding for this signal is F7.
28587 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_toggle_cursor_visible;
28588 ulong signal_connect(string name:"toggle-cursor-visible", CB/*:signal_toggle_cursor_visible*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28589 return signal_connect_data(&this, cast(char*)"toggle-cursor-visible",
28590 cast(GObject2.Callback)cb, data, null, cf);
28593 // The ::toggle-overwrite signal is a
28594 // <link linkend="keybinding-signals">keybinding signal</link>
28595 // which gets emitted to toggle the overwrite mode of the text view.
28596 // The default bindings for this signal is Insert.
28597 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_toggle_overwrite;
28598 ulong signal_connect(string name:"toggle-overwrite", CB/*:signal_toggle_overwrite*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28599 return signal_connect_data(&this, cast(char*)"toggle-overwrite",
28600 cast(GObject2.Callback)cb, data, null, cf);
28604 struct TextViewClass {
28605 ContainerClass parent_class;
28606 extern (C) void function (TextView* text_view, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
28607 extern (C) void function (TextView* text_view, Menu* menu) populate_popup;
28608 extern (C) void function (TextView* text_view, MovementStep step, int count, int extend_selection) move_cursor;
28609 extern (C) void function (TextView* text_view, int count, int extend_selection) page_horizontally;
28610 extern (C) void function (TextView* text_view) set_anchor;
28611 extern (C) void function (TextView* text_view, char* str) insert_at_cursor;
28612 extern (C) void function (TextView* text_view, DeleteType type, int count) delete_from_cursor;
28613 extern (C) void function (TextView* text_view) backspace;
28614 extern (C) void function (TextView* text_view) cut_clipboard;
28615 extern (C) void function (TextView* text_view) copy_clipboard;
28616 extern (C) void function (TextView* text_view) paste_clipboard;
28617 extern (C) void function (TextView* text_view) toggle_overwrite;
28618 extern (C) void function (TextView* text_view, DirectionType direction) move_focus;
28619 extern (C) void function () _gtk_reserved1;
28620 extern (C) void function () _gtk_reserved2;
28621 extern (C) void function () _gtk_reserved3;
28622 extern (C) void function () _gtk_reserved4;
28623 extern (C) void function () _gtk_reserved5;
28624 extern (C) void function () _gtk_reserved6;
28625 extern (C) void function () _gtk_reserved7;
28628 struct TextWindow {
28631 enum TextWindowType {
28632 PRIVATE = 0,
28633 WIDGET = 1,
28634 TEXT = 2,
28635 LEFT = 3,
28636 RIGHT = 4,
28637 TOP = 5,
28638 BOTTOM = 6
28640 struct ThemeEngine {
28643 struct TipsQuery /* : Label */ {
28644 alias label this;
28645 alias label super_;
28646 Label label;
28647 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28648 uint, "emit_always", 1,
28649 uint, "in_query", 1,
28650 uint, "__dummy32A", 30));
28651 char* label_inactive, label_no_tip;
28652 Widget* caller, last_crossed;
28653 Gdk2.Cursor* query_cursor;
28655 static TipsQuery* new_() {
28656 return gtk_tips_query_new();
28658 void set_caller(Widget* caller) {
28659 gtk_tips_query_set_caller(&this, caller);
28661 void set_labels(char* label_inactive, char* label_no_tip) {
28662 gtk_tips_query_set_labels(&this, label_inactive, label_no_tip);
28664 void start_query() {
28665 gtk_tips_query_start_query(&this);
28667 void stop_query() {
28668 gtk_tips_query_stop_query(&this);
28670 extern (C) alias static void function (TipsQuery* this_, void* user_data=null) signal_start_query;
28672 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28673 return super_.signal_connect!name(cb, data, cf);
28676 ulong signal_connect(string name:"start-query", CB/*:signal_start_query*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28677 return signal_connect_data(&this, cast(char*)"start-query",
28678 cast(GObject2.Callback)cb, data, null, cf);
28680 extern (C) alias static void function (TipsQuery* this_, void* user_data=null) signal_stop_query;
28681 ulong signal_connect(string name:"stop-query", CB/*:signal_stop_query*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28682 return signal_connect_data(&this, cast(char*)"stop-query",
28683 cast(GObject2.Callback)cb, data, null, cf);
28685 extern (C) alias static void function (TipsQuery* this_, Widget* object, char* p0, char* p1, void* user_data=null) signal_widget_entered;
28686 ulong signal_connect(string name:"widget-entered", CB/*:signal_widget_entered*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28687 return signal_connect_data(&this, cast(char*)"widget-entered",
28688 cast(GObject2.Callback)cb, data, null, cf);
28690 extern (C) alias static c_int function (TipsQuery* this_, Widget* object, char* p0, char* p1, Gdk2.Event* p2, void* user_data=null) signal_widget_selected;
28691 ulong signal_connect(string name:"widget-selected", CB/*:signal_widget_selected*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28692 return signal_connect_data(&this, cast(char*)"widget-selected",
28693 cast(GObject2.Callback)cb, data, null, cf);
28697 struct TipsQueryClass {
28698 LabelClass parent_class;
28699 extern (C) void function (TipsQuery* tips_query) start_query;
28700 extern (C) void function (TipsQuery* tips_query) stop_query;
28701 extern (C) void function (TipsQuery* tips_query, Widget* widget, char* tip_text, char* tip_private) widget_entered;
28702 extern (C) int function (TipsQuery* tips_query, Widget* widget, char* tip_text, char* tip_private, Gdk2.EventButton* event) widget_selected;
28703 extern (C) void function () _gtk_reserved1;
28704 extern (C) void function () _gtk_reserved2;
28705 extern (C) void function () _gtk_reserved3;
28706 extern (C) void function () _gtk_reserved4;
28709 struct ToggleAction /* : Action */ {
28710 alias parent this;
28711 alias parent super_;
28712 alias parent action;
28713 Action parent;
28714 private ToggleActionPrivate* private_data;
28717 // Creates a new #GtkToggleAction object. To add the action to
28718 // a #GtkActionGroup and set the accelerator for the action,
28719 // call gtk_action_group_add_action_with_accel().
28720 // RETURNS: a new #GtkToggleAction
28721 // <name>: A unique name for the action
28722 // <label>: The label displayed in menu items and on buttons, or %NULL
28723 // <tooltip>: A tooltip for the action, or %NULL
28724 // <stock_id>: The stock icon to display in widgets representing the action, or %NULL
28725 static ToggleAction* /*new*/ new_(char* name, char* label, char* tooltip, char* stock_id) {
28726 return gtk_toggle_action_new(name, label, tooltip, stock_id);
28729 // Returns the checked state of the toggle action.
28730 // RETURNS: the checked state of the toggle action
28731 int get_active() {
28732 return gtk_toggle_action_get_active(&this);
28735 // Returns whether the action should have proxies like a radio action.
28736 // RETURNS: whether the action should have proxies like a radio action.
28737 int get_draw_as_radio() {
28738 return gtk_toggle_action_get_draw_as_radio(&this);
28741 // Sets the checked state on the toggle action.
28742 // <is_active>: whether the action should be checked or not
28743 void set_active(int is_active) {
28744 gtk_toggle_action_set_active(&this, is_active);
28747 // Sets whether the action should have proxies like a radio action.
28748 // <draw_as_radio>: whether the action should have proxies like a radio action
28749 void set_draw_as_radio(int draw_as_radio) {
28750 gtk_toggle_action_set_draw_as_radio(&this, draw_as_radio);
28752 // Emits the "toggled" signal on the toggle action.
28753 void toggled() {
28754 gtk_toggle_action_toggled(&this);
28756 extern (C) alias static void function (ToggleAction* this_, void* user_data=null) signal_toggled;
28758 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28759 return super_.signal_connect!name(cb, data, cf);
28762 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28763 return signal_connect_data(&this, cast(char*)"toggled",
28764 cast(GObject2.Callback)cb, data, null, cf);
28768 struct ToggleActionClass {
28769 ActionClass parent_class;
28770 extern (C) void function (ToggleAction* action) toggled;
28771 extern (C) void function () _gtk_reserved1;
28772 extern (C) void function () _gtk_reserved2;
28773 extern (C) void function () _gtk_reserved3;
28774 extern (C) void function () _gtk_reserved4;
28777 struct ToggleActionEntry {
28778 char* name, stock_id, label, accelerator, tooltip;
28779 GObject2.Callback callback;
28780 int is_active;
28783 struct ToggleActionPrivate {
28786 struct ToggleButton /* : Button */ {
28787 alias button this;
28788 alias button super_;
28789 Button button;
28790 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28791 uint, "active", 1,
28792 uint, "draw_indicator", 1,
28793 uint, "inconsistent", 1,
28794 uint, "__dummy32A", 29));
28796 static ToggleButton* new_() {
28797 return gtk_toggle_button_new();
28799 static ToggleButton* new_with_label(char* label) {
28800 return gtk_toggle_button_new_with_label(label);
28803 // Creates a new #GtkToggleButton containing a label. The label
28804 // will be created using gtk_label_new_with_mnemonic(), so underscores
28805 // in @label indicate the mnemonic for the button.
28806 // RETURNS: a new #GtkToggleButton
28807 // <label>: the text of the button, with an underscore in front of the mnemonic character
28808 static ToggleButton* new_with_mnemonic(char* label) {
28809 return gtk_toggle_button_new_with_mnemonic(label);
28811 int get_active() {
28812 return gtk_toggle_button_get_active(&this);
28815 // Gets the value set by gtk_toggle_button_set_inconsistent().
28816 // RETURNS: %TRUE if the button is displayed as inconsistent, %FALSE otherwise
28817 int get_inconsistent() {
28818 return gtk_toggle_button_get_inconsistent(&this);
28821 // Retrieves whether the button is displayed as a separate indicator
28822 // and label. See gtk_toggle_button_set_mode().
28823 // and label.
28824 // RETURNS: %TRUE if the togglebutton is drawn as a separate indicator
28825 int get_mode() {
28826 return gtk_toggle_button_get_mode(&this);
28828 void set_active(int is_active) {
28829 gtk_toggle_button_set_active(&this, is_active);
28832 // If the user has selected a range of elements (such as some text or
28833 // spreadsheet cells) that are affected by a toggle button, and the
28834 // current values in that range are inconsistent, you may want to
28835 // display the toggle in an "in between" state. This function turns on
28836 // "in between" display. Normally you would turn off the inconsistent
28837 // state again if the user toggles the toggle button. This has to be
28838 // done manually, gtk_toggle_button_set_inconsistent() only affects
28839 // visual appearance, it doesn't affect the semantics of the button.
28840 // <setting>: %TRUE if state is inconsistent
28841 void set_inconsistent(int setting) {
28842 gtk_toggle_button_set_inconsistent(&this, setting);
28845 // Sets whether the button is displayed as a separate indicator and label.
28846 // You can call this function on a checkbutton or a radiobutton with
28847 // This function only affects instances of classes like #GtkCheckButton
28848 // and #GtkRadioButton that derive from #GtkToggleButton,
28849 // not instances of #GtkToggleButton itself.
28850 // <draw_indicator>: if %TRUE, draw the button as a separate indicator and label; if %FALSE, draw the button like a normal button
28851 void set_mode(int draw_indicator) {
28852 gtk_toggle_button_set_mode(&this, draw_indicator);
28854 void toggled() {
28855 gtk_toggle_button_toggled(&this);
28857 extern (C) alias static void function (ToggleButton* this_, void* user_data=null) signal_toggled;
28859 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28860 return super_.signal_connect!name(cb, data, cf);
28863 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28864 return signal_connect_data(&this, cast(char*)"toggled",
28865 cast(GObject2.Callback)cb, data, null, cf);
28869 struct ToggleButtonClass {
28870 ButtonClass parent_class;
28871 extern (C) void function (ToggleButton* toggle_button) toggled;
28872 extern (C) void function () _gtk_reserved1;
28873 extern (C) void function () _gtk_reserved2;
28874 extern (C) void function () _gtk_reserved3;
28875 extern (C) void function () _gtk_reserved4;
28878 struct ToggleToolButton /* : ToolButton */ {
28879 alias parent this;
28880 alias parent super_;
28881 alias parent toolbutton;
28882 ToolButton parent;
28883 private ToggleToolButtonPrivate* priv;
28886 // Returns a new #GtkToggleToolButton
28887 // RETURNS: a newly created #GtkToggleToolButton
28888 static ToggleToolButton* new_() {
28889 return gtk_toggle_tool_button_new();
28892 // Creates a new #GtkToggleToolButton containing the image and text from a
28893 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
28894 // and #GTK_STOCK_APPLY.
28895 // It is an error if @stock_id is not a name of a stock item.
28896 // RETURNS: A new #GtkToggleToolButton
28897 // <stock_id>: the name of the stock item
28898 static ToggleToolButton* new_from_stock(char* stock_id) {
28899 return gtk_toggle_tool_button_new_from_stock(stock_id);
28902 // Queries a #GtkToggleToolButton and returns its current state.
28903 // Returns %TRUE if the toggle button is pressed in and %FALSE if it is raised.
28904 // RETURNS: %TRUE if the toggle tool button is pressed in, %FALSE if not
28905 int get_active() {
28906 return gtk_toggle_tool_button_get_active(&this);
28909 // Sets the status of the toggle tool button. Set to %TRUE if you
28910 // want the GtkToggleButton to be 'pressed in', and %FALSE to raise it.
28911 // This action causes the toggled signal to be emitted.
28912 // <is_active>: whether @button should be active
28913 void set_active(int is_active) {
28914 gtk_toggle_tool_button_set_active(&this, is_active);
28916 // Emitted whenever the toggle tool button changes state.
28917 extern (C) alias static void function (ToggleToolButton* this_, void* user_data=null) signal_toggled;
28919 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28920 return super_.signal_connect!name(cb, data, cf);
28923 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28924 return signal_connect_data(&this, cast(char*)"toggled",
28925 cast(GObject2.Callback)cb, data, null, cf);
28929 struct ToggleToolButtonClass {
28930 ToolButtonClass parent_class;
28931 extern (C) void function (ToggleToolButton* button) toggled;
28932 extern (C) void function () _gtk_reserved1;
28933 extern (C) void function () _gtk_reserved2;
28934 extern (C) void function () _gtk_reserved3;
28935 extern (C) void function () _gtk_reserved4;
28938 struct ToggleToolButtonPrivate {
28941 struct ToolButton /* : ToolItem */ {
28942 alias parent this;
28943 alias parent super_;
28944 alias parent toolitem;
28945 ToolItem parent;
28946 private ToolButtonPrivate* priv;
28949 // Creates a new %GtkToolButton using @icon_widget as icon and @label as
28950 // label.
28951 // RETURNS: A new #GtkToolButton
28952 // <icon_widget>: a #GtkMisc widget that will be used as icon widget, or %NULL
28953 // <label>: a string that will be used as label, or %NULL
28954 static ToolButton* new_(Widget* icon_widget=null, char* label=null) {
28955 return gtk_tool_button_new(icon_widget, label);
28958 // Creates a new #GtkToolButton containing the image and text from a
28959 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
28960 // and #GTK_STOCK_APPLY.
28961 // It is an error if @stock_id is not a name of a stock item.
28962 // RETURNS: A new #GtkToolButton
28963 // <stock_id>: the name of the stock item
28964 static ToolButton* new_from_stock(char* stock_id) {
28965 return gtk_tool_button_new_from_stock(stock_id);
28968 // Returns the name of the themed icon for the tool button,
28969 // see gtk_tool_button_set_icon_name().
28970 // no themed icon
28971 // RETURNS: the icon name or %NULL if the tool button has
28972 char* get_icon_name() {
28973 return gtk_tool_button_get_icon_name(&this);
28976 // Return the widget used as icon widget on @button.
28977 // See gtk_tool_button_set_icon_widget().
28978 // on @button, or %NULL.
28979 // RETURNS: The widget used as icon
28980 Widget* get_icon_widget() {
28981 return gtk_tool_button_get_icon_widget(&this);
28984 // Returns the label used by the tool button, or %NULL if the tool button
28985 // doesn't have a label. or uses a the label from a stock item. The returned
28986 // string is owned by GTK+, and must not be modified or freed.
28987 // RETURNS: The label, or %NULL
28988 char* get_label() {
28989 return gtk_tool_button_get_label(&this);
28992 // Returns the widget used as label on @button.
28993 // See gtk_tool_button_set_label_widget().
28994 // on @button, or %NULL.
28995 // RETURNS: The widget used as label
28996 Widget* get_label_widget() {
28997 return gtk_tool_button_get_label_widget(&this);
29000 // Returns the name of the stock item. See gtk_tool_button_set_stock_id().
29001 // The returned string is owned by GTK+ and must not be freed or modifed.
29002 // RETURNS: the name of the stock item for @button.
29003 char* get_stock_id() {
29004 return gtk_tool_button_get_stock_id(&this);
29007 // Returns whether underscores in the label property are used as mnemonics
29008 // on menu items on the overflow menu. See gtk_tool_button_set_use_underline().
29009 // mnemonics on menu items on the overflow menu.
29010 // RETURNS: %TRUE if underscores in the label property are used as
29011 int get_use_underline() {
29012 return gtk_tool_button_get_use_underline(&this);
29015 // Sets the icon for the tool button from a named themed icon.
29016 // See the docs for #GtkIconTheme for more details.
29017 // The "icon_name" property only has an effect if not
29018 // overridden by non-%NULL "label", "icon_widget" and "stock_id"
29019 // properties.
29020 // <icon_name>: the name of the themed icon
29021 void set_icon_name(char* icon_name=null) {
29022 gtk_tool_button_set_icon_name(&this, icon_name);
29025 // Sets @icon as the widget used as icon on @button. If @icon_widget is
29026 // %NULL the icon is determined by the "stock_id" property. If the
29027 // "stock_id" property is also %NULL, @button will not have an icon.
29028 // <icon_widget>: the widget used as icon, or %NULL
29029 void set_icon_widget(Widget* icon_widget=null) {
29030 gtk_tool_button_set_icon_widget(&this, icon_widget);
29033 // Sets @label as the label used for the tool button. The "label" property
29034 // only has an effect if not overridden by a non-%NULL "label_widget" property.
29035 // If both the "label_widget" and "label" properties are %NULL, the label
29036 // is determined by the "stock_id" property. If the "stock_id" property is also
29037 // %NULL, @button will not have a label.
29038 // <label>: a string that will be used as label, or %NULL.
29039 void set_label(char* label=null) {
29040 gtk_tool_button_set_label(&this, label);
29043 // Sets @label_widget as the widget that will be used as the label
29044 // for @button. If @label_widget is %NULL the "label" property is used
29045 // as label. If "label" is also %NULL, the label in the stock item
29046 // determined by the "stock_id" property is used as label. If
29047 // "stock_id" is also %NULL, @button does not have a label.
29048 // <label_widget>: the widget used as label, or %NULL
29049 void set_label_widget(Widget* label_widget=null) {
29050 gtk_tool_button_set_label_widget(&this, label_widget);
29053 // Sets the name of the stock item. See gtk_tool_button_new_from_stock().
29054 // The stock_id property only has an effect if not
29055 // overridden by non-%NULL "label" and "icon_widget" properties.
29056 // <stock_id>: a name of a stock item, or %NULL
29057 void set_stock_id(char* stock_id=null) {
29058 gtk_tool_button_set_stock_id(&this, stock_id);
29061 // If set, an underline in the label property indicates that the next character
29062 // should be used for the mnemonic accelerator key in the overflow menu. For
29063 // example, if the label property is "_Open" and @use_underline is %TRUE,
29064 // the label on the tool button will be "Open" and the item on the overflow
29065 // menu will have an underlined 'O'.
29066 // Labels shown on tool buttons never have mnemonics on them; this property
29067 // only affects the menu item on the overflow menu.
29068 // <use_underline>: whether the button label has the form "_Open"
29069 void set_use_underline(int use_underline) {
29070 gtk_tool_button_set_use_underline(&this, use_underline);
29073 // This signal is emitted when the tool button is clicked with the mouse
29074 // or activated with the keyboard.
29075 extern (C) alias static void function (ToolButton* this_, void* user_data=null) signal_clicked;
29077 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29078 return super_.signal_connect!name(cb, data, cf);
29081 ulong signal_connect(string name:"clicked", CB/*:signal_clicked*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29082 return signal_connect_data(&this, cast(char*)"clicked",
29083 cast(GObject2.Callback)cb, data, null, cf);
29087 struct ToolButtonClass {
29088 ToolItemClass parent_class;
29089 Type button_type;
29090 extern (C) void function (ToolButton* tool_item) clicked;
29091 extern (C) void function () _gtk_reserved1;
29092 extern (C) void function () _gtk_reserved2;
29093 extern (C) void function () _gtk_reserved3;
29094 extern (C) void function () _gtk_reserved4;
29097 struct ToolButtonPrivate {
29101 // #GtkToolItem<!-- -->s are widgets that can appear on a toolbar. To
29102 // create a toolbar item that contain something else than a button, use
29103 // gtk_tool_item_new(). Use gtk_container_add() to add a child
29104 // widget to the tool item.
29105 // For toolbar items that contain buttons, see the #GtkToolButton,
29106 // #GtkToggleToolButton and #GtkRadioToolButton classes.
29107 // See the #GtkToolbar class for a description of the toolbar widget, and
29108 // #GtkToolShell for a description of the tool shell interface.
29109 struct ToolItem /* : Bin */ {
29110 alias parent this;
29111 alias parent super_;
29112 alias parent bin;
29113 Bin parent;
29114 private ToolItemPrivate* priv;
29117 // Creates a new #GtkToolItem
29118 // RETURNS: the new #GtkToolItem
29119 static ToolItem* new_() {
29120 return gtk_tool_item_new();
29123 // Returns the ellipsize mode used for @tool_item. Custom subclasses of
29124 // #GtkToolItem should call this function to find out how text should
29125 // be ellipsized.
29126 // should be ellipsized.
29127 // RETURNS: a #PangoEllipsizeMode indicating how text in @tool_item
29128 Pango.EllipsizeMode get_ellipsize_mode() {
29129 return gtk_tool_item_get_ellipsize_mode(&this);
29132 // Returns whether @tool_item is allocated extra space.
29133 // See gtk_tool_item_set_expand().
29134 // RETURNS: %TRUE if @tool_item is allocated extra space.
29135 int get_expand() {
29136 return gtk_tool_item_get_expand(&this);
29139 // Returns whether @tool_item is the same size as other homogeneous
29140 // items. See gtk_tool_item_set_homogeneous().
29141 // items.
29142 // RETURNS: %TRUE if the item is the same size as other homogeneous
29143 int get_homogeneous() {
29144 return gtk_tool_item_get_homogeneous(&this);
29147 // Returns the icon size used for @tool_item. Custom subclasses of
29148 // #GtkToolItem should call this function to find out what size icons
29149 // they should use.
29150 // used for @tool_item
29151 // RETURNS: a #GtkIconSize indicating the icon size
29152 int get_icon_size() {
29153 return gtk_tool_item_get_icon_size(&this);
29156 // Returns whether @tool_item is considered important. See
29157 // gtk_tool_item_set_is_important()
29158 // RETURNS: %TRUE if @tool_item is considered important.
29159 int get_is_important() {
29160 return gtk_tool_item_get_is_important(&this);
29163 // Returns the orientation used for @tool_item. Custom subclasses of
29164 // #GtkToolItem should call this function to find out what size icons
29165 // they should use.
29166 // used for @tool_item
29167 // RETURNS: a #GtkOrientation indicating the orientation
29168 Orientation get_orientation() {
29169 return gtk_tool_item_get_orientation(&this);
29172 // If @menu_item_id matches the string passed to
29173 // gtk_tool_item_set_proxy_menu_item() return the corresponding #GtkMenuItem.
29174 // Custom subclasses of #GtkToolItem should use this function to
29175 // update their menu item when the #GtkToolItem changes. That the
29176 // will not inadvertently change a menu item that they did not create.
29177 // gtk_tool_item_set_proxy_menu_item(), if the @menu_item_id<!-- -->s
29178 // match.
29179 // RETURNS: The #GtkMenuItem passed to
29180 // <menu_item_id>: a string used to identify the menu item
29181 Widget* get_proxy_menu_item(char* menu_item_id) {
29182 return gtk_tool_item_get_proxy_menu_item(&this, menu_item_id);
29185 // Returns the relief style of @tool_item. See gtk_button_set_relief_style().
29186 // Custom subclasses of #GtkToolItem should call this function in the handler
29187 // of the #GtkToolItem::toolbar_reconfigured signal to find out the
29188 // relief style of buttons.
29189 // for @tool_item.
29190 // RETURNS: a #GtkReliefStyle indicating the relief style used
29191 ReliefStyle get_relief_style() {
29192 return gtk_tool_item_get_relief_style(&this);
29195 // Returns the text alignment used for @tool_item. Custom subclasses of
29196 // #GtkToolItem should call this function to find out how text should
29197 // be aligned.
29198 // used for @tool_item
29199 // RETURNS: a #gfloat indicating the horizontal text alignment
29200 float get_text_alignment() {
29201 return gtk_tool_item_get_text_alignment(&this);
29204 // Returns the text orientation used for @tool_item. Custom subclasses of
29205 // #GtkToolItem should call this function to find out how text should
29206 // be orientated.
29207 // used for @tool_item
29208 // RETURNS: a #GtkOrientation indicating the text orientation
29209 Orientation get_text_orientation() {
29210 return gtk_tool_item_get_text_orientation(&this);
29213 // Returns the size group used for labels in @tool_item.
29214 // Custom subclasses of #GtkToolItem should call this function
29215 // and use the size group for labels.
29216 // RETURNS: a #GtkSizeGroup
29217 SizeGroup* get_text_size_group() {
29218 return gtk_tool_item_get_text_size_group(&this);
29221 // Returns the toolbar style used for @tool_item. Custom subclasses of
29222 // #GtkToolItem should call this function in the handler of the
29223 // GtkToolItem::toolbar_reconfigured signal to find out in what style
29224 // the toolbar is displayed and change themselves accordingly
29225 // Possibilities are:
29226 // <itemizedlist>
29227 // <listitem> GTK_TOOLBAR_BOTH, meaning the tool item should show
29228 // both an icon and a label, stacked vertically </listitem>
29229 // <listitem> GTK_TOOLBAR_ICONS, meaning the toolbar shows
29230 // only icons </listitem>
29231 // <listitem> GTK_TOOLBAR_TEXT, meaning the tool item should only
29232 // show text</listitem>
29233 // <listitem> GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show
29234 // both an icon and a label, arranged horizontally (however, note the
29235 // #GtkToolButton::has_text_horizontally that makes tool buttons not
29236 // show labels when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ.
29237 // </listitem>
29238 // </itemizedlist>
29239 // for @tool_item.
29240 // RETURNS: A #GtkToolbarStyle indicating the toolbar style used
29241 ToolbarStyle get_toolbar_style() {
29242 return gtk_tool_item_get_toolbar_style(&this);
29245 // Returns whether @tool_item has a drag window. See
29246 // gtk_tool_item_set_use_drag_window().
29247 // RETURNS: %TRUE if @tool_item uses a drag window.
29248 int get_use_drag_window() {
29249 return gtk_tool_item_get_use_drag_window(&this);
29252 // Returns whether the @tool_item is visible on toolbars that are
29253 // docked horizontally.
29254 // docked horizontally.
29255 // RETURNS: %TRUE if @tool_item is visible on toolbars that are
29256 int get_visible_horizontal() {
29257 return gtk_tool_item_get_visible_horizontal(&this);
29260 // Returns whether @tool_item is visible when the toolbar is docked vertically.
29261 // See gtk_tool_item_set_visible_vertical().
29262 // RETURNS: Whether @tool_item is visible when the toolbar is docked vertically
29263 int get_visible_vertical() {
29264 return gtk_tool_item_get_visible_vertical(&this);
29267 // Calling this function signals to the toolbar that the
29268 // overflow menu item for @tool_item has changed. If the
29269 // overflow menu is visible when this function it called,
29270 // the menu will be rebuilt.
29271 // The function must be called when the tool item changes what it
29272 // will do in response to the #GtkToolItem::create-menu-proxy signal.
29273 void rebuild_menu() {
29274 gtk_tool_item_rebuild_menu(&this);
29277 // Returns the #GtkMenuItem that was last set by
29278 // gtk_tool_item_set_proxy_menu_item(), ie. the #GtkMenuItem
29279 // that is going to appear in the overflow menu.
29280 // overflow menu for @tool_item.
29281 // RETURNS: The #GtkMenuItem that is going to appear in the
29282 Widget* retrieve_proxy_menu_item() {
29283 return gtk_tool_item_retrieve_proxy_menu_item(&this);
29286 // Sets whether @tool_item is allocated extra space when there
29287 // is more room on the toolbar then needed for the items. The
29288 // effect is that the item gets bigger when the toolbar gets bigger
29289 // and smaller when the toolbar gets smaller.
29290 // <expand>: Whether @tool_item is allocated extra space
29291 void set_expand(int expand) {
29292 gtk_tool_item_set_expand(&this, expand);
29295 // Sets whether @tool_item is to be allocated the same size as other
29296 // homogeneous items. The effect is that all homogeneous items will have
29297 // the same width as the widest of the items.
29298 // <homogeneous>: whether @tool_item is the same size as other homogeneous items
29299 void set_homogeneous(int homogeneous) {
29300 gtk_tool_item_set_homogeneous(&this, homogeneous);
29303 // Sets whether @tool_item should be considered important. The #GtkToolButton
29304 // class uses this property to determine whether to show or hide its label
29305 // when the toolbar style is %GTK_TOOLBAR_BOTH_HORIZ. The result is that
29306 // only tool buttons with the "is_important" property set have labels, an
29307 // effect known as "priority text"
29308 // <is_important>: whether the tool item should be considered important
29309 void set_is_important(int is_important) {
29310 gtk_tool_item_set_is_important(&this, is_important);
29313 // Sets the #GtkMenuItem used in the toolbar overflow menu. The
29314 // should also be used with gtk_tool_item_get_proxy_menu_item().
29315 // <menu_item_id>: a string used to identify @menu_item
29316 // <menu_item>: a #GtkMenuItem to be used in the overflow menu
29317 void set_proxy_menu_item(char* menu_item_id, Widget* menu_item) {
29318 gtk_tool_item_set_proxy_menu_item(&this, menu_item_id, menu_item);
29321 // Sets the #GtkTooltips object to be used for @tool_item, the
29322 // text to be displayed as tooltip on the item and the private text
29323 // to be used. See gtk_tooltips_set_tip().
29324 // <tooltips>: The #GtkTooltips object to be used
29325 // <tip_text>: text to be used as tooltip text for @tool_item
29326 // <tip_private>: text to be used as private tooltip text
29327 void set_tooltip(Tooltips* tooltips, char* tip_text=null, char* tip_private=null) {
29328 gtk_tool_item_set_tooltip(&this, tooltips, tip_text, tip_private);
29331 // Sets the markup text to be displayed as tooltip on the item.
29332 // See gtk_widget_set_tooltip_markup().
29333 // <markup>: markup text to be used as tooltip for @tool_item
29334 void set_tooltip_markup(char* markup) {
29335 gtk_tool_item_set_tooltip_markup(&this, markup);
29338 // Sets the text to be displayed as tooltip on the item.
29339 // See gtk_widget_set_tooltip_text().
29340 // <text>: text to be used as tooltip for @tool_item
29341 void set_tooltip_text(char* text) {
29342 gtk_tool_item_set_tooltip_text(&this, text);
29345 // Sets whether @tool_item has a drag window. When %TRUE the
29346 // toolitem can be used as a drag source through gtk_drag_source_set().
29347 // When @tool_item has a drag window it will intercept all events,
29348 // even those that would otherwise be sent to a child of @tool_item.
29349 // <use_drag_window>: Whether @tool_item has a drag window.
29350 void set_use_drag_window(int use_drag_window) {
29351 gtk_tool_item_set_use_drag_window(&this, use_drag_window);
29354 // Sets whether @tool_item is visible when the toolbar is docked horizontally.
29355 // <visible_horizontal>: Whether @tool_item is visible when in horizontal mode
29356 void set_visible_horizontal(int visible_horizontal) {
29357 gtk_tool_item_set_visible_horizontal(&this, visible_horizontal);
29360 // Sets whether @tool_item is visible when the toolbar is docked
29361 // vertically. Some tool items, such as text entries, are too wide to be
29362 // useful on a vertically docked toolbar. If @visible_vertical is %FALSE
29363 // <visible_vertical>: whether @tool_item is visible when the toolbar is in vertical mode
29364 void set_visible_vertical(int visible_vertical) {
29365 gtk_tool_item_set_visible_vertical(&this, visible_vertical);
29368 // Emits the signal #GtkToolItem::toolbar_reconfigured on @tool_item.
29369 // #GtkToolbar and other #GtkToolShell implementations use this function
29370 // to notify children, when some aspect of their configuration changes.
29371 void toolbar_reconfigured() {
29372 gtk_tool_item_toolbar_reconfigured(&this);
29375 // This signal is emitted when the toolbar needs information from @tool_item
29376 // about whether the item should appear in the toolbar overflow menu. In
29377 // response the tool item should either
29378 // <itemizedlist>
29379 // <listitem>call gtk_tool_item_set_proxy_menu_item() with a %NULL
29380 // pointer and return %TRUE to indicate that the item should not appear
29381 // in the overflow menu
29382 // </listitem>
29383 // <listitem> call gtk_tool_item_set_proxy_menu_item() with a new menu
29384 // item and return %TRUE, or
29385 // </listitem>
29386 // <listitem> return %FALSE to indicate that the signal was not
29387 // handled by the item. This means that
29388 // the item will not appear in the overflow menu unless a later handler
29389 // installs a menu item.
29390 // </listitem>
29391 // </itemizedlist>
29392 // The toolbar may cache the result of this signal. When the tool item changes
29393 // how it will respond to this signal it must call gtk_tool_item_rebuild_menu()
29394 // to invalidate the cache and ensure that the toolbar rebuilds its overflow
29395 // menu.
29396 // RETURNS: %TRUE if the signal was handled, %FALSE if not
29397 extern (C) alias static c_int function (ToolItem* this_, void* user_data=null) signal_create_menu_proxy;
29399 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29400 return super_.signal_connect!name(cb, data, cf);
29403 ulong signal_connect(string name:"create-menu-proxy", CB/*:signal_create_menu_proxy*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29404 return signal_connect_data(&this, cast(char*)"create-menu-proxy",
29405 cast(GObject2.Callback)cb, data, null, cf);
29408 // This signal is emitted when the toolitem's tooltip changes.
29409 // Application developers can use gtk_tool_item_set_tooltip() to
29410 // set the item's tooltip.
29411 // need to use this signal anymore.
29412 // RETURNS: %TRUE if the signal was handled, %FALSE if not
29413 // <tooltips>: the #GtkTooltips
29414 // <tip_text>: the tooltip text
29415 // <tip_private>: the tooltip private text
29416 extern (C) alias static c_int function (ToolItem* this_, Tooltips* tooltips, char* tip_text, char* tip_private, void* user_data=null) signal_set_tooltip;
29417 ulong signal_connect(string name:"set-tooltip", CB/*:signal_set_tooltip*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29418 return signal_connect_data(&this, cast(char*)"set-tooltip",
29419 cast(GObject2.Callback)cb, data, null, cf);
29422 // This signal is emitted when some property of the toolbar that the
29423 // item is a child of changes. For custom subclasses of #GtkToolItem,
29424 // the default handler of this signal use the functions
29425 // <itemizedlist>
29426 // <listitem>gtk_tool_shell_get_orientation()</listitem>
29427 // <listitem>gtk_tool_shell_get_style()</listitem>
29428 // <listitem>gtk_tool_shell_get_icon_size()</listitem>
29429 // <listitem>gtk_tool_shell_get_relief_style()</listitem>
29430 // </itemizedlist>
29431 // to find out what the toolbar should look like and change
29432 // themselves accordingly.
29433 extern (C) alias static void function (ToolItem* this_, void* user_data=null) signal_toolbar_reconfigured;
29434 ulong signal_connect(string name:"toolbar-reconfigured", CB/*:signal_toolbar_reconfigured*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29435 return signal_connect_data(&this, cast(char*)"toolbar-reconfigured",
29436 cast(GObject2.Callback)cb, data, null, cf);
29440 struct ToolItemClass {
29441 BinClass parent_class;
29442 extern (C) int function (ToolItem* tool_item) create_menu_proxy;
29443 extern (C) void function (ToolItem* tool_item) toolbar_reconfigured;
29444 extern (C) int function (ToolItem* tool_item, Tooltips* tooltips, char* tip_text, char* tip_private) set_tooltip;
29445 extern (C) void function () _gtk_reserved1;
29446 extern (C) void function () _gtk_reserved2;
29447 extern (C) void function () _gtk_reserved3;
29448 extern (C) void function () _gtk_reserved4;
29452 // A #GtkToolItemGroup is used together with #GtkToolPalette to add
29453 // #GtkToolItem<!-- -->s to a palette like container with different
29454 // categories and drag and drop support.
29455 struct ToolItemGroup /* : Container */ {
29456 alias parent_instance this;
29457 alias parent_instance super_;
29458 alias parent_instance container;
29459 Container parent_instance;
29460 ToolItemGroupPrivate* priv;
29463 // Creates a new tool item group with label @label.
29464 // RETURNS: a new #GtkToolItemGroup.
29465 // <label>: the label of the new group
29466 static ToolItemGroup* new_(char* label) {
29467 return gtk_tool_item_group_new(label);
29470 // Gets whether @group is collapsed or expanded.
29471 // RETURNS: %TRUE if @group is collapsed, %FALSE if it is expanded
29472 int get_collapsed() {
29473 return gtk_tool_item_group_get_collapsed(&this);
29476 // Gets the tool item at position (x, y).
29477 // RETURNS: the #GtkToolItem at position (x, y)
29478 // <x>: the x position
29479 // <y>: the y position
29480 ToolItem* get_drop_item(int x, int y) {
29481 return gtk_tool_item_group_get_drop_item(&this, x, y);
29484 // Gets the ellipsization mode of @group.
29485 // RETURNS: the #PangoEllipsizeMode of @group
29486 Pango.EllipsizeMode get_ellipsize() {
29487 return gtk_tool_item_group_get_ellipsize(&this);
29490 // Gets the relief mode of the header button of @group.
29491 // RETURNS: the #GtkReliefStyle
29492 ReliefStyle get_header_relief() {
29493 return gtk_tool_item_group_get_header_relief(&this);
29496 // Gets the position of @item in @group as index.
29497 // RETURNS: the index of @item in @group or -1 if @item is no child of @group
29498 // <item>: a #GtkToolItem
29499 int get_item_position(ToolItem* item) {
29500 return gtk_tool_item_group_get_item_position(&this, item);
29503 // Gets the label of @group.
29504 // and must not be modified. Note that %NULL is returned if a custom
29505 // label has been set with gtk_tool_item_group_set_label_widget()
29506 // RETURNS: the label of @group. The label is an internal string of @group
29507 char* get_label() {
29508 return gtk_tool_item_group_get_label(&this);
29511 // Gets the label widget of @group.
29512 // See gtk_tool_item_group_set_label_widget().
29513 // RETURNS: the label widget of @group
29514 Widget* get_label_widget() {
29515 return gtk_tool_item_group_get_label_widget(&this);
29518 // Gets the number of tool items in @group.
29519 // RETURNS: the number of tool items in @group
29520 uint get_n_items() {
29521 return gtk_tool_item_group_get_n_items(&this);
29524 // Gets the tool item at @index in group.
29525 // RETURNS: the #GtkToolItem at index
29526 // <index>: the index
29527 ToolItem* get_nth_item(uint index) {
29528 return gtk_tool_item_group_get_nth_item(&this, index);
29531 // Inserts @item at @position in the list of children of @group.
29532 // <item>: the #GtkToolItem to insert into @group
29533 // <position>: the position of @item in @group, starting with 0. The position -1 means end of list.
29534 void insert(ToolItem* item, int position) {
29535 gtk_tool_item_group_insert(&this, item, position);
29538 // Sets whether the @group should be collapsed or expanded.
29539 // <collapsed>: whether the @group should be collapsed or expanded
29540 void set_collapsed(int collapsed) {
29541 gtk_tool_item_group_set_collapsed(&this, collapsed);
29544 // Sets the ellipsization mode which should be used by labels in @group.
29545 // <ellipsize>: the #PangoEllipsizeMode labels in @group should use
29546 void set_ellipsize(Pango.EllipsizeMode ellipsize) {
29547 gtk_tool_item_group_set_ellipsize(&this, ellipsize);
29550 // Set the button relief of the group header.
29551 // See gtk_button_set_relief() for details.
29552 // <style>: the #GtkReliefStyle
29553 void set_header_relief(ReliefStyle style) {
29554 gtk_tool_item_group_set_header_relief(&this, style);
29557 // Sets the position of @item in the list of children of @group.
29558 // <item>: the #GtkToolItem to move to a new position, should be a child of @group.
29559 // <position>: the new position of @item in @group, starting with 0. The position -1 means end of list.
29560 void set_item_position(ToolItem* item, int position) {
29561 gtk_tool_item_group_set_item_position(&this, item, position);
29564 // Sets the label of the tool item group. The label is displayed in the header
29565 // of the group.
29566 // <label>: the new human-readable label of of the group
29567 void set_label(char* label) {
29568 gtk_tool_item_group_set_label(&this, label);
29571 // Sets the label of the tool item group.
29572 // The label widget is displayed in the header of the group, in place
29573 // of the usual label.
29574 // <label_widget>: the widget to be displayed in place of the usual label
29575 void set_label_widget(Widget* label_widget) {
29576 gtk_tool_item_group_set_label_widget(&this, label_widget);
29580 struct ToolItemGroupClass {
29581 ContainerClass parent_class;
29584 struct ToolItemGroupPrivate {
29587 struct ToolItemPrivate {
29591 // A #GtkToolPalette allows you to add #GtkToolItem<!-- -->s to a palette-like
29592 // container with different categories and drag and drop support.
29593 // A #GtkToolPalette is created with a call to gtk_tool_palette_new().
29594 // #GtkToolItem<!-- -->s cannot be added directly to a #GtkToolPalette -
29595 // instead they are added to a #GtkToolItemGroup which can than be added
29596 // to a #GtkToolPalette. To add a #GtkToolItemGroup to a #GtkToolPalette,
29597 // use gtk_container_add().
29598 // |[
29599 // GtkWidget *palette, *group;
29600 // GtkToolItem *item;
29601 // palette = gtk_tool_palette_new ();
29602 // group = gtk_tool_item_group_new (_("Test Category"));
29603 // gtk_container_add (GTK_CONTAINER (palette), group);
29604 // item = gtk_tool_button_new_from_stock (GTK_STOCK_OK);
29605 // gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
29606 // ]|
29607 // The easiest way to use drag and drop with #GtkToolPalette is to call
29608 // gtk_tool_palette_add_drag_dest() with the desired drag source @palette
29609 // and the desired drag target @widget. Then gtk_tool_palette_get_drag_item()
29610 // can be used to get the dragged item in the #GtkWidget::drag-data-received
29611 // signal handler of the drag target.
29612 // |[
29613 // static void
29614 // passive_canvas_drag_data_received (GtkWidget *widget,
29615 // GdkDragContext *context,
29616 // gint x,
29617 // gint y,
29618 // GtkSelectionData *selection,
29619 // guint info,
29620 // guint time,
29621 // gpointer data)
29622 // {
29623 // GtkWidget *palette;
29624 // GtkWidget *item;
29625 // /<!-- -->* Get the dragged item *<!-- -->/
29626 // palette = gtk_widget_get_ancestor (gtk_drag_get_source_widget (context),
29627 // GTK_TYPE_TOOL_PALETTE);
29628 // if (palette != NULL)
29629 // item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
29630 // selection);
29631 // /<!-- -->* Do something with item *<!-- -->/
29632 // }
29633 // GtkWidget *target, palette;
29634 // palette = gtk_tool_palette_new ();
29635 // target = gtk_drawing_area_new ();
29636 // g_signal_connect (G_OBJECT (target), "drag-data-received",
29637 // G_CALLBACK (passive_canvas_drag_data_received), NULL);
29638 // gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette), target,
29639 // GTK_DEST_DEFAULT_ALL,
29640 // GTK_TOOL_PALETTE_DRAG_ITEMS,
29641 // GDK_ACTION_COPY);
29642 // ]|
29643 struct ToolPalette /* : Container */ {
29644 alias parent_instance this;
29645 alias parent_instance super_;
29646 alias parent_instance container;
29647 Container parent_instance;
29648 ToolPalettePrivate* priv;
29651 // Creates a new tool palette.
29652 // RETURNS: a new #GtkToolPalette
29653 static ToolPalette* new_() {
29654 return gtk_tool_palette_new();
29657 // Get the target entry for a dragged #GtkToolItemGroup.
29658 // RETURNS: the #GtkTargetEntry for a dragged group
29659 static TargetEntry* get_drag_target_group() {
29660 return gtk_tool_palette_get_drag_target_group();
29663 // Gets the target entry for a dragged #GtkToolItem.
29664 // RETURNS: the #GtkTargetEntry for a dragged item.
29665 static TargetEntry* get_drag_target_item() {
29666 return gtk_tool_palette_get_drag_target_item();
29669 // Sets @palette as drag source (see gtk_tool_palette_set_drag_source())
29670 // and sets @widget as a drag destination for drags from @palette.
29671 // See gtk_drag_dest_set().
29672 // <widget>: a #GtkWidget which should be a drag destination for @palette
29673 // <flags>: the flags that specify what actions GTK+ should take for drops on that widget
29674 // <targets>: the #GtkToolPaletteDragTarget<!-- -->s which the widget should support
29675 // <actions>: the #GdkDragAction<!-- -->s which the widget should suppport
29676 void add_drag_dest(Widget* widget, DestDefaults flags, ToolPaletteDragTargets targets, Gdk2.DragAction actions) {
29677 gtk_tool_palette_add_drag_dest(&this, widget, flags, targets, actions);
29680 // Get the dragged item from the selection.
29681 // This could be a #GtkToolItem or a #GtkToolItemGroup.
29682 // RETURNS: the dragged item in selection
29683 // <selection>: a #GtkSelectionData
29684 Widget* get_drag_item(SelectionData* selection) {
29685 return gtk_tool_palette_get_drag_item(&this, selection);
29688 // Gets the group at position (x, y).
29689 // if there is no such group
29690 // RETURNS: the #GtkToolItemGroup at position or %NULL
29691 // <x>: the x position
29692 // <y>: the y position
29693 ToolItemGroup* get_drop_group(int x, int y) {
29694 return gtk_tool_palette_get_drop_group(&this, x, y);
29697 // Gets the item at position (x, y).
29698 // See gtk_tool_palette_get_drop_group().
29699 // RETURNS: the #GtkToolItem at position or %NULL if there is no such item
29700 // <x>: the x position
29701 // <y>: the y position
29702 ToolItem* get_drop_item(int x, int y) {
29703 return gtk_tool_palette_get_drop_item(&this, x, y);
29706 // Gets whether @group is exclusive or not.
29707 // See gtk_tool_palette_set_exclusive().
29708 // RETURNS: %TRUE if @group is exclusive
29709 // <group>: a #GtkToolItemGroup which is a child of palette
29710 int get_exclusive(ToolItemGroup* group) {
29711 return gtk_tool_palette_get_exclusive(&this, group);
29714 // Gets whether group should be given extra space.
29715 // See gtk_tool_palette_set_expand().
29716 // RETURNS: %TRUE if group should be given extra space, %FALSE otherwise
29717 // <group>: a #GtkToolItemGroup which is a child of palette
29718 int get_expand(ToolItemGroup* group) {
29719 return gtk_tool_palette_get_expand(&this, group);
29722 // Gets the position of @group in @palette as index.
29723 // See gtk_tool_palette_set_group_position().
29724 // RETURNS: the index of group or -1 if @group is not a child of @palette
29725 // <group>: a #GtkToolItemGroup
29726 int get_group_position(ToolItemGroup* group) {
29727 return gtk_tool_palette_get_group_position(&this, group);
29730 // Gets the horizontal adjustment of the tool palette.
29731 // RETURNS: the horizontal adjustment of @palette
29732 Adjustment* get_hadjustment() {
29733 return gtk_tool_palette_get_hadjustment(&this);
29736 // Gets the size of icons in the tool palette.
29737 // See gtk_tool_palette_set_icon_size().
29738 // RETURNS: the #GtkIconSize of icons in the tool palette
29739 int get_icon_size() {
29740 return gtk_tool_palette_get_icon_size(&this);
29743 // Gets the style (icons, text or both) of items in the tool palette.
29744 // RETURNS: the #GtkToolbarStyle of items in the tool palette.
29745 ToolbarStyle get_style() {
29746 return gtk_tool_palette_get_style(&this);
29749 // Gets the vertical adjustment of the tool palette.
29750 // RETURNS: the vertical adjustment of @palette
29751 Adjustment* get_vadjustment() {
29752 return gtk_tool_palette_get_vadjustment(&this);
29755 // Sets the tool palette as a drag source.
29756 // Enables all groups and items in the tool palette as drag sources
29757 // on button 1 and button 3 press with copy and move actions.
29758 // See gtk_drag_source_set().
29759 // <targets>: the #GtkToolPaletteDragTarget<!-- -->s which the widget should support
29760 void set_drag_source(ToolPaletteDragTargets targets) {
29761 gtk_tool_palette_set_drag_source(&this, targets);
29764 // Sets whether the group should be exclusive or not.
29765 // If an exclusive group is expanded all other groups are collapsed.
29766 // <group>: a #GtkToolItemGroup which is a child of palette
29767 // <exclusive>: whether the group should be exclusive or not
29768 void set_exclusive(ToolItemGroup* group, int exclusive) {
29769 gtk_tool_palette_set_exclusive(&this, group, exclusive);
29772 // Sets whether the group should be given extra space.
29773 // <group>: a #GtkToolItemGroup which is a child of palette
29774 // <expand>: whether the group should be given extra space
29775 void set_expand(ToolItemGroup* group, int expand) {
29776 gtk_tool_palette_set_expand(&this, group, expand);
29779 // Sets the position of the group as an index of the tool palette.
29780 // If position is 0 the group will become the first child, if position is
29781 // -1 it will become the last child.
29782 // <group>: a #GtkToolItemGroup which is a child of palette
29783 // <position>: a new index for group
29784 void set_group_position(ToolItemGroup* group, int position) {
29785 gtk_tool_palette_set_group_position(&this, group, position);
29788 // Sets the size of icons in the tool palette.
29789 // <icon_size>: the #GtkIconSize that icons in the tool palette shall have
29790 void set_icon_size(int icon_size) {
29791 gtk_tool_palette_set_icon_size(&this, icon_size);
29794 // Sets the style (text, icons or both) of items in the tool palette.
29795 // <style>: the #GtkToolbarStyle that items in the tool palette shall have
29796 void set_style(ToolbarStyle style) {
29797 gtk_tool_palette_set_style(&this, style);
29800 // Unsets the tool palette icon size set with gtk_tool_palette_set_icon_size(),
29801 // so that user preferences will be used to determine the icon size.
29802 void unset_icon_size() {
29803 gtk_tool_palette_unset_icon_size(&this);
29806 // Unsets a toolbar style set with gtk_tool_palette_set_style(),
29807 // so that user preferences will be used to determine the toolbar style.
29808 void unset_style() {
29809 gtk_tool_palette_unset_style(&this);
29812 // Set the scroll adjustments for the viewport.
29813 // Usually scrolled containers like GtkScrolledWindow will emit this
29814 // signal to connect two instances of GtkScrollbar to the scroll
29815 // directions of the GtkToolpalette.
29816 // <hadjustment>: The horizontal adjustment
29817 // <vadjustment>: The vertical adjustment
29818 extern (C) alias static void function (ToolPalette* this_, Adjustment* hadjustment, Adjustment* vadjustment, void* user_data=null) signal_set_scroll_adjustments;
29820 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29821 return super_.signal_connect!name(cb, data, cf);
29824 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29825 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
29826 cast(GObject2.Callback)cb, data, null, cf);
29830 struct ToolPaletteClass {
29831 ContainerClass parent_class;
29832 extern (C) void function (Widget* widget, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
29833 extern (C) void function () _gtk_reserved1;
29834 extern (C) void function () _gtk_reserved2;
29835 extern (C) void function () _gtk_reserved3;
29836 extern (C) void function () _gtk_reserved4;
29837 extern (C) void function () _gtk_reserved5;
29838 extern (C) void function () _gtk_reserved6;
29841 // Flags used to specify the supported drag targets.
29842 enum ToolPaletteDragTargets {
29843 ITEMS = 1,
29844 GROUPS = 2
29846 struct ToolPalettePrivate {
29850 // The #GtkToolShell interface allows container widgets to provide additional
29851 // information when embedding #GtkToolItem widgets.
29852 struct ToolShell {
29854 // Retrieves the current ellipsize mode for the tool shell. Tool items must not
29855 // call this function directly, but rely on gtk_tool_item_get_ellipsize_mode()
29856 // instead.
29857 // RETURNS: the current ellipsize mode of @shell
29858 Pango.EllipsizeMode get_ellipsize_mode() {
29859 return gtk_tool_shell_get_ellipsize_mode(&this);
29862 // Retrieves the icon size for the tool shell. Tool items must not call this
29863 // function directly, but rely on gtk_tool_item_get_icon_size() instead.
29864 // RETURNS: the current size for icons of @shell
29865 int get_icon_size() {
29866 return gtk_tool_shell_get_icon_size(&this);
29869 // Retrieves the current orientation for the tool shell. Tool items must not
29870 // call this function directly, but rely on gtk_tool_item_get_orientation()
29871 // instead.
29872 // RETURNS: the current orientation of @shell
29873 Orientation get_orientation() {
29874 return gtk_tool_shell_get_orientation(&this);
29877 // Returns the relief style of buttons on @shell. Tool items must not call this
29878 // function directly, but rely on gtk_tool_item_get_relief_style() instead.
29879 // RETURNS: The relief style of buttons on @shell.
29880 ReliefStyle get_relief_style() {
29881 return gtk_tool_shell_get_relief_style(&this);
29884 // Retrieves whether the tool shell has text, icons, or both. Tool items must
29885 // not call this function directly, but rely on gtk_tool_item_get_style()
29886 // instead.
29887 // RETURNS: the current style of @shell
29888 ToolbarStyle get_style() {
29889 return gtk_tool_shell_get_style(&this);
29892 // Retrieves the current text alignment for the tool shell. Tool items must not
29893 // call this function directly, but rely on gtk_tool_item_get_text_alignment()
29894 // instead.
29895 // RETURNS: the current text alignment of @shell
29896 float get_text_alignment() {
29897 return gtk_tool_shell_get_text_alignment(&this);
29900 // Retrieves the current text orientation for the tool shell. Tool items must not
29901 // call this function directly, but rely on gtk_tool_item_get_text_orientation()
29902 // instead.
29903 // RETURNS: the current text orientation of @shell
29904 Orientation get_text_orientation() {
29905 return gtk_tool_shell_get_text_orientation(&this);
29908 // Retrieves the current text size group for the tool shell. Tool items must not
29909 // call this function directly, but rely on gtk_tool_item_get_text_size_group()
29910 // instead.
29911 // RETURNS: the current text size group of @shell
29912 SizeGroup* get_text_size_group() {
29913 return gtk_tool_shell_get_text_size_group(&this);
29916 // Calling this function signals the tool shell that the overflow menu item for
29917 // tool items have changed. If there is an overflow menu and if it is visible
29918 // when this function it called, the menu will be rebuilt.
29919 // Tool items must not call this function directly, but rely on
29920 // gtk_tool_item_rebuild_menu() instead.
29921 void rebuild_menu() {
29922 gtk_tool_shell_rebuild_menu(&this);
29926 // Virtual function table for the #GtkToolShell interface.
29927 struct ToolShellIface {
29928 private GObject2.TypeInterface g_iface;
29929 extern (C) IconSize function (ToolShell* shell) get_icon_size;
29930 // RETURNS: the current orientation of @shell
29931 extern (C) Orientation function (ToolShell* shell) get_orientation;
29932 // RETURNS: the current style of @shell
29933 extern (C) ToolbarStyle function (ToolShell* shell) get_style;
29934 // RETURNS: The relief style of buttons on @shell.
29935 extern (C) ReliefStyle function (ToolShell* shell) get_relief_style;
29936 extern (C) void function (ToolShell* shell) rebuild_menu;
29937 // RETURNS: the current text orientation of @shell
29938 extern (C) Orientation function (ToolShell* shell) get_text_orientation;
29939 // RETURNS: the current text alignment of @shell
29940 extern (C) float function (ToolShell* shell) get_text_alignment;
29941 // RETURNS: the current ellipsize mode of @shell
29942 extern (C) Pango.EllipsizeMode function (ToolShell* shell) get_ellipsize_mode;
29943 // RETURNS: the current text size group of @shell
29944 extern (C) SizeGroup* function (ToolShell* shell) get_text_size_group;
29947 struct Toolbar /* : Container */ {
29948 alias container this;
29949 alias container super_;
29950 Container container;
29951 int num_children;
29952 GLib2.List* children;
29953 Orientation orientation;
29954 ToolbarStyle style;
29955 IconSize icon_size;
29956 Tooltips* tooltips;
29957 private int button_maxw, button_maxh;
29958 private uint _gtk_reserved1, _gtk_reserved2;
29959 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29960 uint, "style_set", 1,
29961 uint, "icon_size_set", 1,
29962 uint, "__dummy32A", 30));
29965 // Creates a new toolbar.
29966 // RETURNS: the newly-created toolbar.
29967 static Toolbar* new_() {
29968 return gtk_toolbar_new();
29971 // Unintrospectable method: append_element() / gtk_toolbar_append_element()
29972 // Adds a new element to the end of a toolbar.
29973 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
29974 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
29975 // the radio group for the new element. In all other cases, @widget must
29976 // be %NULL.
29977 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
29978 // RETURNS: the new toolbar element as a #GtkWidget.
29979 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
29980 // <widget>: a #GtkWidget, or %NULL.
29981 // <text>: the element's label.
29982 // <tooltip_text>: the element's tooltip.
29983 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
29984 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
29985 // <callback>: the function to be executed when the button is pressed.
29986 // <user_data>: any data you wish to pass to the callback.
29987 Widget* append_element(ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
29988 return gtk_toolbar_append_element(&this, type, widget, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
29991 // Unintrospectable method: append_item() / gtk_toolbar_append_item()
29992 // Inserts a new item into the toolbar. You must specify the position
29993 // in the toolbar where it will be inserted.
29994 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
29995 // RETURNS: the new toolbar item as a #GtkWidget.
29996 // <text>: give your toolbar button a label.
29997 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
29998 // <tooltip_private_text>: use with #GtkTipsQuery.
29999 // <icon>: a #GtkWidget that should be used as the button's icon.
30000 // <callback>: the function to be executed when the button is pressed.
30001 // <user_data>: a pointer to any data you wish to be passed to the callback.
30002 Widget* append_item(char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
30003 return gtk_toolbar_append_item(&this, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
30005 // Adds a new space to the end of the toolbar.
30006 void append_space() {
30007 gtk_toolbar_append_space(&this);
30010 // Adds a widget to the end of the given toolbar.
30011 // <widget>: a #GtkWidget to add to the toolbar.
30012 // <tooltip_text>: the element's tooltip.
30013 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
30014 void append_widget(Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null) {
30015 gtk_toolbar_append_widget(&this, widget, tooltip_text, tooltip_private_text);
30018 // Returns the position corresponding to the indicated point on
30019 // this function returns the position a new item should be
30020 // inserted.
30021 // RETURNS: The position corresponding to the point (@x, @y) on the toolbar.
30022 // <x>: x coordinate of a point on the toolbar
30023 // <y>: y coordinate of a point on the toolbar
30024 int get_drop_index(int x, int y) {
30025 return gtk_toolbar_get_drop_index(&this, x, y);
30028 // Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size().
30029 // the toolbar.
30030 // RETURNS: the current icon size for the icons on
30031 int get_icon_size() {
30032 return gtk_toolbar_get_icon_size(&this);
30035 // Returns the position of @item on the toolbar, starting from 0.
30036 // It is an error if @item is not a child of the toolbar.
30037 // RETURNS: the position of item on the toolbar.
30038 // <item>: a #GtkToolItem that is a child of @toolbar
30039 int get_item_index(ToolItem* item) {
30040 return gtk_toolbar_get_item_index(&this, item);
30043 // Returns the number of items on the toolbar.
30044 // RETURNS: the number of items on the toolbar
30045 int get_n_items() {
30046 return gtk_toolbar_get_n_items(&this);
30049 // Returns the @n<!-- -->'th item on @toolbar, or %NULL if the
30050 // toolbar does not contain an @n<!-- -->'th item.
30051 // or %NULL if there isn't an @n<!-- -->'th item.
30052 // RETURNS: The @n<!-- -->'th #GtkToolItem on @toolbar,
30053 // <n>: A position on the toolbar
30054 ToolItem* get_nth_item(int n) {
30055 return gtk_toolbar_get_nth_item(&this, n);
30058 // Retrieves the current orientation of the toolbar. See
30059 // gtk_toolbar_set_orientation().
30060 // RETURNS: the orientation
30061 Orientation get_orientation() {
30062 return gtk_toolbar_get_orientation(&this);
30065 // Returns the relief style of buttons on @toolbar. See
30066 // gtk_button_set_relief().
30067 // RETURNS: The relief style of buttons on @toolbar.
30068 ReliefStyle get_relief_style() {
30069 return gtk_toolbar_get_relief_style(&this);
30072 // Returns whether the toolbar has an overflow menu.
30073 // See gtk_toolbar_set_show_arrow().
30074 // RETURNS: %TRUE if the toolbar has an overflow menu.
30075 int get_show_arrow() {
30076 return gtk_toolbar_get_show_arrow(&this);
30079 // Retrieves whether the toolbar has text, icons, or both . See
30080 // gtk_toolbar_set_style().
30081 // RETURNS: the current style of @toolbar
30082 ToolbarStyle get_style() {
30083 return gtk_toolbar_get_style(&this);
30086 // Retrieves whether tooltips are enabled. See
30087 // gtk_toolbar_set_tooltips().
30088 // is now used instead.
30089 // RETURNS: %TRUE if tooltips are enabled
30090 int get_tooltips() {
30091 return gtk_toolbar_get_tooltips(&this);
30094 // Insert a #GtkToolItem into the toolbar at position @pos. If @pos is
30095 // 0 the item is prepended to the start of the toolbar. If @pos is
30096 // negative, the item is appended to the end of the toolbar.
30097 // <item>: a #GtkToolItem
30098 // <pos>: the position of the new item
30099 void insert(ToolItem* item, int pos) {
30100 gtk_toolbar_insert(&this, item, pos);
30103 // Unintrospectable method: insert_element() / gtk_toolbar_insert_element()
30104 // Inserts a new element in the toolbar at the given position.
30105 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
30106 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
30107 // the radio group for the new element. In all other cases, @widget must
30108 // be %NULL.
30109 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
30110 // RETURNS: the new toolbar element as a #GtkWidget.
30111 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
30112 // <widget>: a #GtkWidget, or %NULL.
30113 // <text>: the element's label.
30114 // <tooltip_text>: the element's tooltip.
30115 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
30116 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
30117 // <callback>: the function to be executed when the button is pressed.
30118 // <user_data>: any data you wish to pass to the callback.
30119 // <position>: the number of widgets to insert this element after.
30120 Widget* insert_element(ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data, int position) {
30121 return gtk_toolbar_insert_element(&this, type, widget, text, tooltip_text, tooltip_private_text, icon, callback, user_data, position);
30124 // Unintrospectable method: insert_item() / gtk_toolbar_insert_item()
30125 // Inserts a new item into the toolbar. You must specify the position in the
30126 // toolbar where it will be inserted.
30127 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
30128 // RETURNS: the new toolbar item as a #GtkWidget.
30129 // <text>: give your toolbar button a label.
30130 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
30131 // <tooltip_private_text>: use with #GtkTipsQuery.
30132 // <icon>: a #GtkWidget that should be used as the button's icon.
30133 // <callback>: the function to be executed when the button is pressed.
30134 // <user_data>: a pointer to any data you wish to be passed to the callback.
30135 // <position>: the number of widgets to insert this item after.
30136 Widget* insert_item(char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data, int position) {
30137 return gtk_toolbar_insert_item(&this, text, tooltip_text, tooltip_private_text, icon, callback, user_data, position);
30140 // Inserts a new space in the toolbar at the specified position.
30141 // <position>: the number of widgets after which a space should be inserted.
30142 void insert_space(int position) {
30143 gtk_toolbar_insert_space(&this, position);
30146 // Unintrospectable method: insert_stock() / gtk_toolbar_insert_stock()
30147 // Inserts a stock item at the specified position of the toolbar. If
30148 // except that underscores used to mark mnemonics are removed.
30149 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
30150 // RETURNS: the inserted widget
30151 // <stock_id>: The id of the stock item you want to insert
30152 // <tooltip_text>: The text in the tooltip of the toolbar button
30153 // <tooltip_private_text>: The private text of the tooltip
30154 // <callback>: The callback called when the toolbar button is clicked.
30155 // <user_data>: user data passed to callback
30156 // <position>: The position the button shall be inserted at. -1 means at the end.
30157 Widget* insert_stock(char* stock_id, char* tooltip_text, char* tooltip_private_text, GObject2.Callback callback, void* user_data, int position) {
30158 return gtk_toolbar_insert_stock(&this, stock_id, tooltip_text, tooltip_private_text, callback, user_data, position);
30161 // Inserts a widget in the toolbar at the given position.
30162 // <widget>: a #GtkWidget to add to the toolbar.
30163 // <tooltip_text>: the element's tooltip.
30164 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
30165 // <position>: the number of widgets to insert this widget after.
30166 void insert_widget(Widget* widget, char* tooltip_text, char* tooltip_private_text, int position) {
30167 gtk_toolbar_insert_widget(&this, widget, tooltip_text, tooltip_private_text, position);
30170 // Unintrospectable method: prepend_element() / gtk_toolbar_prepend_element()
30171 // Adds a new element to the beginning of a toolbar.
30172 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
30173 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
30174 // the radio group for the new element. In all other cases, @widget must
30175 // be %NULL.
30176 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
30177 // RETURNS: the new toolbar element as a #GtkWidget.
30178 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
30179 // <widget>: a #GtkWidget, or %NULL
30180 // <text>: the element's label.
30181 // <tooltip_text>: the element's tooltip.
30182 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
30183 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
30184 // <callback>: the function to be executed when the button is pressed.
30185 // <user_data>: any data you wish to pass to the callback.
30186 Widget* prepend_element(ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
30187 return gtk_toolbar_prepend_element(&this, type, widget, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
30190 // Unintrospectable method: prepend_item() / gtk_toolbar_prepend_item()
30191 // Adds a new button to the beginning (top or left edges) of the given toolbar.
30192 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
30193 // RETURNS: the new toolbar item as a #GtkWidget.
30194 // <text>: give your toolbar button a label.
30195 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
30196 // <tooltip_private_text>: use with #GtkTipsQuery.
30197 // <icon>: a #GtkWidget that should be used as the button's icon.
30198 // <callback>: the function to be executed when the button is pressed.
30199 // <user_data>: a pointer to any data you wish to be passed to the callback.
30200 Widget* prepend_item(char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
30201 return gtk_toolbar_prepend_item(&this, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
30203 // Adds a new space to the beginning of the toolbar.
30204 void prepend_space() {
30205 gtk_toolbar_prepend_space(&this);
30208 // Adds a widget to the beginning of the given toolbar.
30209 // <widget>: a #GtkWidget to add to the toolbar.
30210 // <tooltip_text>: the element's tooltip.
30211 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
30212 void prepend_widget(Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null) {
30213 gtk_toolbar_prepend_widget(&this, widget, tooltip_text, tooltip_private_text);
30216 // Removes a space from the specified position.
30217 // <position>: the index of the space to remove.
30218 void remove_space(int position) {
30219 gtk_toolbar_remove_space(&this, position);
30222 // Highlights @toolbar to give an idea of what it would look like
30223 // if @item was added to @toolbar at the position indicated by @index_.
30224 // If @item is %NULL, highlighting is turned off. In that case @index_
30225 // is ignored.
30226 // The @tool_item passed to this function must not be part of any widget
30227 // hierarchy. When an item is set as drop highlight item it can not
30228 // added to any widget hierarchy or used as highlight item for another
30229 // toolbar.
30230 // <tool_item>: a #GtkToolItem, or %NULL to turn of highlighting
30231 // <index_>: a position on @toolbar
30232 void set_drop_highlight_item(ToolItem* tool_item, int index_) {
30233 gtk_toolbar_set_drop_highlight_item(&this, tool_item, index_);
30236 // This function sets the size of stock icons in the toolbar. You
30237 // can call it both before you add the icons and after they've been
30238 // added. The size you set will override user preferences for the default
30239 // icon size.
30240 // This should only be used for special-purpose toolbars, normal
30241 // application toolbars should respect the user preferences for the
30242 // size of icons.
30243 // <icon_size>: The #GtkIconSize that stock icons in the toolbar shall have.
30244 void set_icon_size(int icon_size) {
30245 gtk_toolbar_set_icon_size(&this, icon_size);
30248 // Sets whether a toolbar should appear horizontally or vertically.
30249 // <orientation>: a new #GtkOrientation.
30250 void set_orientation(Orientation orientation) {
30251 gtk_toolbar_set_orientation(&this, orientation);
30254 // Sets whether to show an overflow menu when
30255 // items that there are not room are available through an
30256 // overflow menu.
30257 // <show_arrow>: Whether to show an overflow menu
30258 void set_show_arrow(int show_arrow) {
30259 gtk_toolbar_set_show_arrow(&this, show_arrow);
30262 // Alters the view of @toolbar to display either icons only, text only, or both.
30263 // <style>: the new style for @toolbar.
30264 void set_style(ToolbarStyle style) {
30265 gtk_toolbar_set_style(&this, style);
30268 // Sets if the tooltips of a toolbar should be active or not.
30269 // is now used instead.
30270 // <enable>: set to %FALSE to disable the tooltips, or %TRUE to enable them.
30271 void set_tooltips(int enable) {
30272 gtk_toolbar_set_tooltips(&this, enable);
30275 // Unsets toolbar icon size set with gtk_toolbar_set_icon_size(), so that
30276 // user preferences will be used to determine the icon size.
30277 void unset_icon_size() {
30278 gtk_toolbar_unset_icon_size(&this);
30281 // Unsets a toolbar style set with gtk_toolbar_set_style(), so that
30282 // user preferences will be used to determine the toolbar style.
30283 void unset_style() {
30284 gtk_toolbar_unset_style(&this);
30287 // A keybinding signal used internally by GTK+. This signal can't
30288 // be used in application code
30289 // RETURNS: %TRUE if the signal was handled, %FALSE if not
30290 // <focus_home>: %TRUE if the first item should be focused
30291 extern (C) alias static c_int function (Toolbar* this_, c_int focus_home, void* user_data=null) signal_focus_home_or_end;
30293 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30294 return super_.signal_connect!name(cb, data, cf);
30297 ulong signal_connect(string name:"focus-home-or-end", CB/*:signal_focus_home_or_end*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30298 return signal_connect_data(&this, cast(char*)"focus-home-or-end",
30299 cast(GObject2.Callback)cb, data, null, cf);
30302 // Emitted when the orientation of the toolbar changes.
30303 // <orientation>: the new #GtkOrientation of the toolbar
30304 extern (C) alias static void function (Toolbar* this_, Orientation* orientation, void* user_data=null) signal_orientation_changed;
30305 ulong signal_connect(string name:"orientation-changed", CB/*:signal_orientation_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30306 return signal_connect_data(&this, cast(char*)"orientation-changed",
30307 cast(GObject2.Callback)cb, data, null, cf);
30310 // Emitted when the user right-clicks the toolbar or uses the
30311 // keybinding to display a popup menu.
30312 // Application developers should handle this signal if they want
30313 // to display a context menu on the toolbar. The context-menu should
30314 // appear at the coordinates given by @x and @y. The mouse button
30315 // number is given by the @button parameter. If the menu was popped
30316 // up using the keybaord, @button is -1.
30317 // RETURNS: return %TRUE if the signal was handled, %FALSE if not
30318 // <x>: the x coordinate of the point where the menu should appear
30319 // <y>: the y coordinate of the point where the menu should appear
30320 // <button>: the mouse button the user pressed, or -1
30321 extern (C) alias static c_int function (Toolbar* this_, int x, int y, int button, void* user_data=null) signal_popup_context_menu;
30322 ulong signal_connect(string name:"popup-context-menu", CB/*:signal_popup_context_menu*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30323 return signal_connect_data(&this, cast(char*)"popup-context-menu",
30324 cast(GObject2.Callback)cb, data, null, cf);
30327 // Emitted when the style of the toolbar changes.
30328 // <style>: the new #GtkToolbarStyle of the toolbar
30329 extern (C) alias static void function (Toolbar* this_, ToolbarStyle* style, void* user_data=null) signal_style_changed;
30330 ulong signal_connect(string name:"style-changed", CB/*:signal_style_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30331 return signal_connect_data(&this, cast(char*)"style-changed",
30332 cast(GObject2.Callback)cb, data, null, cf);
30336 struct ToolbarChild {
30337 ToolbarChildType type;
30338 Widget* widget, icon, label;
30341 enum ToolbarChildType {
30342 SPACE = 0,
30343 BUTTON = 1,
30344 TOGGLEBUTTON = 2,
30345 RADIOBUTTON = 3,
30346 WIDGET = 4
30348 struct ToolbarClass {
30349 ContainerClass parent_class;
30350 extern (C) void function (Toolbar* toolbar, Orientation orientation) orientation_changed;
30351 extern (C) void function (Toolbar* toolbar, ToolbarStyle style) style_changed;
30352 extern (C) int function (Toolbar* toolbar, int x, int y, int button_number) popup_context_menu;
30353 extern (C) void function () _gtk_reserved1;
30354 extern (C) void function () _gtk_reserved2;
30355 extern (C) void function () _gtk_reserved3;
30358 struct ToolbarPrivate {
30361 enum ToolbarSpaceStyle {
30362 EMPTY = 0,
30363 LINE = 1
30365 enum ToolbarStyle {
30366 ICONS = 0,
30367 TEXT = 1,
30368 BOTH = 2,
30369 BOTH_HORIZ = 3
30371 struct Tooltip /* : GObject.Object */ {
30372 alias method_parent this;
30373 alias method_parent super_;
30374 alias method_parent object;
30375 GObject2.Object method_parent;
30378 // Triggers a new tooltip query on @display, in order to update the current
30379 // visible tooltip, or to show/hide the current tooltip. This function is
30380 // useful to call when, for example, the state of the widget changed by a
30381 // key press.
30382 // <display>: a #GdkDisplay
30383 static void trigger_tooltip_query(Gdk2.Display* display) {
30384 gtk_tooltip_trigger_tooltip_query(display);
30387 // Replaces the widget packed into the tooltip with
30388 // away.
30389 // By default a box with a #GtkImage and #GtkLabel is embedded in
30390 // the tooltip, which can be configured using gtk_tooltip_set_markup()
30391 // and gtk_tooltip_set_icon().
30392 // <custom_widget>: a #GtkWidget, or %NULL to unset the old custom widget.
30393 void set_custom(Widget* custom_widget=null) {
30394 gtk_tooltip_set_custom(&this, custom_widget);
30397 // Sets the icon of the tooltip (which is in front of the text) to be
30398 // <pixbuf>: a #GdkPixbuf, or %NULL
30399 void set_icon(GdkPixbuf2.Pixbuf* pixbuf=null) {
30400 gtk_tooltip_set_icon(&this, pixbuf);
30403 // Sets the icon of the tooltip (which is in front of the text)
30404 // to be the icon indicated by @gicon with the size indicated
30405 // by @size. If @gicon is %NULL, the image will be hidden.
30406 // <gicon>: a #GIcon representing the icon, or %NULL
30407 // <size>: a stock icon size
30408 void set_icon_from_gicon(Gio2.Icon* gicon, int size) {
30409 gtk_tooltip_set_icon_from_gicon(&this, gicon, size);
30412 // Sets the icon of the tooltip (which is in front of the text) to be
30413 // the icon indicated by @icon_name with the size indicated
30414 // by @size. If @icon_name is %NULL, the image will be hidden.
30415 // <icon_name>: an icon name, or %NULL
30416 // <size>: a stock icon size
30417 void set_icon_from_icon_name(char* icon_name, int size) {
30418 gtk_tooltip_set_icon_from_icon_name(&this, icon_name, size);
30421 // Sets the icon of the tooltip (which is in front of the text) to be
30422 // the stock item indicated by @stock_id with the size indicated
30423 // by @size. If @stock_id is %NULL, the image will be hidden.
30424 // <stock_id>: a stock id, or %NULL
30425 // <size>: a stock icon size
30426 void set_icon_from_stock(char* stock_id, int size) {
30427 gtk_tooltip_set_icon_from_stock(&this, stock_id, size);
30430 // Sets the text of the tooltip to be @markup, which is marked up
30431 // with the <link
30432 // linkend="PangoMarkupFormat">Pango text markup language</link>.
30433 // If @markup is %NULL, the label will be hidden.
30434 // <markup>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>) or %NULL
30435 void set_markup(char* markup=null) {
30436 gtk_tooltip_set_markup(&this, markup);
30439 // Sets the text of the tooltip to be @text. If @text is %NULL, the label
30440 // will be hidden. See also gtk_tooltip_set_markup().
30441 // <text>: a text string or %NULL
30442 void set_text(char* text=null) {
30443 gtk_tooltip_set_text(&this, text);
30446 // Sets the area of the widget, where the contents of this tooltip apply,
30447 // to be @rect (in widget coordinates). This is especially useful for
30448 // properly setting tooltips on #GtkTreeView rows and cells, #GtkIconViews,
30449 // etc.
30450 // For setting tooltips on #GtkTreeView, please refer to the convenience
30451 // gtk_tree_view_set_tooltip_cell().
30452 // <rect>: a #GdkRectangle
30453 void set_tip_area(Gdk2.Rectangle* rect) {
30454 gtk_tooltip_set_tip_area(&this, rect);
30458 struct Tooltips /* : Object */ {
30459 alias parent_instance this;
30460 alias parent_instance super_;
30461 alias parent_instance object;
30462 Object parent_instance;
30463 private Widget* tip_window, tip_label;
30464 private TooltipsData* active_tips_data;
30465 private GLib2.List* tips_data_list;
30466 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
30467 uint, "delay", 30,
30468 uint, "enabled", 1,
30469 uint, "have_grab", 1,
30470 uint, "use_sticky_delay", 1,
30471 uint, "__dummy64A", 31));
30472 private int timer_tag;
30473 private GLib2.TimeVal last_popdown;
30475 static Tooltips* new_() {
30476 return gtk_tooltips_new();
30479 // Determines the tooltips and the widget they belong to from the window in
30480 // which they are displayed.
30481 // This function is mostly intended for use by accessibility technologies;
30482 // applications should have little use for it.
30483 // RETURNS: %TRUE if @tip_window is displaying tooltips, otherwise %FALSE.
30484 // <tip_window>: a #GtkWindow
30485 // <tooltips>: the return location for the tooltips which are displayed in @tip_window, or %NULL
30486 // <current_widget>: the return location for the widget whose tooltips are displayed, or %NULL
30487 static int get_info_from_tip_window(Window* tip_window, Tooltips** tooltips, Widget** current_widget) {
30488 return gtk_tooltips_get_info_from_tip_window(tip_window, tooltips, current_widget);
30490 void disable() {
30491 gtk_tooltips_disable(&this);
30493 void enable() {
30494 gtk_tooltips_enable(&this);
30496 void force_window() {
30497 gtk_tooltips_force_window(&this);
30499 void set_delay(uint delay) {
30500 gtk_tooltips_set_delay(&this, delay);
30503 // Adds a tooltip containing the message @tip_text to the specified #GtkWidget.
30504 // <widget>: the #GtkWidget you wish to associate the tip with.
30505 // <tip_text>: a string containing the tip itself.
30506 // <tip_private>: a string of any further information that may be useful if the user gets stuck.
30507 void set_tip(Widget* widget, char* tip_text=null, char* tip_private=null) {
30508 gtk_tooltips_set_tip(&this, widget, tip_text, tip_private);
30512 struct TooltipsClass {
30513 ObjectClass parent_class;
30514 extern (C) void function () _gtk_reserved1;
30515 extern (C) void function () _gtk_reserved2;
30516 extern (C) void function () _gtk_reserved3;
30517 extern (C) void function () _gtk_reserved4;
30520 struct TooltipsData {
30521 Tooltips* tooltips;
30522 Widget* widget;
30523 char* tip_text, tip_private;
30526 extern (C) alias char* /*new*/ function (char* path, void* func_data) TranslateFunc;
30528 extern (C) alias void function (TreeViewColumn* tree_column, CellRenderer* cell, TreeModel* tree_model, TreeIter* iter, void* data) TreeCellDataFunc;
30530 extern (C) alias void function (TreeView* tree_view, TreePath* path, int children, void* user_data) TreeDestroyCountFunc;
30532 struct TreeDragDest {
30534 // Asks the #GtkTreeDragDest to insert a row before the path @dest,
30535 // deriving the contents of the row from @selection_data. If @dest is
30536 // outside the tree so that inserting before it is impossible, %FALSE
30537 // will be returned. Also, %FALSE may be returned if the new row is
30538 // not created for some model-specific reason. Should robustly handle
30539 // a @dest no longer found in the model!
30540 // RETURNS: whether a new row was created before position @dest
30541 // <dest>: row to drop in front of
30542 // <selection_data>: data to drop
30543 int drag_data_received(TreePath* dest, SelectionData* selection_data) {
30544 return gtk_tree_drag_dest_drag_data_received(&this, dest, selection_data);
30547 // Determines whether a drop is possible before the given @dest_path,
30548 // at the same depth as @dest_path. i.e., can we drop the data in
30549 // exist; the return value will almost certainly be %FALSE if the
30550 // parent of @dest_path doesn't exist, though.
30551 // RETURNS: %TRUE if a drop is possible before @dest_path
30552 // <dest_path>: destination row
30553 // <selection_data>: the data being dragged
30554 int row_drop_possible(TreePath* dest_path, SelectionData* selection_data) {
30555 return gtk_tree_drag_dest_row_drop_possible(&this, dest_path, selection_data);
30559 struct TreeDragDestIface {
30560 GObject2.TypeInterface g_iface;
30562 // RETURNS: whether a new row was created before position @dest
30563 // <dest>: row to drop in front of
30564 // <selection_data>: data to drop
30565 extern (C) int function (TreeDragDest* drag_dest, TreePath* dest, SelectionData* selection_data) drag_data_received;
30567 // RETURNS: %TRUE if a drop is possible before @dest_path
30568 // <dest_path>: destination row
30569 // <selection_data>: the data being dragged
30570 extern (C) int function (TreeDragDest* drag_dest, TreePath* dest_path, SelectionData* selection_data) row_drop_possible;
30573 struct TreeDragSource {
30575 // Asks the #GtkTreeDragSource to delete the row at @path, because
30576 // it was moved somewhere else via drag-and-drop. Returns %FALSE
30577 // if the deletion fails because @path no longer exists, or for
30578 // some model-specific reason. Should robustly handle a @path no
30579 // longer found in the model!
30580 // RETURNS: %TRUE if the row was successfully deleted
30581 // <path>: row that was being dragged
30582 int drag_data_delete(TreePath* path) {
30583 return gtk_tree_drag_source_drag_data_delete(&this, path);
30586 // Asks the #GtkTreeDragSource to fill in @selection_data with a
30587 // representation of the row at @path. @selection_data->target gives
30588 // the required type of the data. Should robustly handle a @path no
30589 // longer found in the model!
30590 // RETURNS: %TRUE if data of the required type was provided
30591 // <path>: row that was dragged
30592 // <selection_data>: a #GtkSelectionData to fill with data from the dragged row
30593 int drag_data_get(TreePath* path, /*out*/ SelectionData* selection_data) {
30594 return gtk_tree_drag_source_drag_data_get(&this, path, selection_data);
30597 // Asks the #GtkTreeDragSource whether a particular row can be used as
30598 // the source of a DND operation. If the source doesn't implement
30599 // this interface, the row is assumed draggable.
30600 // RETURNS: %TRUE if the row can be dragged
30601 // <path>: row on which user is initiating a drag
30602 int row_draggable(TreePath* path) {
30603 return gtk_tree_drag_source_row_draggable(&this, path);
30607 struct TreeDragSourceIface {
30608 GObject2.TypeInterface g_iface;
30610 // RETURNS: %TRUE if the row can be dragged
30611 // <path>: row on which user is initiating a drag
30612 extern (C) int function (TreeDragSource* drag_source, TreePath* path) row_draggable;
30614 // RETURNS: %TRUE if data of the required type was provided
30615 // <path>: row that was dragged
30616 // <selection_data>: a #GtkSelectionData to fill with data from the dragged row
30617 extern (C) int function (TreeDragSource* drag_source, TreePath* path, /*out*/ SelectionData* selection_data) drag_data_get;
30619 // RETURNS: %TRUE if the row was successfully deleted
30620 // <path>: row that was being dragged
30621 extern (C) int function (TreeDragSource* drag_source, TreePath* path) drag_data_delete;
30624 struct TreeIter {
30625 int stamp;
30626 void* user_data, user_data2, user_data3;
30629 // Creates a dynamically allocated tree iterator as a copy of @iter.
30630 // This function is not intended for use in applications, because you
30631 // can just copy the structs by value
30632 // (<literal>GtkTreeIter new_iter = iter;</literal>).
30633 // You must free this iter with gtk_tree_iter_free().
30634 // RETURNS: a newly-allocated copy of @iter.
30635 TreeIter* /*new*/ copy() {
30636 return gtk_tree_iter_copy(&this);
30639 // Frees an iterator that has been allocated by gtk_tree_iter_copy().
30640 // This function is mainly used for language bindings.
30641 void free() {
30642 gtk_tree_iter_free(&this);
30646 extern (C) alias int function (TreeModel* model, TreeIter* a, TreeIter* b, void* user_data) TreeIterCompareFunc;
30648 struct TreeModel {
30650 // Creates a new #GtkTreeModel, with @child_model as the child_model
30651 // and @root as the virtual root.
30652 // RETURNS: A new #GtkTreeModel.
30653 // <root>: A #GtkTreePath or %NULL.
30654 TreeModel* /*new*/ filter_new(TreePath* root=null) {
30655 return gtk_tree_model_filter_new(&this, root);
30658 // Calls func on each node in model in a depth-first fashion.
30659 // If @func returns %TRUE, then the tree ceases to be walked, and
30660 // gtk_tree_model_foreach() returns.
30661 // <func>: A function to be called on each row
30662 // <user_data>: User data to passed to func.
30663 void foreach_(TreeModelForeachFunc func, void* user_data) {
30664 gtk_tree_model_foreach(&this, func, user_data);
30667 // Unintrospectable method: get() / gtk_tree_model_get()
30668 // Gets the value of one or more cells in the row referenced by @iter.
30669 // The variable argument list should contain integer column numbers,
30670 // each column number followed by a place to store the value being
30671 // retrieved. The list is terminated by a -1. For example, to get a
30672 // value from column 0 with type %G_TYPE_STRING, you would
30673 // where <literal>place_string_here</literal> is a <type>gchar*</type> to be
30674 // filled with the string.
30675 // Returned values with type %G_TYPE_OBJECT have to be unreferenced, values
30676 // with type %G_TYPE_STRING or %G_TYPE_BOXED have to be freed. Other values are
30677 // passed by value.
30678 // <iter>: a row in @tree_model
30679 /+ Not available -- variadic methods unsupported - use the C function directly.
30680 alias gtk_tree_model_get get; // Variadic
30683 // Returns the type of the column.
30684 // RETURNS: The type of the column.
30685 // <index_>: The column index.
30686 Type get_column_type(int index_) {
30687 return gtk_tree_model_get_column_type(&this, index_);
30690 // Returns a set of flags supported by this interface. The flags are a bitwise
30691 // combination of #GtkTreeModelFlags. The flags supported should not change
30692 // during the lifecycle of the @tree_model.
30693 // RETURNS: The flags supported by this interface.
30694 TreeModelFlags get_flags() {
30695 return gtk_tree_model_get_flags(&this);
30698 // Sets @iter to a valid iterator pointing to @path.
30699 // RETURNS: %TRUE, if @iter was set.
30700 // <iter>: The uninitialized #GtkTreeIter.
30701 // <path>: The #GtkTreePath.
30702 int get_iter(/*out*/ TreeIter* iter, TreePath* path) {
30703 return gtk_tree_model_get_iter(&this, iter, path);
30706 // Initializes @iter with the first iterator in the tree (the one at the path
30707 // "0") and returns %TRUE. Returns %FALSE if the tree is empty.
30708 // RETURNS: %TRUE, if @iter was set.
30709 // <iter>: The uninitialized #GtkTreeIter.
30710 int get_iter_first(/*out*/ TreeIter* iter) {
30711 return gtk_tree_model_get_iter_first(&this, iter);
30714 // Sets @iter to a valid iterator pointing to @path_string, if it
30715 // exists. Otherwise, @iter is left invalid and %FALSE is returned.
30716 // RETURNS: %TRUE, if @iter was set.
30717 // <iter>: An uninitialized #GtkTreeIter.
30718 // <path_string>: A string representation of a #GtkTreePath.
30719 int get_iter_from_string(/*out*/ TreeIter* iter, char* path_string) {
30720 return gtk_tree_model_get_iter_from_string(&this, iter, path_string);
30723 // Returns the number of columns supported by @tree_model.
30724 // RETURNS: The number of columns.
30725 int get_n_columns() {
30726 return gtk_tree_model_get_n_columns(&this);
30729 // Returns a newly-created #GtkTreePath referenced by @iter. This path should
30730 // be freed with gtk_tree_path_free().
30731 // RETURNS: a newly-created #GtkTreePath.
30732 // <iter>: The #GtkTreeIter.
30733 TreePath* /*new*/ get_path(TreeIter* iter) {
30734 return gtk_tree_model_get_path(&this, iter);
30737 // Generates a string representation of the iter. This string is a ':'
30738 // separated list of numbers. For example, "4:10:0:3" would be an
30739 // acceptable return value for this string.
30740 // RETURNS: A newly-allocated string. Must be freed with g_free().
30741 // <iter>: An #GtkTreeIter.
30742 char* /*new*/ get_string_from_iter(TreeIter* iter) {
30743 return gtk_tree_model_get_string_from_iter(&this, iter);
30746 // Unintrospectable method: get_valist() / gtk_tree_model_get_valist()
30747 // See gtk_tree_model_get(), this version takes a <type>va_list</type>
30748 // for language bindings to use.
30749 // <iter>: a row in @tree_model
30750 // <var_args>: <type>va_list</type> of column/return location pairs
30751 void get_valist(TreeIter* iter, va_list var_args) {
30752 gtk_tree_model_get_valist(&this, iter, var_args);
30755 // Initializes and sets @value to that at @column.
30756 // When done with @value, g_value_unset() needs to be called
30757 // to free any allocated memory.
30758 // <iter>: The #GtkTreeIter.
30759 // <column>: The column to lookup the value at.
30760 // <value>: An empty #GValue to set.
30761 void get_value(TreeIter* iter, int column, /*out*/ GObject2.Value* value) {
30762 gtk_tree_model_get_value(&this, iter, column, value);
30765 // Sets @iter to point to the first child of @parent. If @parent has no
30766 // children, %FALSE is returned and @iter is set to be invalid. @parent
30767 // will remain a valid node after this function has been called.
30768 // If @parent is %NULL returns the first node, equivalent to
30769 // <literal>gtk_tree_model_get_iter_first (tree_model, iter);</literal>
30770 // RETURNS: %TRUE, if @child has been set to the first child.
30771 // <iter>: The new #GtkTreeIter to be set to the child.
30772 // <parent>: The #GtkTreeIter, or %NULL
30773 int iter_children(/*out*/ TreeIter* iter, TreeIter* parent=null) {
30774 return gtk_tree_model_iter_children(&this, iter, parent);
30777 // Returns %TRUE if @iter has children, %FALSE otherwise.
30778 // RETURNS: %TRUE if @iter has children.
30779 // <iter>: The #GtkTreeIter to test for children.
30780 int iter_has_child(TreeIter* iter) {
30781 return gtk_tree_model_iter_has_child(&this, iter);
30784 // Returns the number of children that @iter has. As a special case, if @iter
30785 // is %NULL, then the number of toplevel nodes is returned.
30786 // RETURNS: The number of children of @iter.
30787 // <iter>: The #GtkTreeIter, or %NULL.
30788 int iter_n_children(TreeIter* iter=null) {
30789 return gtk_tree_model_iter_n_children(&this, iter);
30792 // Sets @iter to point to the node following it at the current level. If there
30793 // is no next @iter, %FALSE is returned and @iter is set to be invalid.
30794 // RETURNS: %TRUE if @iter has been changed to the next node.
30795 // <iter>: The #GtkTreeIter.
30796 int iter_next(TreeIter* iter) {
30797 return gtk_tree_model_iter_next(&this, iter);
30800 // Sets @iter to be the child of @parent, using the given index. The first
30801 // index is 0. If @n is too big, or @parent has no children, @iter is set
30802 // to an invalid iterator and %FALSE is returned. @parent will remain a valid
30803 // node after this function has been called. As a special case, if @parent is
30804 // %NULL, then the @n<!-- -->th root node is set.
30805 // RETURNS: %TRUE, if @parent has an @n<!-- -->th child.
30806 // <iter>: The #GtkTreeIter to set to the nth child.
30807 // <parent>: The #GtkTreeIter to get the child from, or %NULL.
30808 // <n>: Then index of the desired child.
30809 int iter_nth_child(/*out*/ TreeIter* iter, TreeIter* parent, int n) {
30810 return gtk_tree_model_iter_nth_child(&this, iter, parent, n);
30813 // Sets @iter to be the parent of @child. If @child is at the toplevel, and
30814 // doesn't have a parent, then @iter is set to an invalid iterator and %FALSE
30815 // is returned. @child will remain a valid node after this function has been
30816 // called.
30817 // RETURNS: %TRUE, if @iter is set to the parent of @child.
30818 // <iter>: The new #GtkTreeIter to set to the parent.
30819 // <child>: The #GtkTreeIter.
30820 int iter_parent(/*out*/ TreeIter* iter, TreeIter* child) {
30821 return gtk_tree_model_iter_parent(&this, iter, child);
30824 // Lets the tree ref the node. This is an optional method for models to
30825 // implement. To be more specific, models may ignore this call as it exists
30826 // primarily for performance reasons.
30827 // This function is primarily meant as a way for views to let caching model
30828 // know when nodes are being displayed (and hence, whether or not to cache that
30829 // node.) For example, a file-system based model would not want to keep the
30830 // entire file-hierarchy in memory, just the sections that are currently being
30831 // displayed by every current view.
30832 // A model should be expected to be able to get an iter independent of its
30833 // reffed state.
30834 // <iter>: The #GtkTreeIter.
30835 void ref_node(TreeIter* iter) {
30836 gtk_tree_model_ref_node(&this, iter);
30839 // Emits the "row-changed" signal on @tree_model.
30840 // <path>: A #GtkTreePath pointing to the changed row
30841 // <iter>: A valid #GtkTreeIter pointing to the changed row
30842 void row_changed(TreePath* path, TreeIter* iter) {
30843 gtk_tree_model_row_changed(&this, path, iter);
30846 // Emits the "row-deleted" signal on @tree_model. This should be called by
30847 // models after a row has been removed. The location pointed to by @path
30848 // should be the location that the row previously was at. It may not be a
30849 // valid location anymore.
30850 // <path>: A #GtkTreePath pointing to the previous location of the deleted row.
30851 void row_deleted(TreePath* path) {
30852 gtk_tree_model_row_deleted(&this, path);
30855 // Emits the "row-has-child-toggled" signal on @tree_model. This should be
30856 // called by models after the child state of a node changes.
30857 // <path>: A #GtkTreePath pointing to the changed row
30858 // <iter>: A valid #GtkTreeIter pointing to the changed row
30859 void row_has_child_toggled(TreePath* path, TreeIter* iter) {
30860 gtk_tree_model_row_has_child_toggled(&this, path, iter);
30863 // Emits the "row-inserted" signal on @tree_model
30864 // <path>: A #GtkTreePath pointing to the inserted row
30865 // <iter>: A valid #GtkTreeIter pointing to the inserted row
30866 void row_inserted(TreePath* path, TreeIter* iter) {
30867 gtk_tree_model_row_inserted(&this, path, iter);
30870 // Emits the "rows-reordered" signal on @tree_model. This should be called by
30871 // models when their rows have been reordered.
30872 // <path>: A #GtkTreePath pointing to the tree node whose children have been reordered
30873 // <iter>: A valid #GtkTreeIter pointing to the node whose children have been reordered, or %NULL if the depth of @path is 0.
30874 // <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<literal>[newpos] = oldpos</literal>.
30875 void rows_reordered(TreePath* path, TreeIter* iter, int* new_order) {
30876 gtk_tree_model_rows_reordered(&this, path, iter, new_order);
30879 // Creates a new #GtkTreeModel, with @child_model as the child model.
30880 // RETURNS: A new #GtkTreeModel.
30881 TreeModel* /*new*/ sort_new_with_model() {
30882 return gtk_tree_model_sort_new_with_model(&this);
30885 // Lets the tree unref the node. This is an optional method for models to
30886 // implement. To be more specific, models may ignore this call as it exists
30887 // primarily for performance reasons.
30888 // For more information on what this means, see gtk_tree_model_ref_node().
30889 // Please note that nodes that are deleted are not unreffed.
30890 // <iter>: The #GtkTreeIter.
30891 void unref_node(TreeIter* iter) {
30892 gtk_tree_model_unref_node(&this, iter);
30895 // This signal is emitted when a row in the model has changed.
30896 // <path>: a #GtkTreePath identifying the changed row
30897 // <iter>: a valid #GtkTreeIter pointing to the changed row
30898 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) signal_row_changed;
30900 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30901 return super_.signal_connect!name(cb, data, cf);
30904 ulong signal_connect(string name:"row-changed", CB/*:signal_row_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30905 return signal_connect_data(&this, cast(char*)"row-changed",
30906 cast(GObject2.Callback)cb, data, null, cf);
30909 // This signal is emitted when a row has been deleted.
30910 // Note that no iterator is passed to the signal handler,
30911 // since the row is already deleted.
30912 // This should be called by models after a row has been removed.
30913 // The location pointed to by @path should be the location that
30914 // the row previously was at. It may not be a valid location anymore.
30915 // <path>: a #GtkTreePath identifying the row
30916 extern (C) alias static void function (TreeModel* this_, TreePath* path, void* user_data=null) signal_row_deleted;
30917 ulong signal_connect(string name:"row-deleted", CB/*:signal_row_deleted*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30918 return signal_connect_data(&this, cast(char*)"row-deleted",
30919 cast(GObject2.Callback)cb, data, null, cf);
30922 // This signal is emitted when a row has gotten the first child row or lost
30923 // its last child row.
30924 // <path>: a #GtkTreePath identifying the row
30925 // <iter>: a valid #GtkTreeIter pointing to the row
30926 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) signal_row_has_child_toggled;
30927 ulong signal_connect(string name:"row-has-child-toggled", CB/*:signal_row_has_child_toggled*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30928 return signal_connect_data(&this, cast(char*)"row-has-child-toggled",
30929 cast(GObject2.Callback)cb, data, null, cf);
30932 // This signal is emitted when a new row has been inserted in the model.
30933 // Note that the row may still be empty at this point, since
30934 // it is a common pattern to first insert an empty row, and
30935 // then fill it with the desired values.
30936 // <path>: a #GtkTreePath identifying the new row
30937 // <iter>: a valid #GtkTreeIter pointing to the new row
30938 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) signal_row_inserted;
30939 ulong signal_connect(string name:"row-inserted", CB/*:signal_row_inserted*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30940 return signal_connect_data(&this, cast(char*)"row-inserted",
30941 cast(GObject2.Callback)cb, data, null, cf);
30944 // This signal is emitted when the children of a node in the #GtkTreeModel
30945 // have been reordered.
30946 // Note that this signal is <emphasis>not</emphasis> emitted
30947 // when rows are reordered by DND, since this is implemented
30948 // by removing and then reinserting the row.
30949 // <path>: a #GtkTreePath identifying the tree node whose children have been reordered
30950 // <iter>: a valid #GtkTreeIter pointing to the node whose
30951 // <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<literal>[newpos] = oldpos</literal>.
30952 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* new_order, void* user_data=null) signal_rows_reordered;
30953 ulong signal_connect(string name:"rows-reordered", CB/*:signal_rows_reordered*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30954 return signal_connect_data(&this, cast(char*)"rows-reordered",
30955 cast(GObject2.Callback)cb, data, null, cf);
30959 struct TreeModelFilter /* : GObject.Object */ {
30960 alias parent this;
30961 alias parent super_;
30962 alias parent object;
30963 GObject2.Object parent;
30964 private TreeModelFilterPrivate* priv;
30967 // This function should almost never be called. It clears the @filter
30968 // of any cached iterators that haven't been reffed with
30969 // gtk_tree_model_ref_node(). This might be useful if the child model
30970 // being filtered is static (and doesn't change often) and there has been
30971 // a lot of unreffed access to nodes. As a side effect of this function,
30972 // all unreffed iters will be invalid.
30973 void clear_cache() {
30974 gtk_tree_model_filter_clear_cache(&this);
30977 // Sets @filter_iter to point to the row in @filter that corresponds to the
30978 // row pointed at by @child_iter. If @filter_iter was not set, %FALSE is
30979 // returned.
30980 // valid iterator pointing to a visible row in child model.
30981 // RETURNS: %TRUE, if @filter_iter was set, i.e. if @child_iter is a
30982 // <filter_iter>: An uninitialized #GtkTreeIter.
30983 // <child_iter>: A valid #GtkTreeIter pointing to a row on the child model.
30984 int convert_child_iter_to_iter(/*out*/ TreeIter* filter_iter, TreeIter* child_iter) {
30985 return gtk_tree_model_filter_convert_child_iter_to_iter(&this, filter_iter, child_iter);
30988 // Converts @child_path to a path relative to @filter. That is, @child_path
30989 // points to a path in the child model. The rerturned path will point to the
30990 // same row in the filtered model. If @child_path isn't a valid path on the
30991 // child model or points to a row which is not visible in @filter, then %NULL
30992 // is returned.
30993 // RETURNS: A newly allocated #GtkTreePath, or %NULL.
30994 // <child_path>: A #GtkTreePath to convert.
30995 TreePath* /*new*/ convert_child_path_to_path(TreePath* child_path) {
30996 return gtk_tree_model_filter_convert_child_path_to_path(&this, child_path);
30999 // Sets @child_iter to point to the row pointed to by @filter_iter.
31000 // <child_iter>: An uninitialized #GtkTreeIter.
31001 // <filter_iter>: A valid #GtkTreeIter pointing to a row on @filter.
31002 void convert_iter_to_child_iter(/*out*/ TreeIter* child_iter, TreeIter* filter_iter) {
31003 gtk_tree_model_filter_convert_iter_to_child_iter(&this, child_iter, filter_iter);
31006 // Converts @filter_path to a path on the child model of @filter. That is,
31007 // point to the same location in the model not being filtered. If @filter_path
31008 // does not point to a location in the child model, %NULL is returned.
31009 // RETURNS: A newly allocated #GtkTreePath, or %NULL.
31010 // <filter_path>: A #GtkTreePath to convert.
31011 TreePath* /*new*/ convert_path_to_child_path(TreePath* filter_path) {
31012 return gtk_tree_model_filter_convert_path_to_child_path(&this, filter_path);
31015 // Returns a pointer to the child model of @filter.
31016 // RETURNS: A pointer to a #GtkTreeModel.
31017 TreeModel* get_model() {
31018 return gtk_tree_model_filter_get_model(&this);
31021 // Emits ::row_changed for each row in the child model, which causes
31022 // the filter to re-evaluate whether a row is visible or not.
31023 void refilter() {
31024 gtk_tree_model_filter_refilter(&this);
31027 // With the @n_columns and @types parameters, you give an array of column
31028 // types for this model (which will be exposed to the parent model/view).
31029 // The @func, @data and @destroy parameters are for specifying the modify
31030 // function. The modify function will get called for <emphasis>each</emphasis>
31031 // data access, the goal of the modify function is to return the data which
31032 // should be displayed at the location specified using the parameters of the
31033 // modify function.
31034 // <n_columns>: The number of columns in the filter model.
31035 // <types>: The #GType<!-- -->s of the columns.
31036 // <func>: A #GtkTreeModelFilterModifyFunc
31037 // <data>: User data to pass to the modify function, or %NULL.
31038 // <destroy>: Destroy notifier of @data, or %NULL.
31039 void set_modify_func(int n_columns, Type* types, TreeModelFilterModifyFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
31040 gtk_tree_model_filter_set_modify_func(&this, n_columns, types, func, data, destroy);
31043 // Sets @column of the child_model to be the column where @filter should
31044 // look for visibility information. @columns should be a column of type
31045 // %G_TYPE_BOOLEAN, where %TRUE means that a row is visible, and %FALSE
31046 // if not.
31047 // <column>: A #gint which is the column containing the visible information.
31048 void set_visible_column(int column) {
31049 gtk_tree_model_filter_set_visible_column(&this, column);
31052 // Sets the visible function used when filtering the @filter to be @func. The
31053 // function should return %TRUE if the given row should be visible and
31054 // %FALSE otherwise.
31055 // If the condition calculated by the function changes over time (e.g. because
31056 // it depends on some global parameters), you must call
31057 // gtk_tree_model_filter_refilter() to keep the visibility information of
31058 // the model uptodate.
31059 // Note that @func is called whenever a row is inserted, when it may still be
31060 // empty. The visible function should therefore take special care of empty
31061 // rows, like in the example below.
31062 // <informalexample><programlisting>
31063 // static gboolean
31064 // visible_func (GtkTreeModel *model,
31065 // GtkTreeIter *iter,
31066 // gpointer data)
31067 // {
31068 // /&ast; Visible if row is non-empty and first column is "HI" &ast;/
31069 // gchar *str;
31070 // gboolean visible = FALSE;
31071 // gtk_tree_model_get (model, iter, 0, &str, -1);
31072 // if (str && strcmp (str, "HI") == 0)
31073 // visible = TRUE;
31074 // g_free (str);
31075 // return visible;
31076 // }
31077 // </programlisting></informalexample>
31078 // <func>: A #GtkTreeModelFilterVisibleFunc, the visible function.
31079 // <data>: User data to pass to the visible function, or %NULL.
31080 // <destroy>: Destroy notifier of @data, or %NULL.
31081 void set_visible_func(TreeModelFilterVisibleFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
31082 gtk_tree_model_filter_set_visible_func(&this, func, data, destroy);
31086 struct TreeModelFilterClass {
31087 GObject2.ObjectClass parent_class;
31088 extern (C) void function () _gtk_reserved0;
31089 extern (C) void function () _gtk_reserved1;
31090 extern (C) void function () _gtk_reserved2;
31091 extern (C) void function () _gtk_reserved3;
31094 extern (C) alias void function (TreeModel* model, TreeIter* iter, GObject2.Value* value, int column, void* data) TreeModelFilterModifyFunc;
31096 struct TreeModelFilterPrivate {
31099 extern (C) alias int function (TreeModel* model, TreeIter* iter, void* data) TreeModelFilterVisibleFunc;
31101 enum TreeModelFlags {
31102 ITERS_PERSIST = 1,
31103 LIST_ONLY = 2
31105 extern (C) alias int function (TreeModel* model, TreePath* path, TreeIter* iter, void* data) TreeModelForeachFunc;
31107 struct TreeModelIface {
31108 GObject2.TypeInterface g_iface;
31110 // <path>: A #GtkTreePath pointing to the changed row
31111 // <iter>: A valid #GtkTreeIter pointing to the changed row
31112 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) row_changed;
31114 // <path>: A #GtkTreePath pointing to the inserted row
31115 // <iter>: A valid #GtkTreeIter pointing to the inserted row
31116 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) row_inserted;
31118 // <path>: A #GtkTreePath pointing to the changed row
31119 // <iter>: A valid #GtkTreeIter pointing to the changed row
31120 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) row_has_child_toggled;
31121 // <path>: A #GtkTreePath pointing to the previous location of the deleted row.
31122 extern (C) void function (TreeModel* tree_model, TreePath* path) row_deleted;
31124 // <path>: A #GtkTreePath pointing to the tree node whose children have been reordered
31125 // <iter>: A valid #GtkTreeIter pointing to the node whose children have been reordered, or %NULL if the depth of @path is 0.
31126 // <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<literal>[newpos] = oldpos</literal>.
31127 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter, int* new_order) rows_reordered;
31128 // RETURNS: The flags supported by this interface.
31129 extern (C) TreeModelFlags function (TreeModel* tree_model) get_flags;
31130 // RETURNS: The number of columns.
31131 extern (C) int function (TreeModel* tree_model) get_n_columns;
31133 // RETURNS: The type of the column.
31134 // <index_>: The column index.
31135 extern (C) Type function (TreeModel* tree_model, int index_) get_column_type;
31137 // RETURNS: %TRUE, if @iter was set.
31138 // <iter>: The uninitialized #GtkTreeIter.
31139 // <path>: The #GtkTreePath.
31140 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreePath* path) get_iter;
31142 // RETURNS: a newly-created #GtkTreePath.
31143 // <iter>: The #GtkTreeIter.
31144 extern (C) TreePath* /*new*/ function (TreeModel* tree_model, TreeIter* iter) get_path;
31146 // <iter>: The #GtkTreeIter.
31147 // <column>: The column to lookup the value at.
31148 // <value>: An empty #GValue to set.
31149 extern (C) void function (TreeModel* tree_model, TreeIter* iter, int column, /*out*/ GObject2.Value* value) get_value;
31151 // RETURNS: %TRUE if @iter has been changed to the next node.
31152 // <iter>: The #GtkTreeIter.
31153 extern (C) int function (TreeModel* tree_model, TreeIter* iter) iter_next;
31155 // RETURNS: %TRUE, if @child has been set to the first child.
31156 // <iter>: The new #GtkTreeIter to be set to the child.
31157 // <parent>: The #GtkTreeIter, or %NULL
31158 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* parent=null) iter_children;
31160 // RETURNS: %TRUE if @iter has children.
31161 // <iter>: The #GtkTreeIter to test for children.
31162 extern (C) int function (TreeModel* tree_model, TreeIter* iter) iter_has_child;
31164 // RETURNS: The number of children of @iter.
31165 // <iter>: The #GtkTreeIter, or %NULL.
31166 extern (C) int function (TreeModel* tree_model, TreeIter* iter=null) iter_n_children;
31168 // RETURNS: %TRUE, if @parent has an @n<!-- -->th child.
31169 // <iter>: The #GtkTreeIter to set to the nth child.
31170 // <parent>: The #GtkTreeIter to get the child from, or %NULL.
31171 // <n>: Then index of the desired child.
31172 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* parent, int n) iter_nth_child;
31174 // RETURNS: %TRUE, if @iter is set to the parent of @child.
31175 // <iter>: The new #GtkTreeIter to set to the parent.
31176 // <child>: The #GtkTreeIter.
31177 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* child) iter_parent;
31178 // <iter>: The #GtkTreeIter.
31179 extern (C) void function (TreeModel* tree_model, TreeIter* iter) ref_node;
31180 // <iter>: The #GtkTreeIter.
31181 extern (C) void function (TreeModel* tree_model, TreeIter* iter) unref_node;
31184 struct TreeModelSort /* : GObject.Object */ {
31185 alias parent this;
31186 alias parent super_;
31187 alias parent object;
31188 GObject2.Object parent;
31189 private void* root;
31190 private int stamp;
31191 private uint child_flags;
31192 private TreeModel* child_model;
31193 private int zero_ref_count;
31194 private GLib2.List* sort_list;
31195 private int sort_column_id;
31196 private SortType order;
31197 private TreeIterCompareFunc default_sort_func;
31198 private void* default_sort_data;
31199 private GLib2.DestroyNotify default_sort_destroy;
31200 private uint changed_id, inserted_id, has_child_toggled_id, deleted_id, reordered_id;
31203 // This function should almost never be called. It clears the @tree_model_sort
31204 // of any cached iterators that haven't been reffed with
31205 // gtk_tree_model_ref_node(). This might be useful if the child model being
31206 // sorted is static (and doesn't change often) and there has been a lot of
31207 // unreffed access to nodes. As a side effect of this function, all unreffed
31208 // iters will be invalid.
31209 void clear_cache() {
31210 gtk_tree_model_sort_clear_cache(&this);
31213 // Sets @sort_iter to point to the row in @tree_model_sort that corresponds to
31214 // the row pointed at by @child_iter. If @sort_iter was not set, %FALSE
31215 // valid iterator pointer to a visible row in the child model.
31216 // RETURNS: %TRUE, if @sort_iter was set, i.e. if @sort_iter is a
31217 // <sort_iter>: An uninitialized #GtkTreeIter.
31218 // <child_iter>: A valid #GtkTreeIter pointing to a row on the child model
31219 int convert_child_iter_to_iter(/*out*/ TreeIter* sort_iter, TreeIter* child_iter) {
31220 return gtk_tree_model_sort_convert_child_iter_to_iter(&this, sort_iter, child_iter);
31223 // Converts @child_path to a path relative to @tree_model_sort. That is,
31224 // point to the same row in the sorted model. If @child_path isn't a valid
31225 // path on the child model, then %NULL is returned.
31226 // RETURNS: A newly allocated #GtkTreePath, or %NULL
31227 // <child_path>: A #GtkTreePath to convert
31228 TreePath* /*new*/ convert_child_path_to_path(TreePath* child_path) {
31229 return gtk_tree_model_sort_convert_child_path_to_path(&this, child_path);
31232 // Sets @child_iter to point to the row pointed to by @sorted_iter.
31233 // <child_iter>: An uninitialized #GtkTreeIter
31234 // <sorted_iter>: A valid #GtkTreeIter pointing to a row on @tree_model_sort.
31235 void convert_iter_to_child_iter(/*out*/ TreeIter* child_iter, TreeIter* sorted_iter) {
31236 gtk_tree_model_sort_convert_iter_to_child_iter(&this, child_iter, sorted_iter);
31239 // Converts @sorted_path to a path on the child model of @tree_model_sort.
31240 // That is, @sorted_path points to a location in @tree_model_sort. The
31241 // returned path will point to the same location in the model not being
31242 // sorted. If @sorted_path does not point to a location in the child model,
31243 // %NULL is returned.
31244 // RETURNS: A newly allocated #GtkTreePath, or %NULL
31245 // <sorted_path>: A #GtkTreePath to convert
31246 TreePath* /*new*/ convert_path_to_child_path(TreePath* sorted_path) {
31247 return gtk_tree_model_sort_convert_path_to_child_path(&this, sorted_path);
31250 // Returns the model the #GtkTreeModelSort is sorting.
31251 // RETURNS: the "child model" being sorted
31252 TreeModel* get_model() {
31253 return gtk_tree_model_sort_get_model(&this);
31256 // <warning><para>
31257 // This function is slow. Only use it for debugging and/or testing purposes.
31258 // </para></warning>
31259 // Checks if the given iter is a valid iter for this #GtkTreeModelSort.
31260 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
31261 // <iter>: A #GtkTreeIter.
31262 int iter_is_valid(TreeIter* iter) {
31263 return gtk_tree_model_sort_iter_is_valid(&this, iter);
31266 // This resets the default sort function to be in the 'unsorted' state. That
31267 // is, it is in the same order as the child model. It will re-sort the model
31268 // to be in the same order as the child model only if the #GtkTreeModelSort
31269 // is in 'unsorted' state.
31270 void reset_default_sort_func() {
31271 gtk_tree_model_sort_reset_default_sort_func(&this);
31275 struct TreeModelSortClass {
31276 GObject2.ObjectClass parent_class;
31277 extern (C) void function () _gtk_reserved1;
31278 extern (C) void function () _gtk_reserved2;
31279 extern (C) void function () _gtk_reserved3;
31280 extern (C) void function () _gtk_reserved4;
31283 struct TreePath {
31285 // Creates a new #GtkTreePath. This structure refers to a row.
31286 // RETURNS: A newly created #GtkTreePath.
31287 static TreePath* /*new*/ new_() {
31288 return gtk_tree_path_new();
31291 // Creates a new #GtkTreePath. The string representation of this path is "0"
31292 // RETURNS: A new #GtkTreePath.
31293 static TreePath* /*new*/ new_first() {
31294 return gtk_tree_path_new_first();
31297 // Unintrospectable constructor: new_from_indices() / gtk_tree_path_new_from_indices()
31298 // Creates a new path with @first_index and @varargs as indices.
31299 // RETURNS: A newly created #GtkTreePath.
31300 // <first_index>: first integer
31301 alias gtk_tree_path_new_from_indices new_from_indices; // Variadic
31303 // Creates a new #GtkTreePath initialized to @path. @path is expected to be a
31304 // colon separated list of numbers. For example, the string "10:4:0" would
31305 // create a path of depth 3 pointing to the 11th child of the root node, the 5th
31306 // child of that 11th child, and the 1st child of that 5th child. If an invalid
31307 // path string is passed in, %NULL is returned.
31308 // RETURNS: A newly-created #GtkTreePath, or %NULL
31309 // <path>: The string representation of a path.
31310 static TreePath* /*new*/ new_from_string(char* path) {
31311 return gtk_tree_path_new_from_string(path);
31314 // Appends a new index to a path. As a result, the depth of the path is
31315 // increased.
31316 // <index_>: The index.
31317 void append_index(int index_) {
31318 gtk_tree_path_append_index(&this, index_);
31321 // Compares two paths. If @a appears before @b in a tree, then -1 is returned.
31322 // If @b appears before @a, then 1 is returned. If the two nodes are equal,
31323 // then 0 is returned.
31324 // RETURNS: The relative positions of @a and @b
31325 // <b>: A #GtkTreePath to compare with.
31326 int compare(TreePath* b) {
31327 return gtk_tree_path_compare(&this, b);
31330 // Creates a new #GtkTreePath as a copy of @path.
31331 // RETURNS: A new #GtkTreePath.
31332 TreePath* /*new*/ copy() {
31333 return gtk_tree_path_copy(&this);
31335 // Moves @path to point to the first child of the current path.
31336 void down() {
31337 gtk_tree_path_down(&this);
31339 // Frees @path.
31340 void free() {
31341 gtk_tree_path_free(&this);
31344 // Returns the current depth of @path.
31345 // RETURNS: The depth of @path
31346 int get_depth() {
31347 return gtk_tree_path_get_depth(&this);
31350 // Returns the current indices of @path. This is an array of integers, each
31351 // representing a node in a tree. This value should not be freed.
31352 // RETURNS: The current indices, or %NULL.
31353 int* get_indices() {
31354 return gtk_tree_path_get_indices(&this);
31357 // Returns the current indices of @path.
31358 // This is an array of integers, each representing a node in a tree.
31359 // It also returns the number of elements in the array.
31360 // The array should not be freed.
31361 // RETURNS: The current indices, or %NULL.
31362 // <depth>: Number of elements returned in the integer array
31363 int* get_indices_with_depth(/*out*/ int* depth) {
31364 return gtk_tree_path_get_indices_with_depth(&this, depth);
31367 // Returns %TRUE if @descendant is a descendant of @path.
31368 // RETURNS: %TRUE if @descendant is contained inside @path
31369 // <descendant>: another #GtkTreePath
31370 int is_ancestor(TreePath* descendant) {
31371 return gtk_tree_path_is_ancestor(&this, descendant);
31374 // Returns %TRUE if @path is a descendant of @ancestor.
31375 // RETURNS: %TRUE if @ancestor contains @path somewhere below it
31376 // <ancestor>: another #GtkTreePath
31377 int is_descendant(TreePath* ancestor) {
31378 return gtk_tree_path_is_descendant(&this, ancestor);
31380 // Moves the @path to point to the next node at the current depth.
31381 void next() {
31382 gtk_tree_path_next(&this);
31385 // Prepends a new index to a path. As a result, the depth of the path is
31386 // increased.
31387 // <index_>: The index.
31388 void prepend_index(int index_) {
31389 gtk_tree_path_prepend_index(&this, index_);
31392 // Moves the @path to point to the previous node at the current depth,
31393 // if it exists.
31394 // RETURNS: %TRUE if @path has a previous node, and the move was made.
31395 int prev() {
31396 return gtk_tree_path_prev(&this);
31399 // Generates a string representation of the path. This string is a ':'
31400 // separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.
31401 // RETURNS: A newly-allocated string. Must be freed with g_free().
31402 char* /*new*/ to_string() {
31403 return gtk_tree_path_to_string(&this);
31406 // Moves the @path to point to its parent node, if it has a parent.
31407 // RETURNS: %TRUE if @path has a parent, and the move was made.
31408 int up() {
31409 return gtk_tree_path_up(&this);
31413 struct TreeRowReference {
31415 // Creates a row reference based on @path. This reference will keep pointing
31416 // to the node pointed to by @path, so long as it exists. It listens to all
31417 // signals emitted by @model, and updates its path appropriately. If @path
31418 // isn't a valid path in @model, then %NULL is returned.
31419 // RETURNS: A newly allocated #GtkTreeRowReference, or %NULL
31420 // <model>: A #GtkTreeModel
31421 // <path>: A valid #GtkTreePath to monitor
31422 static TreeRowReference* /*new*/ new_(TreeModel* model, TreePath* path) {
31423 return gtk_tree_row_reference_new(model, path);
31426 // You do not need to use this function. Creates a row reference based on
31427 // so long as it exists. If @path isn't a valid path in @model, then %NULL is
31428 // returned. However, unlike references created with
31429 // gtk_tree_row_reference_new(), it does not listen to the model for changes.
31430 // The creator of the row reference must do this explicitly using
31431 // gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(),
31432 // gtk_tree_row_reference_reordered().
31433 // These functions must be called exactly once per proxy when the
31434 // corresponding signal on the model is emitted. This single call
31435 // updates all row references for that proxy. Since built-in GTK+
31436 // objects like #GtkTreeView already use this mechanism internally,
31437 // using them as the proxy object will produce unpredictable results.
31438 // Further more, passing the same object as @model and @proxy
31439 // doesn't work for reasons of internal implementation.
31440 // This type of row reference is primarily meant by structures that need to
31441 // carefully monitor exactly when a row reference updates itself, and is not
31442 // generally needed by most applications.
31443 // RETURNS: A newly allocated #GtkTreeRowReference, or %NULL
31444 // <proxy>: A proxy #GObject
31445 // <model>: A #GtkTreeModel
31446 // <path>: A valid #GtkTreePath to monitor
31447 static TreeRowReference* /*new*/ new_proxy(GObject2.Object* proxy, TreeModel* model, TreePath* path) {
31448 return gtk_tree_row_reference_new_proxy(proxy, model, path);
31451 // Copies a #GtkTreeRowReference.
31452 // RETURNS: a copy of @reference.
31453 TreeRowReference* /*new*/ copy() {
31454 return gtk_tree_row_reference_copy(&this);
31456 // Free's @reference. @reference may be %NULL.
31457 void free() {
31458 gtk_tree_row_reference_free(&this);
31461 // Returns the model that the row reference is monitoring.
31462 // RETURNS: the model
31463 TreeModel* get_model() {
31464 return gtk_tree_row_reference_get_model(&this);
31467 // Returns a path that the row reference currently points to, or %NULL if the
31468 // path pointed to is no longer valid.
31469 // RETURNS: A current path, or %NULL.
31470 TreePath* /*new*/ get_path() {
31471 return gtk_tree_row_reference_get_path(&this);
31474 // Returns %TRUE if the @reference is non-%NULL and refers to a current valid
31475 // path.
31476 // RETURNS: %TRUE if @reference points to a valid path.
31477 int valid() {
31478 return gtk_tree_row_reference_valid(&this);
31482 struct TreeSelection /* : GObject.Object */ {
31483 alias parent this;
31484 alias parent super_;
31485 alias parent object;
31486 GObject2.Object parent;
31487 private TreeView* tree_view;
31488 private SelectionMode type;
31489 private TreeSelectionFunc user_func;
31490 private void* user_data;
31491 private GLib2.DestroyNotify destroy;
31494 // Returns the number of rows that have been selected in @tree.
31495 // RETURNS: The number of rows selected.
31496 int count_selected_rows() {
31497 return gtk_tree_selection_count_selected_rows(&this);
31500 // Gets the selection mode for @selection. See
31501 // gtk_tree_selection_set_mode().
31502 // RETURNS: the current selection mode
31503 SelectionMode get_mode() {
31504 return gtk_tree_selection_get_mode(&this);
31507 // Unintrospectable method: get_select_function() / gtk_tree_selection_get_select_function()
31508 // Returns the current selection function.
31509 // RETURNS: The function.
31510 TreeSelectionFunc get_select_function() {
31511 return gtk_tree_selection_get_select_function(&this);
31514 // Sets @iter to the currently selected node if @selection is set to
31515 // #GTK_SELECTION_SINGLE or #GTK_SELECTION_BROWSE. @iter may be NULL if you
31516 // just want to test if @selection has any selected nodes. @model is filled
31517 // with the current model as a convenience. This function will not work if you
31518 // use @selection is #GTK_SELECTION_MULTIPLE.
31519 // RETURNS: TRUE, if there is a selected node.
31520 // <model>: A pointer to set to the #GtkTreeModel, or NULL.
31521 // <iter>: The #GtkTreeIter, or NULL.
31522 int get_selected(/*out*/ TreeModel** model=null, /*out*/ TreeIter* iter=null) {
31523 return gtk_tree_selection_get_selected(&this, model, iter);
31526 // Creates a list of path of all selected rows. Additionally, if you are
31527 // planning on modifying the model after calling this function, you may
31528 // want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
31529 // To do this, you can use gtk_tree_row_reference_new().
31530 // To free the return value, use:
31531 // |[
31532 // g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
31533 // g_list_free (list);
31534 // ]|
31535 // RETURNS: A #GList containing a #GtkTreePath for each selected row.
31536 // <model>: A pointer to set to the #GtkTreeModel, or %NULL.
31537 GLib2.List* /*new*/ get_selected_rows(/*out*/ TreeModel** model=null) {
31538 return gtk_tree_selection_get_selected_rows(&this, model);
31541 // Returns the tree view associated with @selection.
31542 // RETURNS: A #GtkTreeView
31543 TreeView* get_tree_view() {
31544 return gtk_tree_selection_get_tree_view(&this);
31547 // Unintrospectable method: get_user_data() / gtk_tree_selection_get_user_data()
31548 // Returns the user data for the selection function.
31549 // RETURNS: The user data.
31550 void* get_user_data() {
31551 return gtk_tree_selection_get_user_data(&this);
31554 // Returns %TRUE if the row at @iter is currently selected.
31555 // RETURNS: %TRUE, if @iter is selected
31556 // <iter>: A valid #GtkTreeIter
31557 int iter_is_selected(TreeIter* iter) {
31558 return gtk_tree_selection_iter_is_selected(&this, iter);
31561 // Returns %TRUE if the row pointed to by @path is currently selected. If @path
31562 // does not point to a valid location, %FALSE is returned
31563 // RETURNS: %TRUE if @path is selected.
31564 // <path>: A #GtkTreePath to check selection on.
31565 int path_is_selected(TreePath* path) {
31566 return gtk_tree_selection_path_is_selected(&this, path);
31569 // Selects all the nodes. @selection must be set to #GTK_SELECTION_MULTIPLE
31570 // mode.
31571 void select_all() {
31572 gtk_tree_selection_select_all(&this);
31575 // Selects the specified iterator.
31576 // <iter>: The #GtkTreeIter to be selected.
31577 void select_iter(TreeIter* iter) {
31578 gtk_tree_selection_select_iter(&this, iter);
31581 // Select the row at @path.
31582 // <path>: The #GtkTreePath to be selected.
31583 void select_path(TreePath* path) {
31584 gtk_tree_selection_select_path(&this, path);
31587 // Selects a range of nodes, determined by @start_path and @end_path inclusive.
31588 // <start_path>: The initial node of the range.
31589 // <end_path>: The final node of the range.
31590 void select_range(TreePath* start_path, TreePath* end_path) {
31591 gtk_tree_selection_select_range(&this, start_path, end_path);
31594 // Calls a function for each selected node. Note that you cannot modify
31595 // the tree or selection from within this function. As a result,
31596 // gtk_tree_selection_get_selected_rows() might be more useful.
31597 // <func>: The function to call for each selected node.
31598 // <data>: user data to pass to the function.
31599 void selected_foreach(TreeSelectionForeachFunc func, void* data) {
31600 gtk_tree_selection_selected_foreach(&this, func, data);
31603 // Sets the selection mode of the @selection. If the previous type was
31604 // #GTK_SELECTION_MULTIPLE, then the anchor is kept selected, if it was
31605 // previously selected.
31606 // <type>: The selection mode
31607 void set_mode(SelectionMode type) {
31608 gtk_tree_selection_set_mode(&this, type);
31611 // Sets the selection function. If set, this function is called before any node
31612 // is selected or unselected, giving some control over which nodes are selected.
31613 // The select function should return %TRUE if the state of the node may be toggled,
31614 // and %FALSE if the state of the node should be left unchanged.
31615 // <func>: The selection function.
31616 // <data>: The selection function's data.
31617 // <destroy>: The destroy function for user data. May be NULL.
31618 void set_select_function(TreeSelectionFunc func, void* data, GLib2.DestroyNotify destroy) {
31619 gtk_tree_selection_set_select_function(&this, func, data, destroy);
31621 // Unselects all the nodes.
31622 void unselect_all() {
31623 gtk_tree_selection_unselect_all(&this);
31626 // Unselects the specified iterator.
31627 // <iter>: The #GtkTreeIter to be unselected.
31628 void unselect_iter(TreeIter* iter) {
31629 gtk_tree_selection_unselect_iter(&this, iter);
31632 // Unselects the row at @path.
31633 // <path>: The #GtkTreePath to be unselected.
31634 void unselect_path(TreePath* path) {
31635 gtk_tree_selection_unselect_path(&this, path);
31638 // Unselects a range of nodes, determined by @start_path and @end_path
31639 // inclusive.
31640 // <start_path>: The initial node of the range.
31641 // <end_path>: The initial node of the range.
31642 void unselect_range(TreePath* start_path, TreePath* end_path) {
31643 gtk_tree_selection_unselect_range(&this, start_path, end_path);
31645 extern (C) alias static void function (TreeSelection* this_, void* user_data=null) signal_changed;
31647 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31648 return super_.signal_connect!name(cb, data, cf);
31651 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31652 return signal_connect_data(&this, cast(char*)"changed",
31653 cast(GObject2.Callback)cb, data, null, cf);
31657 struct TreeSelectionClass {
31658 GObject2.ObjectClass parent_class;
31659 extern (C) void function (TreeSelection* selection) changed;
31660 extern (C) void function () _gtk_reserved1;
31661 extern (C) void function () _gtk_reserved2;
31662 extern (C) void function () _gtk_reserved3;
31663 extern (C) void function () _gtk_reserved4;
31666 extern (C) alias void function (TreeModel* model, TreePath* path, TreeIter* iter, void* data) TreeSelectionForeachFunc;
31668 extern (C) alias int function (TreeSelection* selection, TreeModel* model, TreePath* path, int path_currently_selected, void* data) TreeSelectionFunc;
31670 struct TreeSortable {
31672 // Fills in @sort_column_id and @order with the current sort column and the
31673 // order. It returns %TRUE unless the @sort_column_id is
31674 // %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
31675 // %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
31676 // column ids.
31677 // RETURNS: %TRUE if the sort column is not one of the special sort
31678 // <sort_column_id>: The sort column id to be filled in
31679 // <order>: The #GtkSortType to be filled in
31680 int get_sort_column_id(int* sort_column_id, SortType* order) {
31681 return gtk_tree_sortable_get_sort_column_id(&this, sort_column_id, order);
31684 // Returns %TRUE if the model has a default sort function. This is used
31685 // primarily by GtkTreeViewColumns in order to determine if a model can
31686 // go back to the default state, or not.
31687 // RETURNS: %TRUE, if the model has a default sort function
31688 int has_default_sort_func() {
31689 return gtk_tree_sortable_has_default_sort_func(&this);
31692 // Sets the default comparison function used when sorting to be @sort_func.
31693 // If the current sort column id of @sortable is
31694 // %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
31695 // this function.
31696 // If @sort_func is %NULL, then there will be no default comparison function.
31697 // This means that once the model has been sorted, it can't go back to the
31698 // default state. In this case, when the current sort column id of @sortable
31699 // is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
31700 // <sort_func>: The comparison function
31701 // <user_data>: User data to pass to @sort_func, or %NULL
31702 // <destroy>: Destroy notifier of @user_data, or %NULL
31703 void set_default_sort_func(TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null) {
31704 gtk_tree_sortable_set_default_sort_func(&this, sort_func, user_data, destroy);
31707 // Sets the current sort column to be @sort_column_id. The @sortable will
31708 // resort itself to reflect this change, after emitting a
31709 // #GtkTreeSortable::sort-column-changed signal. @sort_column_id may either be
31710 // a regular column id, or one of the following special values:
31711 // <variablelist>
31712 // <varlistentry>
31713 // <term>%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID</term>
31714 // <listitem>the default sort function will be used, if it is set</listitem>
31715 // </varlistentry>
31716 // <varlistentry>
31717 // <term>%GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID</term>
31718 // <listitem>no sorting will occur</listitem>
31719 // </varlistentry>
31720 // </variablelist>
31721 // <sort_column_id>: the sort column id to set
31722 // <order>: The sort order of the column
31723 void set_sort_column_id(int sort_column_id, SortType order) {
31724 gtk_tree_sortable_set_sort_column_id(&this, sort_column_id, order);
31727 // Sets the comparison function used when sorting to be @sort_func. If the
31728 // current sort column id of @sortable is the same as @sort_column_id, then
31729 // the model will sort using this function.
31730 // <sort_column_id>: the sort column id to set the function for
31731 // <sort_func>: The comparison function
31732 // <user_data>: User data to pass to @sort_func, or %NULL
31733 // <destroy>: Destroy notifier of @user_data, or %NULL
31734 void set_sort_func(int sort_column_id, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null) {
31735 gtk_tree_sortable_set_sort_func(&this, sort_column_id, sort_func, user_data, destroy);
31737 // Emits a #GtkTreeSortable::sort-column-changed signal on @sortable.
31738 void sort_column_changed() {
31739 gtk_tree_sortable_sort_column_changed(&this);
31742 // The ::sort-column-changed signal is emitted when the sort column
31743 // or sort order of @sortable is changed. The signal is emitted before
31744 // the contents of @sortable are resorted.
31745 extern (C) alias static void function (TreeSortable* this_, void* user_data=null) signal_sort_column_changed;
31747 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31748 return super_.signal_connect!name(cb, data, cf);
31751 ulong signal_connect(string name:"sort-column-changed", CB/*:signal_sort_column_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31752 return signal_connect_data(&this, cast(char*)"sort-column-changed",
31753 cast(GObject2.Callback)cb, data, null, cf);
31757 struct TreeSortableIface {
31758 GObject2.TypeInterface g_iface;
31759 extern (C) void function (TreeSortable* sortable) sort_column_changed;
31761 // RETURNS: %TRUE if the sort column is not one of the special sort
31762 // <sort_column_id>: The sort column id to be filled in
31763 // <order>: The #GtkSortType to be filled in
31764 extern (C) int function (TreeSortable* sortable, int* sort_column_id, SortType* order) get_sort_column_id;
31766 // <sort_column_id>: the sort column id to set
31767 // <order>: The sort order of the column
31768 extern (C) void function (TreeSortable* sortable, int sort_column_id, SortType order) set_sort_column_id;
31770 // <sort_column_id>: the sort column id to set the function for
31771 // <destroy>: Destroy notifier of @user_data, or %NULL
31772 extern (C) void function (TreeSortable* sortable, int sort_column_id, TreeIterCompareFunc func, void* data, GLib2.DestroyNotify destroy=null) set_sort_func;
31773 // <destroy>: Destroy notifier of @user_data, or %NULL
31774 extern (C) void function (TreeSortable* sortable, TreeIterCompareFunc func, void* data, GLib2.DestroyNotify destroy=null) set_default_sort_func;
31775 // RETURNS: %TRUE, if the model has a default sort function
31776 extern (C) int function (TreeSortable* sortable) has_default_sort_func;
31779 struct TreeStore /* : GObject.Object */ {
31780 alias parent this;
31781 alias parent super_;
31782 alias parent object;
31783 GObject2.Object parent;
31784 int stamp;
31785 void* root, last;
31786 int n_columns, sort_column_id;
31787 GLib2.List* sort_list;
31788 SortType order;
31789 Type* column_headers;
31790 TreeIterCompareFunc default_sort_func;
31791 void* default_sort_data;
31792 GLib2.DestroyNotify default_sort_destroy;
31793 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31794 uint, "columns_dirty", 1,
31795 uint, "__dummy32A", 31));
31798 // Unintrospectable constructor: new() / gtk_tree_store_new()
31799 // Creates a new tree store as with @n_columns columns each of the types passed
31800 // in. Note that only types derived from standard GObject fundamental types
31801 // are supported.
31802 // As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
31803 // GDK_TYPE_PIXBUF);</literal> will create a new #GtkTreeStore with three columns, of type
31804 // <type>int</type>, <type>string</type> and #GdkPixbuf respectively.
31805 // RETURNS: a new #GtkTreeStore
31806 // <n_columns>: number of columns in the tree store
31807 alias gtk_tree_store_new new_; // Variadic
31809 // Non vararg creation function. Used primarily by language bindings.
31810 // RETURNS: a new #GtkTreeStore
31811 // <n_columns>: number of columns in the tree store
31812 // <types>: an array of #GType types for the columns, from first to last
31813 static TreeStore* /*new*/ newv(int n_columns, Type* types) {
31814 return gtk_tree_store_newv(n_columns, types);
31817 // Appends a new row to @tree_store. If @parent is non-%NULL, then it will append the
31818 // new row after the last child of @parent, otherwise it will append a row to
31819 // the top level. @iter will be changed to point to this new row. The row will
31820 // be empty after this function is called. To fill in values, you need to call
31821 // gtk_tree_store_set() or gtk_tree_store_set_value().
31822 // <iter>: An unset #GtkTreeIter to set to the appended row
31823 // <parent>: A valid #GtkTreeIter, or %NULL
31824 void append(/*out*/ TreeIter* iter, TreeIter* parent=null) {
31825 gtk_tree_store_append(&this, iter, parent);
31827 // Removes all rows from @tree_store
31828 void clear() {
31829 gtk_tree_store_clear(&this);
31832 // Creates a new row at @position. If parent is non-%NULL, then the row will be
31833 // made a child of @parent. Otherwise, the row will be created at the toplevel.
31834 // If @position is larger than the number of rows at that level, then the new
31835 // row will be inserted to the end of the list. @iter will be changed to point
31836 // to this new row. The row will be empty after this function is called. To
31837 // fill in values, you need to call gtk_tree_store_set() or
31838 // gtk_tree_store_set_value().
31839 // <iter>: An unset #GtkTreeIter to set to the new row
31840 // <parent>: A valid #GtkTreeIter, or %NULL
31841 // <position>: position to insert the new row
31842 void insert(/*out*/ TreeIter* iter, TreeIter* parent, int position) {
31843 gtk_tree_store_insert(&this, iter, parent, position);
31846 // Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
31847 // prepended to @parent 's children. If @parent and @sibling are %NULL, then
31848 // the row will be prepended to the toplevel. If both @sibling and @parent are
31849 // set, then @parent must be the parent of @sibling. When @sibling is set,
31850 // this function is called. To fill in values, you need to call
31851 // gtk_tree_store_set() or gtk_tree_store_set_value().
31852 // <iter>: An unset #GtkTreeIter to set to the new row
31853 // <parent>: A valid #GtkTreeIter, or %NULL
31854 // <sibling>: A valid #GtkTreeIter, or %NULL
31855 void insert_after(/*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null) {
31856 gtk_tree_store_insert_after(&this, iter, parent, sibling);
31859 // Inserts a new row before @sibling. If @sibling is %NULL, then the row will
31860 // be appended to @parent 's children. If @parent and @sibling are %NULL, then
31861 // the row will be appended to the toplevel. If both @sibling and @parent are
31862 // set, then @parent must be the parent of @sibling. When @sibling is set,
31863 // this function is called. To fill in values, you need to call
31864 // gtk_tree_store_set() or gtk_tree_store_set_value().
31865 // <iter>: An unset #GtkTreeIter to set to the new row
31866 // <parent>: A valid #GtkTreeIter, or %NULL
31867 // <sibling>: A valid #GtkTreeIter, or %NULL
31868 void insert_before(/*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null) {
31869 gtk_tree_store_insert_before(&this, iter, parent, sibling);
31872 // Unintrospectable method: insert_with_values() / gtk_tree_store_insert_with_values()
31873 // Creates a new row at @position. @iter will be changed to point to this
31874 // new row. If @position is larger than the number of rows on the list, then
31875 // the new row will be appended to the list. The row will be filled with
31876 // the values given to this function.
31877 // Calling
31878 // <literal>gtk_tree_store_insert_with_values (tree_store, iter, position, ...)</literal>
31879 // has the same effect as calling
31880 // |[
31881 // gtk_tree_store_insert (tree_store, iter, position);
31882 // gtk_tree_store_set (tree_store, iter, ...);
31883 // ]|
31884 // with the different that the former will only emit a row_inserted signal,
31885 // while the latter will emit row_inserted, row_changed and if the tree store
31886 // is sorted, rows_reordered. Since emitting the rows_reordered signal
31887 // repeatedly can affect the performance of the program,
31888 // gtk_tree_store_insert_with_values() should generally be preferred when
31889 // inserting rows in a sorted tree store.
31890 // <iter>: An unset #GtkTreeIter to set the new row, or %NULL.
31891 // <parent>: A valid #GtkTreeIter, or %NULL
31892 // <position>: position to insert the new row
31893 /+ Not available -- variadic methods unsupported - use the C function directly.
31894 alias gtk_tree_store_insert_with_values insert_with_values; // Variadic
31897 // A variant of gtk_tree_store_insert_with_values() which takes
31898 // the columns and values as two arrays, instead of varargs. This
31899 // function is mainly intended for language bindings.
31900 // <iter>: An unset #GtkTreeIter to set the new row, or %NULL.
31901 // <parent>: A valid #GtkTreeIter, or %NULL
31902 // <position>: position to insert the new row
31903 // <columns>: an array of column numbers
31904 // <values>: an array of GValues
31905 // <n_values>: the length of the @columns and @values arrays
31906 void insert_with_valuesv(/*out*/ TreeIter* iter, TreeIter* parent, int position, int* columns, GObject2.Value* values, int n_values) {
31907 gtk_tree_store_insert_with_valuesv(&this, iter, parent, position, columns, values, n_values);
31910 // Returns %TRUE if @iter is an ancestor of @descendant. That is, @iter is the
31911 // parent (or grandparent or great-grandparent) of @descendant.
31912 // RETURNS: %TRUE, if @iter is an ancestor of @descendant
31913 // <iter>: A valid #GtkTreeIter
31914 // <descendant>: A valid #GtkTreeIter
31915 int is_ancestor(TreeIter* iter, TreeIter* descendant) {
31916 return gtk_tree_store_is_ancestor(&this, iter, descendant);
31919 // Returns the depth of @iter. This will be 0 for anything on the root level, 1
31920 // for anything down a level, etc.
31921 // RETURNS: The depth of @iter
31922 // <iter>: A valid #GtkTreeIter
31923 int iter_depth(TreeIter* iter) {
31924 return gtk_tree_store_iter_depth(&this, iter);
31927 // purposes.
31928 // Checks if the given iter is a valid iter for this #GtkTreeStore.
31929 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
31930 // <iter>: A #GtkTreeIter.
31931 int iter_is_valid(TreeIter* iter) {
31932 return gtk_tree_store_iter_is_valid(&this, iter);
31935 // Moves @iter in @tree_store to the position after @position. @iter and
31936 // works with unsorted stores. If @position is %NULL, @iter will be moved
31937 // to the start of the level.
31938 // <iter>: A #GtkTreeIter.
31939 // <position>: A #GtkTreeIter.
31940 void move_after(TreeIter* iter, TreeIter* position=null) {
31941 gtk_tree_store_move_after(&this, iter, position);
31944 // Moves @iter in @tree_store to the position before @position. @iter and
31945 // works with unsorted stores. If @position is %NULL, @iter will be
31946 // moved to the end of the level.
31947 // <iter>: A #GtkTreeIter.
31948 // <position>: A #GtkTreeIter or %NULL.
31949 void move_before(TreeIter* iter, TreeIter* position=null) {
31950 gtk_tree_store_move_before(&this, iter, position);
31953 // Prepends a new row to @tree_store. If @parent is non-%NULL, then it will prepend
31954 // the new row before the first child of @parent, otherwise it will prepend a row
31955 // to the top level. @iter will be changed to point to this new row. The row
31956 // will be empty after this function is called. To fill in values, you need to
31957 // call gtk_tree_store_set() or gtk_tree_store_set_value().
31958 // <iter>: An unset #GtkTreeIter to set to the prepended row
31959 // <parent>: A valid #GtkTreeIter, or %NULL
31960 void prepend(/*out*/ TreeIter* iter, TreeIter* parent=null) {
31961 gtk_tree_store_prepend(&this, iter, parent);
31964 // Removes @iter from @tree_store. After being removed, @iter is set to the
31965 // next valid row at that level, or invalidated if it previously pointed to the
31966 // last one.
31967 // RETURNS: %TRUE if @iter is still valid, %FALSE if not.
31968 // <iter>: A valid #GtkTreeIter
31969 int remove(TreeIter* iter) {
31970 return gtk_tree_store_remove(&this, iter);
31973 // Reorders the children of @parent in @tree_store to follow the order
31974 // indicated by @new_order. Note that this function only works with
31975 // unsorted stores.
31976 // <parent>: A #GtkTreeIter.
31977 // <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<literal>[newpos] = oldpos</literal>.
31978 void reorder(TreeIter* parent, int* new_order) {
31979 gtk_tree_store_reorder(&this, parent, new_order);
31982 // Unintrospectable method: set() / gtk_tree_store_set()
31983 // Sets the value of one or more cells in the row referenced by @iter.
31984 // The variable argument list should contain integer column numbers,
31985 // each column number followed by the value to be set.
31986 // The list is terminated by a -1. For example, to set column 0 with type
31987 // %G_TYPE_STRING to "Foo", you would write
31988 // <literal>gtk_tree_store_set (store, iter, 0, "Foo", -1)</literal>.
31989 // The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
31990 // will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
31991 // <iter>: A valid #GtkTreeIter for the row being modified
31992 /+ Not available -- variadic methods unsupported - use the C function directly.
31993 alias gtk_tree_store_set set; // Variadic
31996 // This function is meant primarily for #GObjects that inherit from
31997 // #GtkTreeStore, and should only be used when constructing a new
31998 // #GtkTreeStore. It will not function after a row has been added,
31999 // or a method on the #GtkTreeModel interface is called.
32000 // <n_columns>: Number of columns for the tree store
32001 // <types>: An array of #GType types, one for each column
32002 void set_column_types(int n_columns, Type* types) {
32003 gtk_tree_store_set_column_types(&this, n_columns, types);
32006 // Unintrospectable method: set_valist() / gtk_tree_store_set_valist()
32007 // See gtk_tree_store_set(); this version takes a <type>va_list</type> for
32008 // use by language bindings.
32009 // <iter>: A valid #GtkTreeIter for the row being modified
32010 // <var_args>: <type>va_list</type> of column/value pairs
32011 void set_valist(TreeIter* iter, va_list var_args) {
32012 gtk_tree_store_set_valist(&this, iter, var_args);
32015 // Sets the data in the cell specified by @iter and @column.
32016 // The type of @value must be convertible to the type of the
32017 // column.
32018 // <iter>: A valid #GtkTreeIter for the row being modified
32019 // <column>: column number to modify
32020 // <value>: new value for the cell
32021 void set_value(TreeIter* iter, int column, GObject2.Value* value) {
32022 gtk_tree_store_set_value(&this, iter, column, value);
32025 // A variant of gtk_tree_store_set_valist() which takes
32026 // the columns and values as two arrays, instead of varargs. This
32027 // function is mainly intended for language bindings or in case
32028 // the number of columns to change is not known until run-time.
32029 // <iter>: A valid #GtkTreeIter for the row being modified
32030 // <columns>: an array of column numbers
32031 // <values>: an array of GValues
32032 // <n_values>: the length of the @columns and @values arrays
32033 void set_valuesv(TreeIter* iter, int* columns, GObject2.Value* values, int n_values) {
32034 gtk_tree_store_set_valuesv(&this, iter, columns, values, n_values);
32037 // Swaps @a and @b in the same level of @tree_store. Note that this function
32038 // only works with unsorted stores.
32039 // <a>: A #GtkTreeIter.
32040 // <b>: Another #GtkTreeIter.
32041 void swap(TreeIter* a, TreeIter* b) {
32042 gtk_tree_store_swap(&this, a, b);
32046 struct TreeStoreClass {
32047 GObject2.ObjectClass parent_class;
32048 extern (C) void function () _gtk_reserved1;
32049 extern (C) void function () _gtk_reserved2;
32050 extern (C) void function () _gtk_reserved3;
32051 extern (C) void function () _gtk_reserved4;
32054 struct TreeView /* : Container */ {
32055 alias parent this;
32056 alias parent super_;
32057 alias parent container;
32058 Container parent;
32059 TreeViewPrivate* priv;
32062 // Creates a new #GtkTreeView widget.
32063 // RETURNS: A newly created #GtkTreeView widget.
32064 static TreeView* new_() {
32065 return gtk_tree_view_new();
32068 // Creates a new #GtkTreeView widget with the model initialized to @model.
32069 // RETURNS: A newly created #GtkTreeView widget.
32070 // <model>: the model.
32071 static TreeView* new_with_model(TreeModel* model) {
32072 return gtk_tree_view_new_with_model(model);
32075 // Appends @column to the list of columns. If @tree_view has "fixed_height"
32076 // mode enabled, then @column must have its "sizing" property set to be
32077 // GTK_TREE_VIEW_COLUMN_FIXED.
32078 // RETURNS: The number of columns in @tree_view after appending.
32079 // <column>: The #GtkTreeViewColumn to add.
32080 int append_column(TreeViewColumn* column) {
32081 return gtk_tree_view_append_column(&this, column);
32083 // Recursively collapses all visible, expanded nodes in @tree_view.
32084 void collapse_all() {
32085 gtk_tree_view_collapse_all(&this);
32088 // Collapses a row (hides its child rows, if they exist).
32089 // RETURNS: %TRUE if the row was collapsed.
32090 // <path>: path to a row in the @tree_view
32091 int collapse_row(TreePath* path) {
32092 return gtk_tree_view_collapse_row(&this, path);
32095 // Resizes all columns to their optimal width. Only works after the
32096 // treeview has been realized.
32097 void columns_autosize() {
32098 gtk_tree_view_columns_autosize(&this);
32101 // Converts bin_window coordinates to coordinates for the
32102 // tree (the full scrollable area of the tree).
32103 // <bx>: X coordinate relative to bin_window
32104 // <by>: Y coordinate relative to bin_window
32105 // <tx>: return location for tree X coordinate
32106 // <ty>: return location for tree Y coordinate
32107 void convert_bin_window_to_tree_coords(int bx, int by, /*out*/ int* tx, /*out*/ int* ty) {
32108 gtk_tree_view_convert_bin_window_to_tree_coords(&this, bx, by, tx, ty);
32111 // Converts bin_window coordinates (see gtk_tree_view_get_bin_window())
32112 // to widget relative coordinates.
32113 // <bx>: bin_window X coordinate
32114 // <by>: bin_window Y coordinate
32115 // <wx>: return location for widget X coordinate
32116 // <wy>: return location for widget Y coordinate
32117 void convert_bin_window_to_widget_coords(int bx, int by, /*out*/ int* wx, /*out*/ int* wy) {
32118 gtk_tree_view_convert_bin_window_to_widget_coords(&this, bx, by, wx, wy);
32121 // Converts tree coordinates (coordinates in full scrollable area of the tree)
32122 // to bin_window coordinates.
32123 // <tx>: tree X coordinate
32124 // <ty>: tree Y coordinate
32125 // <bx>: return location for X coordinate relative to bin_window
32126 // <by>: return location for Y coordinate relative to bin_window
32127 void convert_tree_to_bin_window_coords(int tx, int ty, /*out*/ int* bx, /*out*/ int* by) {
32128 gtk_tree_view_convert_tree_to_bin_window_coords(&this, tx, ty, bx, by);
32131 // Converts tree coordinates (coordinates in full scrollable area of the tree)
32132 // to widget coordinates.
32133 // <tx>: X coordinate relative to the tree
32134 // <ty>: Y coordinate relative to the tree
32135 // <wx>: return location for widget X coordinate
32136 // <wy>: return location for widget Y coordinate
32137 void convert_tree_to_widget_coords(int tx, int ty, /*out*/ int* wx, /*out*/ int* wy) {
32138 gtk_tree_view_convert_tree_to_widget_coords(&this, tx, ty, wx, wy);
32141 // Converts widget coordinates to coordinates for the bin_window
32142 // (see gtk_tree_view_get_bin_window()).
32143 // <wx>: X coordinate relative to the widget
32144 // <wy>: Y coordinate relative to the widget
32145 // <bx>: return location for bin_window X coordinate
32146 // <by>: return location for bin_window Y coordinate
32147 void convert_widget_to_bin_window_coords(int wx, int wy, /*out*/ int* bx, /*out*/ int* by) {
32148 gtk_tree_view_convert_widget_to_bin_window_coords(&this, wx, wy, bx, by);
32151 // Converts widget coordinates to coordinates for the
32152 // tree (the full scrollable area of the tree).
32153 // <wx>: X coordinate relative to the widget
32154 // <wy>: Y coordinate relative to the widget
32155 // <tx>: return location for tree X coordinate
32156 // <ty>: return location for tree Y coordinate
32157 void convert_widget_to_tree_coords(int wx, int wy, /*out*/ int* tx, /*out*/ int* ty) {
32158 gtk_tree_view_convert_widget_to_tree_coords(&this, wx, wy, tx, ty);
32161 // Creates a #GdkPixmap representation of the row at @path.
32162 // This image is used for a drag icon.
32163 // RETURNS: a newly-allocated pixmap of the drag icon.
32164 // <path>: a #GtkTreePath in @tree_view
32165 Gdk2.Pixmap* create_row_drag_icon(TreePath* path) {
32166 return gtk_tree_view_create_row_drag_icon(&this, path);
32169 // Turns @tree_view into a drop destination for automatic DND. Calling
32170 // this method sets #GtkTreeView:reorderable to %FALSE.
32171 // <targets>: the table of targets that the drag will support
32172 // <n_targets>: the number of items in @targets
32173 // <actions>: the bitmask of possible actions for a drag from this widget
32174 void enable_model_drag_dest(TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
32175 gtk_tree_view_enable_model_drag_dest(&this, targets, n_targets, actions);
32178 // Turns @tree_view into a drag source for automatic DND. Calling this
32179 // method sets #GtkTreeView:reorderable to %FALSE.
32180 // <start_button_mask>: Mask of allowed buttons to start drag
32181 // <targets>: the table of targets that the drag will support
32182 // <n_targets>: the number of items in @targets
32183 // <actions>: the bitmask of possible actions for a drag from this widget
32184 void enable_model_drag_source(Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
32185 gtk_tree_view_enable_model_drag_source(&this, start_button_mask, targets, n_targets, actions);
32187 // Recursively expands all nodes in the @tree_view.
32188 void expand_all() {
32189 gtk_tree_view_expand_all(&this);
32192 // Opens the row so its children are visible.
32193 // RETURNS: %TRUE if the row existed and had children
32194 // <path>: path to a row
32195 // <open_all>: whether to recursively expand, or just expand immediate children
32196 int expand_row(TreePath* path, int open_all) {
32197 return gtk_tree_view_expand_row(&this, path, open_all);
32200 // Expands the row at @path. This will also expand all parent rows of
32201 // <path>: path to a row.
32202 void expand_to_path(TreePath* path) {
32203 gtk_tree_view_expand_to_path(&this, path);
32206 // Fills the bounding rectangle in bin_window coordinates for the cell at the
32207 // row specified by @path and the column specified by @column. If @path is
32208 // %NULL, or points to a node not found in the tree, the @y and @height fields of
32209 // the rectangle will be filled with 0. If @column is %NULL, the @x and @width
32210 // fields will be filled with 0. The returned rectangle is equivalent to the
32211 // areas tile to cover the entire bin window. Contrast with the @cell_area,
32212 // returned by gtk_tree_view_get_cell_area(), which returns only the cell
32213 // itself, excluding surrounding borders and the tree expander area.
32214 // <path>: a #GtkTreePath for the row, or %NULL to get only horizontal coordinates
32215 // <column>: a #GtkTreeViewColumn for the column, or %NULL to get only vertical coordiantes
32216 // <rect>: rectangle to fill with cell background rect
32217 void get_background_area(TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect) {
32218 gtk_tree_view_get_background_area(&this, path, column, rect);
32221 // Returns the window that @tree_view renders to.
32222 // This is used primarily to compare to <literal>event->window</literal>
32223 // to confirm that the event on @tree_view is on the right window.
32224 // hasn't been realized yet
32225 // RETURNS: A #GdkWindow, or %NULL when @tree_view
32226 Gdk2.Window* get_bin_window() {
32227 return gtk_tree_view_get_bin_window(&this);
32230 // Fills the bounding rectangle in bin_window coordinates for the cell at the
32231 // row specified by @path and the column specified by @column. If @path is
32232 // %NULL, or points to a path not currently displayed, the @y and @height fields
32233 // of the rectangle will be filled with 0. If @column is %NULL, the @x and @width
32234 // fields will be filled with 0. The sum of all cell rects does not cover the
32235 // entire tree; there are extra pixels in between rows, for example. The
32236 // returned rectangle is equivalent to the @cell_area passed to
32237 // gtk_cell_renderer_render(). This function is only valid if @tree_view is
32238 // realized.
32239 // <path>: a #GtkTreePath for the row, or %NULL to get only horizontal coordinates
32240 // <column>: a #GtkTreeViewColumn for the column, or %NULL to get only vertical coordinates
32241 // <rect>: rectangle to fill with cell rect
32242 void get_cell_area(TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect) {
32243 gtk_tree_view_get_cell_area(&this, path, column, rect);
32246 // Gets the #GtkTreeViewColumn at the given position in the #tree_view.
32247 // position is outside the range of columns.
32248 // RETURNS: The #GtkTreeViewColumn, or %NULL if the
32249 // <n>: The position of the column, counting from 0.
32250 TreeViewColumn* get_column(int n) {
32251 return gtk_tree_view_get_column(&this, n);
32254 // Returns a #GList of all the #GtkTreeViewColumn s currently in @tree_view.
32255 // The returned list must be freed with g_list_free ().
32256 // RETURNS: A list of #GtkTreeViewColumn s
32257 GLib2.List* /*new container*/ get_columns() {
32258 return gtk_tree_view_get_columns(&this);
32261 // Fills in @path and @focus_column with the current path and focus column. If
32262 // the cursor isn't currently set, then *@path will be %NULL. If no column
32263 // currently has focus, then *@focus_column will be %NULL.
32264 // The returned #GtkTreePath must be freed with gtk_tree_path_free() when
32265 // you are done with it.
32266 // <path>: A pointer to be filled with the current cursor path, or %NULL
32267 // <focus_column>: A pointer to be filled with the current focus column, or %NULL
32268 void get_cursor(/*out*/ TreePath** path=null, /*out*/ TreeViewColumn** focus_column=null) {
32269 gtk_tree_view_get_cursor(&this, path, focus_column);
32272 // Determines the destination row for a given position. @drag_x and
32273 // meaningful if @tree_view is realized. Therefore this function will always
32274 // return %FALSE if @tree_view is not realized or does not have a model.
32275 // is indeed the case.
32276 // RETURNS: whether there is a row at the given position, %TRUE if this
32277 // <drag_x>: the position to determine the destination row for
32278 // <drag_y>: the position to determine the destination row for
32279 // <path>: Return location for the path of the highlighted row, or %NULL.
32280 // <pos>: Return location for the drop position, or %NULL
32281 int get_dest_row_at_pos(int drag_x, int drag_y, /*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null) {
32282 return gtk_tree_view_get_dest_row_at_pos(&this, drag_x, drag_y, path, pos);
32285 // Gets information about the row that is highlighted for feedback.
32286 // <path>: Return location for the path of the highlighted row, or %NULL.
32287 // <pos>: Return location for the drop position, or %NULL
32288 void get_drag_dest_row(/*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null) {
32289 gtk_tree_view_get_drag_dest_row(&this, path, pos);
32292 // Returns whether or not the tree allows to start interactive searching
32293 // by typing in text.
32294 // RETURNS: whether or not to let the user search interactively
32295 int get_enable_search() {
32296 return gtk_tree_view_get_enable_search(&this);
32299 // Returns whether or not tree lines are drawn in @tree_view.
32300 // otherwise.
32301 // RETURNS: %TRUE if tree lines are drawn in @tree_view, %FALSE
32302 int get_enable_tree_lines() {
32303 return gtk_tree_view_get_enable_tree_lines(&this);
32306 // Returns the column that is the current expander column.
32307 // This column has the expander arrow drawn next to it.
32308 // RETURNS: The expander column.
32309 TreeViewColumn* get_expander_column() {
32310 return gtk_tree_view_get_expander_column(&this);
32313 // Returns whether fixed height mode is turned on for @tree_view.
32314 // RETURNS: %TRUE if @tree_view is in fixed height mode
32315 int get_fixed_height_mode() {
32316 return gtk_tree_view_get_fixed_height_mode(&this);
32319 // Returns which grid lines are enabled in @tree_view.
32320 // are enabled.
32321 // RETURNS: a #GtkTreeViewGridLines value indicating which grid lines
32322 TreeViewGridLines get_grid_lines() {
32323 return gtk_tree_view_get_grid_lines(&this);
32326 // Gets the #GtkAdjustment currently being used for the horizontal aspect.
32327 // if none is currently being used.
32328 // RETURNS: A #GtkAdjustment object, or %NULL
32329 Adjustment* get_hadjustment() {
32330 return gtk_tree_view_get_hadjustment(&this);
32333 // Returns whether all header columns are clickable.
32334 // RETURNS: %TRUE if all header columns are clickable, otherwise %FALSE
32335 int get_headers_clickable() {
32336 return gtk_tree_view_get_headers_clickable(&this);
32339 // Returns %TRUE if the headers on the @tree_view are visible.
32340 // RETURNS: Whether the headers are visible or not.
32341 int get_headers_visible() {
32342 return gtk_tree_view_get_headers_visible(&this);
32345 // Returns whether hover expansion mode is turned on for @tree_view.
32346 // RETURNS: %TRUE if @tree_view is in hover expansion mode
32347 int get_hover_expand() {
32348 return gtk_tree_view_get_hover_expand(&this);
32351 // Returns whether hover selection mode is turned on for @tree_view.
32352 // RETURNS: %TRUE if @tree_view is in hover selection mode
32353 int get_hover_selection() {
32354 return gtk_tree_view_get_hover_selection(&this);
32357 // Returns the amount, in pixels, of extra indentation for child levels
32358 // in @tree_view.
32359 // RETURNS: the amount of extra indentation for child levels in
32360 int get_level_indentation() {
32361 return gtk_tree_view_get_level_indentation(&this);
32364 // Returns the model the #GtkTreeView is based on. Returns %NULL if the
32365 // model is unset.
32366 // RETURNS: A #GtkTreeModel, or %NULL if none is currently being used.
32367 TreeModel* get_model() {
32368 return gtk_tree_view_get_model(&this);
32371 // Finds the path at the point (@x, @y), relative to bin_window coordinates
32372 // (please see gtk_tree_view_get_bin_window()).
32373 // That is, @x and @y are relative to an events coordinates. @x and @y must
32374 // come from an event on the @tree_view only where <literal>event->window ==
32375 // gtk_tree_view_get_bin_window (<!-- -->)</literal>. It is primarily for
32376 // things like popup menus. If @path is non-%NULL, then it will be filled
32377 // with the #GtkTreePath at that point. This path should be freed with
32378 // gtk_tree_path_free(). If @column is non-%NULL, then it will be filled
32379 // with the column at that point. @cell_x and @cell_y return the coordinates
32380 // relative to the cell background (i.e. the @background_area passed to
32381 // gtk_cell_renderer_render()). This function is only meaningful if
32382 // if @tree_view is not realized or does not have a model.
32383 // For converting widget coordinates (eg. the ones you get from
32384 // GtkWidget::query-tooltip), please see
32385 // gtk_tree_view_convert_widget_to_bin_window_coords().
32386 // RETURNS: %TRUE if a row exists at that coordinate.
32387 // <x>: The x position to be identified (relative to bin_window).
32388 // <y>: The y position to be identified (relative to bin_window).
32389 // <path>: A pointer to a #GtkTreePath pointer to be filled in, or %NULL
32390 // <column>: A pointer to a #GtkTreeViewColumn pointer to be filled in, or %NULL
32391 // <cell_x>: A pointer where the X coordinate relative to the cell can be placed, or %NULL
32392 // <cell_y>: A pointer where the Y coordinate relative to the cell can be placed, or %NULL
32393 int get_path_at_pos(int x, int y, /*out*/ TreePath** path=null, /*out*/ TreeViewColumn** column=null, /*out*/ int* cell_x=null, /*out*/ int* cell_y=null) {
32394 return gtk_tree_view_get_path_at_pos(&this, x, y, path, column, cell_x, cell_y);
32397 // Retrieves whether the user can reorder the tree via drag-and-drop. See
32398 // gtk_tree_view_set_reorderable().
32399 // RETURNS: %TRUE if the tree can be reordered.
32400 int get_reorderable() {
32401 return gtk_tree_view_get_reorderable(&this);
32404 // Unintrospectable method: get_row_separator_func() / gtk_tree_view_get_row_separator_func()
32405 // Returns the current row separator function.
32406 // RETURNS: the current row separator function.
32407 TreeViewRowSeparatorFunc get_row_separator_func() {
32408 return gtk_tree_view_get_row_separator_func(&this);
32411 // Returns whether rubber banding is turned on for @tree_view. If the
32412 // selection mode is #GTK_SELECTION_MULTIPLE, rubber banding will allow the
32413 // user to select multiple rows by dragging the mouse.
32414 // RETURNS: %TRUE if rubber banding in @tree_view is enabled.
32415 int get_rubber_banding() {
32416 return gtk_tree_view_get_rubber_banding(&this);
32419 // Gets the setting set by gtk_tree_view_set_rules_hint().
32420 // RETURNS: %TRUE if rules are useful for the user of this tree
32421 int get_rules_hint() {
32422 return gtk_tree_view_get_rules_hint(&this);
32425 // Gets the column searched on by the interactive search code.
32426 // RETURNS: the column the interactive search code searches in.
32427 int get_search_column() {
32428 return gtk_tree_view_get_search_column(&this);
32431 // Returns the #GtkEntry which is currently in use as interactive search
32432 // entry for @tree_view. In case the built-in entry is being used, %NULL
32433 // will be returned.
32434 // RETURNS: the entry currently in use as search entry.
32435 Entry* get_search_entry() {
32436 return gtk_tree_view_get_search_entry(&this);
32439 // Unintrospectable method: get_search_equal_func() / gtk_tree_view_get_search_equal_func()
32440 // Returns the compare function currently in use.
32441 // RETURNS: the currently used compare function for the search code.
32442 TreeViewSearchEqualFunc get_search_equal_func() {
32443 return gtk_tree_view_get_search_equal_func(&this);
32446 // Unintrospectable method: get_search_position_func() / gtk_tree_view_get_search_position_func()
32447 // Returns the positioning function currently in use.
32448 // RETURNS: the currently used function for positioning the search dialog.
32449 TreeViewSearchPositionFunc get_search_position_func() {
32450 return gtk_tree_view_get_search_position_func(&this);
32453 // Gets the #GtkTreeSelection associated with @tree_view.
32454 // RETURNS: A #GtkTreeSelection object.
32455 TreeSelection* get_selection() {
32456 return gtk_tree_view_get_selection(&this);
32459 // Returns whether or not expanders are drawn in @tree_view.
32460 // otherwise.
32461 // RETURNS: %TRUE if expanders are drawn in @tree_view, %FALSE
32462 int get_show_expanders() {
32463 return gtk_tree_view_get_show_expanders(&this);
32466 // Returns the column of @tree_view's model which is being used for
32467 // displaying tooltips on @tree_view's rows.
32468 // used, or -1 if this is disabled.
32469 // RETURNS: the index of the tooltip column that is currently being
32470 int get_tooltip_column() {
32471 return gtk_tree_view_get_tooltip_column(&this);
32474 // This function is supposed to be used in a #GtkWidget::query-tooltip
32475 // signal handler for #GtkTreeView. The @x, @y and @keyboard_tip values
32476 // which are received in the signal handler, should be passed to this
32477 // function without modification.
32478 // The return value indicates whether there is a tree view row at the given
32479 // coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
32480 // tooltips the row returned will be the cursor row. When %TRUE, then any of
32481 // that row and the corresponding model. @x and @y will always be converted
32482 // to be relative to @tree_view's bin_window if @keyboard_tooltip is %FALSE.
32483 // RETURNS: whether or not the given tooltip context points to a row.
32484 // <x>: the x coordinate (relative to widget coordinates)
32485 // <y>: the y coordinate (relative to widget coordinates)
32486 // <keyboard_tip>: whether this is a keyboard tooltip or not
32487 // <model>: a pointer to receive a #GtkTreeModel or %NULL
32488 // <path>: a pointer to receive a #GtkTreePath or %NULL
32489 // <iter>: a pointer to receive a #GtkTreeIter or %NULL
32490 int get_tooltip_context(/*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ TreeModel** model=null, /*out*/ TreePath** path=null, /*out*/ TreeIter* iter=null) {
32491 return gtk_tree_view_get_tooltip_context(&this, x, y, keyboard_tip, model, path, iter);
32494 // Gets the #GtkAdjustment currently being used for the vertical aspect.
32495 // if none is currently being used.
32496 // RETURNS: A #GtkAdjustment object, or %NULL
32497 Adjustment* get_vadjustment() {
32498 return gtk_tree_view_get_vadjustment(&this);
32501 // Sets @start_path and @end_path to be the first and last visible path.
32502 // Note that there may be invisible paths in between.
32503 // The paths should be freed with gtk_tree_path_free() after use.
32504 // RETURNS: %TRUE, if valid paths were placed in @start_path and @end_path.
32505 // <start_path>: Return location for start of region, or %NULL.
32506 // <end_path>: Return location for end of region, or %NULL.
32507 int get_visible_range(/*out*/ TreePath** start_path=null, /*out*/ TreePath** end_path=null) {
32508 return gtk_tree_view_get_visible_range(&this, start_path, end_path);
32511 // Fills @visible_rect with the currently-visible region of the
32512 // buffer, in tree coordinates. Convert to bin_window coordinates with
32513 // gtk_tree_view_convert_tree_to_bin_window_coords().
32514 // Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
32515 // scrollable area of the tree.
32516 // <visible_rect>: rectangle to fill
32517 void get_visible_rect(/*out*/ Gdk2.Rectangle* visible_rect) {
32518 gtk_tree_view_get_visible_rect(&this, visible_rect);
32521 // This inserts the @column into the @tree_view at @position. If @position is
32522 // -1, then the column is inserted at the end. If @tree_view has
32523 // "fixed_height" mode enabled, then @column must have its "sizing" property
32524 // set to be GTK_TREE_VIEW_COLUMN_FIXED.
32525 // RETURNS: The number of columns in @tree_view after insertion.
32526 // <column>: The #GtkTreeViewColumn to be inserted.
32527 // <position>: The position to insert @column in.
32528 int insert_column(TreeViewColumn* column, int position) {
32529 return gtk_tree_view_insert_column(&this, column, position);
32532 // Unintrospectable method: insert_column_with_attributes() / gtk_tree_view_insert_column_with_attributes()
32533 // Creates a new #GtkTreeViewColumn and inserts it into the @tree_view at
32534 // the end. The column is initialized with the attributes given. If @tree_view
32535 // has "fixed_height" mode enabled, then the new column will have its sizing
32536 // property set to be GTK_TREE_VIEW_COLUMN_FIXED.
32537 // RETURNS: The number of columns in @tree_view after insertion.
32538 // <position>: The position to insert the new column in.
32539 // <title>: The title to set the header to.
32540 // <cell>: The #GtkCellRenderer.
32541 /+ Not available -- variadic methods unsupported - use the C function directly.
32542 alias gtk_tree_view_insert_column_with_attributes insert_column_with_attributes; // Variadic
32545 // Convenience function that inserts a new column into the #GtkTreeView
32546 // with the given cell renderer and a #GtkCellDataFunc to set cell renderer
32547 // attributes (normally using data from the model). See also
32548 // gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
32549 // If @tree_view has "fixed_height" mode enabled, then the new column will have its
32550 // "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.
32551 // RETURNS: number of columns in the tree view post-insert
32552 // <position>: Position to insert, -1 for append
32553 // <title>: column title
32554 // <cell>: cell renderer for column
32555 // <func>: function to set attributes of cell renderer
32556 // <data>: data for @func
32557 // <dnotify>: destroy notifier for @data
32558 int insert_column_with_data_func(int position, char* title, CellRenderer* cell, TreeCellDataFunc func, void* data, GLib2.DestroyNotify dnotify) {
32559 return gtk_tree_view_insert_column_with_data_func(&this, position, title, cell, func, data, dnotify);
32562 // Returns whether a rubber banding operation is currently being done
32563 // in @tree_view.
32564 // done in @tree_view.
32565 // RETURNS: %TRUE if a rubber banding operation is currently being
32566 int is_rubber_banding_active() {
32567 return gtk_tree_view_is_rubber_banding_active(&this);
32570 // Calls @func on all expanded rows.
32571 // <func>: A function to be called
32572 // <data>: User data to be passed to the function.
32573 void map_expanded_rows(TreeViewMappingFunc func, void* data) {
32574 gtk_tree_view_map_expanded_rows(&this, func, data);
32577 // Moves @column to be after to @base_column. If @base_column is %NULL, then
32578 // <column>: The #GtkTreeViewColumn to be moved.
32579 // <base_column>: The #GtkTreeViewColumn to be moved relative to, or %NULL.
32580 void move_column_after(TreeViewColumn* column, TreeViewColumn* base_column=null) {
32581 gtk_tree_view_move_column_after(&this, column, base_column);
32584 // Removes @column from @tree_view.
32585 // RETURNS: The number of columns in @tree_view after removing.
32586 // <column>: The #GtkTreeViewColumn to remove.
32587 int remove_column(TreeViewColumn* column) {
32588 return gtk_tree_view_remove_column(&this, column);
32591 // Activates the cell determined by @path and @column.
32592 // <path>: The #GtkTreePath to be activated.
32593 // <column>: The #GtkTreeViewColumn to be activated.
32594 void row_activated(TreePath* path, TreeViewColumn* column) {
32595 gtk_tree_view_row_activated(&this, path, column);
32598 // Returns %TRUE if the node pointed to by @path is expanded in @tree_view.
32599 // RETURNS: %TRUE if #path is expanded.
32600 // <path>: A #GtkTreePath to test expansion state.
32601 int row_expanded(TreePath* path) {
32602 return gtk_tree_view_row_expanded(&this, path);
32605 // Moves the alignments of @tree_view to the position specified by @column and
32606 // if @path is %NULL no vertical scrolling occurs. At a minimum, one of @column
32607 // or @path need to be non-%NULL. @row_align determines where the row is
32608 // placed, and @col_align determines where @column is placed. Both are expected
32609 // to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
32610 // right/bottom alignment, 0.5 means center.
32611 // If @use_align is %FALSE, then the alignment arguments are ignored, and the
32612 // tree does the minimum amount of work to scroll the cell onto the screen.
32613 // This means that the cell will be scrolled to the edge closest to its current
32614 // position. If the cell is currently visible on the screen, nothing is done.
32615 // This function only works if the model is set, and @path is a valid row on the
32616 // model. If the model changes before the @tree_view is realized, the centered
32617 // path will be modified to reflect this change.
32618 // <path>: The path of the row to move to, or %NULL.
32619 // <column>: The #GtkTreeViewColumn to move horizontally to, or %NULL.
32620 // <use_align>: whether to use alignment arguments, or %FALSE.
32621 // <row_align>: The vertical alignment of the row specified by @path.
32622 // <col_align>: The horizontal alignment of the column specified by @column.
32623 void scroll_to_cell(TreePath* path, TreeViewColumn* column, int use_align, float row_align, float col_align) {
32624 gtk_tree_view_scroll_to_cell(&this, path, column, use_align, row_align, col_align);
32627 // Scrolls the tree view such that the top-left corner of the visible
32628 // area is @tree_x, @tree_y, where @tree_x and @tree_y are specified
32629 // in tree coordinates. The @tree_view must be realized before
32630 // this function is called. If it isn't, you probably want to be
32631 // using gtk_tree_view_scroll_to_cell().
32632 // If either @tree_x or @tree_y are -1, then that direction isn't scrolled.
32633 // <tree_x>: X coordinate of new top-left pixel of visible area, or -1
32634 // <tree_y>: Y coordinate of new top-left pixel of visible area, or -1
32635 void scroll_to_point(int tree_x, int tree_y) {
32636 gtk_tree_view_scroll_to_point(&this, tree_x, tree_y);
32639 // Sets a user function for determining where a column may be dropped when
32640 // dragged. This function is called on every column pair in turn at the
32641 // beginning of a column drag to determine where a drop can take place. The
32642 // dragged, the two #GtkTreeViewColumn s determining the drop spot, and
32643 // are %NULL, then they indicate an edge. If @func is set to be %NULL, then
32644 // dropped everywhere.
32645 // <func>: A function to determine which columns are reorderable, or %NULL.
32646 // <user_data>: User data to be passed to @func, or %NULL
32647 // <destroy>: Destroy notifier for @user_data, or %NULL
32648 void set_column_drag_function(TreeViewColumnDropFunc func=null, void* user_data=null, GLib2.DestroyNotify destroy=null) {
32649 gtk_tree_view_set_column_drag_function(&this, func, user_data, destroy);
32652 // Sets the current keyboard focus to be at @path, and selects it. This is
32653 // useful when you want to focus the user's attention on a particular row. If
32654 // it. Additionally, if @focus_column is specified, and @start_editing is
32655 // %TRUE, then editing should be started in the specified cell.
32656 // This function is often followed by @gtk_widget_grab_focus (@tree_view)
32657 // in order to give keyboard focus to the widget. Please note that editing
32658 // can only happen when the widget is realized.
32659 // If @path is invalid for @model, the current cursor (if any) will be unset
32660 // and the function will return without failing.
32661 // <path>: A #GtkTreePath
32662 // <focus_column>: A #GtkTreeViewColumn, or %NULL
32663 // <start_editing>: %TRUE if the specified cell should start being edited.
32664 void set_cursor(TreePath* path, TreeViewColumn* focus_column, int start_editing) {
32665 gtk_tree_view_set_cursor(&this, path, focus_column, start_editing);
32668 // Sets the current keyboard focus to be at @path, and selects it. This is
32669 // useful when you want to focus the user's attention on a particular row. If
32670 // it. If @focus_column and @focus_cell are not %NULL, and @focus_column
32671 // contains 2 or more editable or activatable cells, then focus is given to
32672 // the cell specified by @focus_cell. Additionally, if @focus_column is
32673 // specified, and @start_editing is %TRUE, then editing should be started in
32674 // the specified cell. This function is often followed by
32675 // widget. Please note that editing can only happen when the widget is
32676 // realized.
32677 // If @path is invalid for @model, the current cursor (if any) will be unset
32678 // and the function will return without failing.
32679 // <path>: A #GtkTreePath
32680 // <focus_column>: A #GtkTreeViewColumn, or %NULL
32681 // <focus_cell>: A #GtkCellRenderer, or %NULL
32682 // <start_editing>: %TRUE if the specified cell should start being edited.
32683 void set_cursor_on_cell(TreePath* path, TreeViewColumn* focus_column, CellRenderer* focus_cell, int start_editing) {
32684 gtk_tree_view_set_cursor_on_cell(&this, path, focus_column, focus_cell, start_editing);
32687 // This function should almost never be used. It is meant for private use by
32688 // ATK for determining the number of visible children that are removed when the
32689 // user collapses a row, or a row is deleted.
32690 // <func>: Function to be called when a view row is destroyed, or %NULL
32691 // <data>: User data to be passed to @func, or %NULL
32692 // <destroy>: Destroy notifier for @data, or %NULL
32693 void set_destroy_count_func(TreeDestroyCountFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) {
32694 gtk_tree_view_set_destroy_count_func(&this, func, data, destroy);
32697 // Sets the row that is highlighted for feedback.
32698 // <path>: The path of the row to highlight, or %NULL.
32699 // <pos>: Specifies whether to drop before, after or into the row
32700 void set_drag_dest_row(TreePath* path, TreeViewDropPosition pos) {
32701 gtk_tree_view_set_drag_dest_row(&this, path, pos);
32704 // If @enable_search is set, then the user can type in text to search through
32705 // the tree interactively (this is sometimes called "typeahead find").
32706 // Note that even if this is %FALSE, the user can still initiate a search
32707 // using the "start-interactive-search" key binding.
32708 // <enable_search>: %TRUE, if the user can search interactively
32709 void set_enable_search(int enable_search) {
32710 gtk_tree_view_set_enable_search(&this, enable_search);
32713 // Sets whether to draw lines interconnecting the expanders in @tree_view.
32714 // This does not have any visible effects for lists.
32715 // <enabled>: %TRUE to enable tree line drawing, %FALSE otherwise.
32716 void set_enable_tree_lines(int enabled) {
32717 gtk_tree_view_set_enable_tree_lines(&this, enabled);
32720 // Sets the column to draw the expander arrow at. It must be in @tree_view.
32721 // If @column is %NULL, then the expander arrow is always at the first
32722 // visible column.
32723 // If you do not want expander arrow to appear in your tree, set the
32724 // expander column to a hidden column.
32725 // <column>: %NULL, or the column to draw the expander arrow at.
32726 void set_expander_column(TreeViewColumn* column) {
32727 gtk_tree_view_set_expander_column(&this, column);
32730 // Enables or disables the fixed height mode of @tree_view.
32731 // Fixed height mode speeds up #GtkTreeView by assuming that all
32732 // rows have the same height.
32733 // Only enable this option if all rows are the same height and all
32734 // columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.
32735 // <enable>: %TRUE to enable fixed height mode
32736 void set_fixed_height_mode(int enable) {
32737 gtk_tree_view_set_fixed_height_mode(&this, enable);
32740 // Sets which grid lines to draw in @tree_view.
32741 // <grid_lines>: a #GtkTreeViewGridLines value indicating which grid lines to enable.
32742 void set_grid_lines(TreeViewGridLines grid_lines) {
32743 gtk_tree_view_set_grid_lines(&this, grid_lines);
32746 // Sets the #GtkAdjustment for the current horizontal aspect.
32747 // <adjustment>: The #GtkAdjustment to set, or %NULL
32748 void set_hadjustment(Adjustment* adjustment=null) {
32749 gtk_tree_view_set_hadjustment(&this, adjustment);
32752 // Allow the column title buttons to be clicked.
32753 // <setting>: %TRUE if the columns are clickable.
32754 void set_headers_clickable(int setting) {
32755 gtk_tree_view_set_headers_clickable(&this, setting);
32758 // Sets the visibility state of the headers.
32759 // <headers_visible>: %TRUE if the headers are visible
32760 void set_headers_visible(int headers_visible) {
32761 gtk_tree_view_set_headers_visible(&this, headers_visible);
32764 // Enables of disables the hover expansion mode of @tree_view.
32765 // Hover expansion makes rows expand or collapse if the pointer
32766 // moves over them.
32767 // <expand>: %TRUE to enable hover selection mode
32768 void set_hover_expand(int expand) {
32769 gtk_tree_view_set_hover_expand(&this, expand);
32772 // Enables of disables the hover selection mode of @tree_view.
32773 // Hover selection makes the selected row follow the pointer.
32774 // Currently, this works only for the selection modes
32775 // %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
32776 // <hover>: %TRUE to enable hover selection mode
32777 void set_hover_selection(int hover) {
32778 gtk_tree_view_set_hover_selection(&this, hover);
32781 // Sets the amount of extra indentation for child levels to use in @tree_view
32782 // in addition to the default indentation. The value should be specified in
32783 // pixels, a value of 0 disables this feature and in this case only the default
32784 // indentation will be used.
32785 // This does not have any visible effects for lists.
32786 // <indentation>: the amount, in pixels, of extra indentation in @tree_view.
32787 void set_level_indentation(int indentation) {
32788 gtk_tree_view_set_level_indentation(&this, indentation);
32791 // Sets the model for a #GtkTreeView. If the @tree_view already has a model
32792 // set, it will remove it before setting the new model. If @model is %NULL,
32793 // then it will unset the old model.
32794 // <model>: The model.
32795 void set_model(TreeModel* model=null) {
32796 gtk_tree_view_set_model(&this, model);
32799 // This function is a convenience function to allow you to reorder
32800 // models that support the #GtkDragSourceIface and the
32801 // #GtkDragDestIface. Both #GtkTreeStore and #GtkListStore support
32802 // these. If @reorderable is %TRUE, then the user can reorder the
32803 // model by dragging and dropping rows. The developer can listen to
32804 // these changes by connecting to the model's row_inserted and
32805 // row_deleted signals. The reordering is implemented by setting up
32806 // the tree view as a drag source and destination. Therefore, drag and
32807 // drop can not be used in a reorderable view for any other purpose.
32808 // This function does not give you any degree of control over the order -- any
32809 // reordering is allowed. If more control is needed, you should probably
32810 // handle drag and drop manually.
32811 // <reorderable>: %TRUE, if the tree can be reordered.
32812 void set_reorderable(int reorderable) {
32813 gtk_tree_view_set_reorderable(&this, reorderable);
32816 // Sets the row separator function, which is used to determine
32817 // whether a row should be drawn as a separator. If the row separator
32818 // function is %NULL, no separators are drawn. This is the default value.
32819 // <func>: a #GtkTreeViewRowSeparatorFunc
32820 // <data>: user data to pass to @func, or %NULL
32821 // <destroy>: destroy notifier for @data, or %NULL
32822 void set_row_separator_func(TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
32823 gtk_tree_view_set_row_separator_func(&this, func, data, destroy);
32826 // Enables or disables rubber banding in @tree_view. If the selection mode
32827 // is #GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
32828 // multiple rows by dragging the mouse.
32829 // <enable>: %TRUE to enable rubber banding
32830 void set_rubber_banding(int enable) {
32831 gtk_tree_view_set_rubber_banding(&this, enable);
32834 // This function tells GTK+ that the user interface for your
32835 // application requires users to read across tree rows and associate
32836 // cells with one another. By default, GTK+ will then render the tree
32837 // with alternating row colors. Do <emphasis>not</emphasis> use it
32838 // just because you prefer the appearance of the ruled tree; that's a
32839 // question for the theme. Some themes will draw tree rows in
32840 // alternating colors even when rules are turned off, and users who
32841 // prefer that appearance all the time can choose those themes. You
32842 // should call this function only as a <emphasis>semantic</emphasis>
32843 // hint to the theme engine that your tree makes alternating colors
32844 // useful from a functional standpoint (since it has lots of columns,
32845 // generally).
32846 // <setting>: %TRUE if the tree requires reading across rows
32847 void set_rules_hint(int setting) {
32848 gtk_tree_view_set_rules_hint(&this, setting);
32851 // Sets @column as the column where the interactive search code should
32852 // search in for the current model.
32853 // If the search column is set, users can use the "start-interactive-search"
32854 // key binding to bring up search popup. The enable-search property controls
32855 // whether simply typing text will also start an interactive search.
32856 // Note that @column refers to a column of the current model. The search
32857 // column is reset to -1 when the model is changed.
32858 // <column>: the column of the model to search in, or -1 to disable searching
32859 void set_search_column(int column) {
32860 gtk_tree_view_set_search_column(&this, column);
32863 // Sets the entry which the interactive search code will use for this
32864 // in our interface at all time at a fixed position. Passing %NULL for
32865 // entry again.
32866 // <entry>: the entry the interactive search code of @tree_view should use or %NULL
32867 void set_search_entry(Entry* entry=null) {
32868 gtk_tree_view_set_search_entry(&this, entry);
32871 // Sets the compare function for the interactive search capabilities; note
32872 // that somewhat like strcmp() returning 0 for equality
32873 // #GtkTreeViewSearchEqualFunc returns %FALSE on matches.
32874 // <search_equal_func>: the compare function to use during the search
32875 // <search_user_data>: user data to pass to @search_equal_func, or %NULL
32876 // <search_destroy>: Destroy notifier for @search_user_data, or %NULL
32877 void set_search_equal_func(TreeViewSearchEqualFunc search_equal_func, void* search_user_data=null, GLib2.DestroyNotify search_destroy=null) {
32878 gtk_tree_view_set_search_equal_func(&this, search_equal_func, search_user_data, search_destroy);
32881 // Sets the function to use when positioning the search dialog.
32882 // <func>: the function to use to position the search dialog, or %NULL to use the default search position function
32883 // <data>: user data to pass to @func, or %NULL
32884 // <destroy>: Destroy notifier for @data, or %NULL
32885 void set_search_position_func(TreeViewSearchPositionFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) {
32886 gtk_tree_view_set_search_position_func(&this, func, data, destroy);
32889 // Sets whether to draw and enable expanders and indent child rows in
32890 // and there will be no way to expand and collapse rows by default. Also
32891 // note that hiding the expanders will disable the default indentation. You
32892 // can set a custom indentation in this case using
32893 // gtk_tree_view_set_level_indentation().
32894 // This does not have any visible effects for lists.
32895 // <enabled>: %TRUE to enable expander drawing, %FALSE otherwise.
32896 void set_show_expanders(int enabled) {
32897 gtk_tree_view_set_show_expanders(&this, enabled);
32900 // Sets the tip area of @tooltip to the area @path, @column and @cell have
32901 // in common. For example if @path is %NULL and @column is set, the tip
32902 // area will be set to the full area covered by @column. See also
32903 // gtk_tooltip_set_tip_area().
32904 // Note that if @path is not specified and @cell is set and part of a column
32905 // containing the expander, the tooltip might not show and hide at the correct
32906 // position. In such cases @path must be set to the current node under the
32907 // mouse cursor for this function to operate correctly.
32908 // See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
32909 // <tooltip>: a #GtkTooltip
32910 // <path>: a #GtkTreePath or %NULL
32911 // <column>: a #GtkTreeViewColumn or %NULL
32912 // <cell>: a #GtkCellRenderer or %NULL
32913 void set_tooltip_cell(Tooltip* tooltip, TreePath* path=null, TreeViewColumn* column=null, CellRenderer* cell=null) {
32914 gtk_tree_view_set_tooltip_cell(&this, tooltip, path, column, cell);
32917 // If you only plan to have simple (text-only) tooltips on full rows, you
32918 // can use this function to have #GtkTreeView handle these automatically
32919 // for you. @column should be set to the column in @tree_view's model
32920 // containing the tooltip texts, or -1 to disable this feature.
32921 // When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
32922 // Note that the signal handler sets the text with gtk_tooltip_set_markup(),
32923 // so &amp;, &lt;, etc have to be escaped in the text.
32924 // <column>: an integer, which is a valid column number for @tree_view's model
32925 void set_tooltip_column(int column) {
32926 gtk_tree_view_set_tooltip_column(&this, column);
32929 // Sets the tip area of @tooltip to be the area covered by the row at @path.
32930 // See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
32931 // See also gtk_tooltip_set_tip_area().
32932 // <tooltip>: a #GtkTooltip
32933 // <path>: a #GtkTreePath
32934 void set_tooltip_row(Tooltip* tooltip, TreePath* path) {
32935 gtk_tree_view_set_tooltip_row(&this, tooltip, path);
32938 // Sets the #GtkAdjustment for the current vertical aspect.
32939 // <adjustment>: The #GtkAdjustment to set, or %NULL
32940 void set_vadjustment(Adjustment* adjustment=null) {
32941 gtk_tree_view_set_vadjustment(&this, adjustment);
32944 // Converts tree coordinates (coordinates in full scrollable area of the tree)
32945 // to bin_window coordinates.
32946 // incorrect. For converting bin_window coordinates to coordinates relative
32947 // to bin_window, please see
32948 // gtk_tree_view_convert_bin_window_to_widget_coords().
32949 // <tx>: tree X coordinate
32950 // <ty>: tree Y coordinate
32951 // <wx>: return location for X coordinate relative to bin_window
32952 // <wy>: return location for Y coordinate relative to bin_window
32953 void tree_to_widget_coords(int tx, int ty, int* wx, int* wy) {
32954 gtk_tree_view_tree_to_widget_coords(&this, tx, ty, wx, wy);
32957 // Undoes the effect of
32958 // gtk_tree_view_enable_model_drag_dest(). Calling this method sets
32959 // #GtkTreeView:reorderable to %FALSE.
32960 void unset_rows_drag_dest() {
32961 gtk_tree_view_unset_rows_drag_dest(&this);
32964 // Undoes the effect of
32965 // gtk_tree_view_enable_model_drag_source(). Calling this method sets
32966 // #GtkTreeView:reorderable to %FALSE.
32967 void unset_rows_drag_source() {
32968 gtk_tree_view_unset_rows_drag_source(&this);
32971 // Converts bin_window coordinates to coordinates for the
32972 // tree (the full scrollable area of the tree).
32973 // incorrect. For converting coordinates relative to the widget to
32974 // bin_window coordinates, please see
32975 // gtk_tree_view_convert_widget_to_bin_window_coords().
32976 // <wx>: X coordinate relative to bin_window
32977 // <wy>: Y coordinate relative to bin_window
32978 // <tx>: return location for tree X coordinate
32979 // <ty>: return location for tree Y coordinate
32980 void widget_to_tree_coords(int wx, int wy, int* tx, int* ty) {
32981 gtk_tree_view_widget_to_tree_coords(&this, wx, wy, tx, ty);
32983 // The number of columns of the treeview has changed.
32984 extern (C) alias static void function (TreeView* this_, void* user_data=null) signal_columns_changed;
32986 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32987 return super_.signal_connect!name(cb, data, cf);
32990 ulong signal_connect(string name:"columns-changed", CB/*:signal_columns_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32991 return signal_connect_data(&this, cast(char*)"columns-changed",
32992 cast(GObject2.Callback)cb, data, null, cf);
32994 // The position of the cursor (focused cell) has changed.
32995 extern (C) alias static void function (TreeView* this_, void* user_data=null) signal_cursor_changed;
32996 ulong signal_connect(string name:"cursor-changed", CB/*:signal_cursor_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32997 return signal_connect_data(&this, cast(char*)"cursor-changed",
32998 cast(GObject2.Callback)cb, data, null, cf);
33000 extern (C) alias static c_int function (TreeView* this_, c_int object, c_int p0, c_int p1, void* user_data=null) signal_expand_collapse_cursor_row;
33001 ulong signal_connect(string name:"expand-collapse-cursor-row", CB/*:signal_expand_collapse_cursor_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33002 return signal_connect_data(&this, cast(char*)"expand-collapse-cursor-row",
33003 cast(GObject2.Callback)cb, data, null, cf);
33005 extern (C) alias static c_int function (TreeView* this_, MovementStep* object, int p0, void* user_data=null) signal_move_cursor;
33006 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33007 return signal_connect_data(&this, cast(char*)"move-cursor",
33008 cast(GObject2.Callback)cb, data, null, cf);
33011 // The "row-activated" signal is emitted when the method
33012 // gtk_tree_view_row_activated() is called or the user double clicks
33013 // a treeview row. It is also emitted when a non-editable row is
33014 // Enter is pressed.
33015 // For selection handling refer to the <link linkend="TreeWidget">tree
33016 // widget conceptual overview</link> as well as #GtkTreeSelection.
33017 // <path>: the #GtkTreePath for the activated row
33018 // <column>: the #GtkTreeViewColumn in which the activation occurred
33019 extern (C) alias static void function (TreeView* this_, TreePath* path, TreeViewColumn* column, void* user_data=null) signal_row_activated;
33020 ulong signal_connect(string name:"row-activated", CB/*:signal_row_activated*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33021 return signal_connect_data(&this, cast(char*)"row-activated",
33022 cast(GObject2.Callback)cb, data, null, cf);
33025 // The given row has been collapsed (child nodes are hidden).
33026 // <iter>: the tree iter of the collapsed row
33027 // <path>: a tree path that points to the row
33028 extern (C) alias static void function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_row_collapsed;
33029 ulong signal_connect(string name:"row-collapsed", CB/*:signal_row_collapsed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33030 return signal_connect_data(&this, cast(char*)"row-collapsed",
33031 cast(GObject2.Callback)cb, data, null, cf);
33034 // The given row has been expanded (child nodes are shown).
33035 // <iter>: the tree iter of the expanded row
33036 // <path>: a tree path that points to the row
33037 extern (C) alias static void function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_row_expanded;
33038 ulong signal_connect(string name:"row-expanded", CB/*:signal_row_expanded*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33039 return signal_connect_data(&this, cast(char*)"row-expanded",
33040 cast(GObject2.Callback)cb, data, null, cf);
33042 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_select_all;
33043 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33044 return signal_connect_data(&this, cast(char*)"select-all",
33045 cast(GObject2.Callback)cb, data, null, cf);
33047 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_select_cursor_parent;
33048 ulong signal_connect(string name:"select-cursor-parent", CB/*:signal_select_cursor_parent*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33049 return signal_connect_data(&this, cast(char*)"select-cursor-parent",
33050 cast(GObject2.Callback)cb, data, null, cf);
33052 extern (C) alias static c_int function (TreeView* this_, c_int object, void* user_data=null) signal_select_cursor_row;
33053 ulong signal_connect(string name:"select-cursor-row", CB/*:signal_select_cursor_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33054 return signal_connect_data(&this, cast(char*)"select-cursor-row",
33055 cast(GObject2.Callback)cb, data, null, cf);
33058 // Set the scroll adjustments for the tree view. Usually scrolled containers
33059 // like #GtkScrolledWindow will emit this signal to connect two instances
33060 // of #GtkScrollbar to the scroll directions of the #GtkTreeView.
33061 extern (C) alias static void function (TreeView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
33062 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33063 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
33064 cast(GObject2.Callback)cb, data, null, cf);
33066 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_start_interactive_search;
33067 ulong signal_connect(string name:"start-interactive-search", CB/*:signal_start_interactive_search*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33068 return signal_connect_data(&this, cast(char*)"start-interactive-search",
33069 cast(GObject2.Callback)cb, data, null, cf);
33072 // The given row is about to be collapsed (hide its children nodes). Use this
33073 // signal if you need to control the collapsibility of individual rows.
33074 // RETURNS: %FALSE to allow collapsing, %TRUE to reject
33075 // <iter>: the tree iter of the row to collapse
33076 // <path>: a tree path that points to the row
33077 extern (C) alias static c_int function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_test_collapse_row;
33078 ulong signal_connect(string name:"test-collapse-row", CB/*:signal_test_collapse_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33079 return signal_connect_data(&this, cast(char*)"test-collapse-row",
33080 cast(GObject2.Callback)cb, data, null, cf);
33083 // The given row is about to be expanded (show its children nodes). Use this
33084 // signal if you need to control the expandability of individual rows.
33085 // RETURNS: %FALSE to allow expansion, %TRUE to reject
33086 // <iter>: the tree iter of the row to expand
33087 // <path>: a tree path that points to the row
33088 extern (C) alias static c_int function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_test_expand_row;
33089 ulong signal_connect(string name:"test-expand-row", CB/*:signal_test_expand_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33090 return signal_connect_data(&this, cast(char*)"test-expand-row",
33091 cast(GObject2.Callback)cb, data, null, cf);
33093 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_toggle_cursor_row;
33094 ulong signal_connect(string name:"toggle-cursor-row", CB/*:signal_toggle_cursor_row*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33095 return signal_connect_data(&this, cast(char*)"toggle-cursor-row",
33096 cast(GObject2.Callback)cb, data, null, cf);
33098 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_unselect_all;
33099 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33100 return signal_connect_data(&this, cast(char*)"unselect-all",
33101 cast(GObject2.Callback)cb, data, null, cf);
33105 struct TreeViewClass {
33106 ContainerClass parent_class;
33107 extern (C) void function (TreeView* tree_view, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
33109 // <path>: The #GtkTreePath to be activated.
33110 // <column>: The #GtkTreeViewColumn to be activated.
33111 extern (C) void function (TreeView* tree_view, TreePath* path, TreeViewColumn* column) row_activated;
33112 extern (C) int function (TreeView* tree_view, TreeIter* iter, TreePath* path) test_expand_row;
33113 extern (C) int function (TreeView* tree_view, TreeIter* iter, TreePath* path) test_collapse_row;
33114 extern (C) void function (TreeView* tree_view, TreeIter* iter, TreePath* path) row_expanded;
33115 extern (C) void function (TreeView* tree_view, TreeIter* iter, TreePath* path) row_collapsed;
33116 extern (C) void function (TreeView* tree_view) columns_changed;
33117 extern (C) void function (TreeView* tree_view) cursor_changed;
33118 extern (C) int function (TreeView* tree_view, MovementStep step, int count) move_cursor;
33119 extern (C) int function (TreeView* tree_view) select_all;
33120 extern (C) int function (TreeView* tree_view) unselect_all;
33121 extern (C) int function (TreeView* tree_view, int start_editing) select_cursor_row;
33122 extern (C) int function (TreeView* tree_view) toggle_cursor_row;
33123 extern (C) int function (TreeView* tree_view, int logical, int expand, int open_all) expand_collapse_cursor_row;
33124 extern (C) int function (TreeView* tree_view) select_cursor_parent;
33125 extern (C) int function (TreeView* tree_view) start_interactive_search;
33126 extern (C) void function () _gtk_reserved0;
33127 extern (C) void function () _gtk_reserved1;
33128 extern (C) void function () _gtk_reserved2;
33129 extern (C) void function () _gtk_reserved3;
33130 extern (C) void function () _gtk_reserved4;
33133 struct TreeViewColumn /* : Object */ {
33134 alias parent this;
33135 alias parent super_;
33136 alias parent object;
33137 Object parent;
33138 Widget* tree_view, button, child, arrow, alignment;
33139 Gdk2.Window* window;
33140 CellEditable* editable_widget;
33141 float xalign;
33142 uint property_changed_signal;
33143 int spacing;
33144 TreeViewColumnSizing column_type;
33145 int requested_width, button_request, resized_width, width, fixed_width, min_width, max_width, drag_x, drag_y;
33146 char* title;
33147 GLib2.List* cell_list;
33148 uint sort_clicked_signal, sort_column_changed_signal;
33149 int sort_column_id;
33150 SortType sort_order;
33151 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
33152 uint, "visible", 1,
33153 uint, "resizable", 1,
33154 uint, "clickable", 1,
33155 uint, "dirty", 1,
33156 uint, "show_sort_indicator", 1,
33157 uint, "maybe_reordered", 1,
33158 uint, "reorderable", 1,
33159 uint, "use_resized_width", 1,
33160 uint, "expand", 1,
33161 uint, "__dummy32A", 23));
33164 // Creates a new #GtkTreeViewColumn.
33165 // RETURNS: A newly created #GtkTreeViewColumn.
33166 static TreeViewColumn* new_() {
33167 return gtk_tree_view_column_new();
33170 // Unintrospectable constructor: new_with_attributes() / gtk_tree_view_column_new_with_attributes()
33171 // Creates a new #GtkTreeViewColumn with a number of default values. This is
33172 // equivalent to calling gtk_tree_view_column_set_title(),
33173 // gtk_tree_view_column_pack_start(), and
33174 // gtk_tree_view_column_set_attributes() on the newly created #GtkTreeViewColumn.
33175 // Here's a simple example:
33176 // |[
33177 // enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS };
33178 // ...
33179 // {
33180 // GtkTreeViewColumn *column;
33181 // GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
33182 // column = gtk_tree_view_column_new_with_attributes ("Title",
33183 // renderer,
33184 // "text", TEXT_COLUMN,
33185 // "foreground", COLOR_COLUMN,
33186 // NULL);
33187 // }
33188 // ]|
33189 // RETURNS: A newly created #GtkTreeViewColumn.
33190 // <title>: The title to set the header to.
33191 // <cell>: The #GtkCellRenderer.
33192 alias gtk_tree_view_column_new_with_attributes new_with_attributes; // Variadic
33194 // Adds an attribute mapping to the list in @tree_column. The @column is the
33195 // column of the model to get a value from, and the @attribute is the
33196 // parameter on @cell_renderer to be set from the value. So for example
33197 // if column 2 of the model contains strings, you could have the
33198 // "text" attribute of a #GtkCellRendererText get its values from
33199 // column 2.
33200 // <cell_renderer>: the #GtkCellRenderer to set attributes on
33201 // <attribute>: An attribute on the renderer
33202 // <column>: The column position on the model to get the attribute from.
33203 void add_attribute(CellRenderer* cell_renderer, char* attribute, int column) {
33204 gtk_tree_view_column_add_attribute(&this, cell_renderer, attribute, column);
33207 // Obtains the horizontal position and size of a cell in a column. If the
33208 // cell is not found in the column, @start_pos and @width are not changed and
33209 // %FALSE is returned.
33210 // RETURNS: %TRUE if @cell belongs to @tree_column.
33211 // <cell_renderer>: a #GtkCellRenderer
33212 // <start_pos>: return location for the horizontal position of @cell within
33213 // <width>: return location for the width of @cell, may be %NULL
33214 int cell_get_position(CellRenderer* cell_renderer, int* start_pos, int* width) {
33215 return gtk_tree_view_column_cell_get_position(&this, cell_renderer, start_pos, width);
33218 // Obtains the width and height needed to render the column. This is used
33219 // primarily by the #GtkTreeView.
33220 // <cell_area>: The area a cell in the column will be allocated, or %NULL
33221 // <x_offset>: location to return x offset of a cell relative to @cell_area, or %NULL
33222 // <y_offset>: location to return y offset of a cell relative to @cell_area, or %NULL
33223 // <width>: location to return width needed to render a cell, or %NULL
33224 // <height>: location to return height needed to render a cell, or %NULL
33225 void cell_get_size(Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) {
33226 gtk_tree_view_column_cell_get_size(&this, cell_area, x_offset, y_offset, width, height);
33229 // Returns %TRUE if any of the cells packed into the @tree_column are visible.
33230 // For this to be meaningful, you must first initialize the cells with
33231 // gtk_tree_view_column_cell_set_cell_data()
33232 // RETURNS: %TRUE, if any of the cells packed into the @tree_column are currently visible
33233 int cell_is_visible() {
33234 return gtk_tree_view_column_cell_is_visible(&this);
33237 // Sets the cell renderer based on the @tree_model and @iter. That is, for
33238 // every attribute mapping in @tree_column, it will get a value from the set
33239 // column on the @iter, and use that value to set the attribute on the cell
33240 // renderer. This is used primarily by the #GtkTreeView.
33241 // <tree_model>: The #GtkTreeModel to to get the cell renderers attributes from.
33242 // <iter>: The #GtkTreeIter to to get the cell renderer's attributes from.
33243 // <is_expander>: %TRUE, if the row has children
33244 // <is_expanded>: %TRUE, if the row has visible children
33245 void cell_set_cell_data(TreeModel* tree_model, TreeIter* iter, int is_expander, int is_expanded) {
33246 gtk_tree_view_column_cell_set_cell_data(&this, tree_model, iter, is_expander, is_expanded);
33248 // Unsets all the mappings on all renderers on the @tree_column.
33249 void clear() {
33250 gtk_tree_view_column_clear(&this);
33253 // Clears all existing attributes previously set with
33254 // gtk_tree_view_column_set_attributes().
33255 // <cell_renderer>: a #GtkCellRenderer to clear the attribute mapping on.
33256 void clear_attributes(CellRenderer* cell_renderer) {
33257 gtk_tree_view_column_clear_attributes(&this, cell_renderer);
33259 // Emits the "clicked" signal on the column. This function will only work if
33260 void clicked() {
33261 gtk_tree_view_column_clicked(&this);
33264 // Sets the current keyboard focus to be at @cell, if the column contains
33265 // 2 or more editable and activatable cells.
33266 // <cell>: A #GtkCellRenderer
33267 void focus_cell(CellRenderer* cell) {
33268 gtk_tree_view_column_focus_cell(&this, cell);
33271 // Returns the current x alignment of @tree_column. This value can range
33272 // between 0.0 and 1.0.
33273 // RETURNS: The current alignent of @tree_column.
33274 float get_alignment() {
33275 return gtk_tree_view_column_get_alignment(&this);
33278 // Unintrospectable method: get_cell_renderers() / gtk_tree_view_column_get_cell_renderers()
33279 // Returns a newly-allocated #GList of all the cell renderers in the column,
33280 // in no particular order. The list must be freed with g_list_free().
33281 // RETURNS: A list of #GtkCellRenderers
33282 GLib2.List* get_cell_renderers() {
33283 return gtk_tree_view_column_get_cell_renderers(&this);
33286 // Returns %TRUE if the user can click on the header for the column.
33287 // RETURNS: %TRUE if user can click the column header.
33288 int get_clickable() {
33289 return gtk_tree_view_column_get_clickable(&this);
33292 // Return %TRUE if the column expands to take any available space.
33293 // RETURNS: %TRUE, if the column expands
33294 int get_expand() {
33295 return gtk_tree_view_column_get_expand(&this);
33298 // Gets the fixed width of the column. This value is only meaning may not be
33299 // the actual width of the column on the screen, just what is requested.
33300 // RETURNS: the fixed width of the column
33301 int get_fixed_width() {
33302 return gtk_tree_view_column_get_fixed_width(&this);
33305 // Returns the maximum width in pixels of the @tree_column, or -1 if no maximum
33306 // width is set.
33307 // RETURNS: The maximum width of the @tree_column.
33308 int get_max_width() {
33309 return gtk_tree_view_column_get_max_width(&this);
33312 // Returns the minimum width in pixels of the @tree_column, or -1 if no minimum
33313 // width is set.
33314 // RETURNS: The minimum width of the @tree_column.
33315 int get_min_width() {
33316 return gtk_tree_view_column_get_min_width(&this);
33319 // Returns %TRUE if the @tree_column can be reordered by the user.
33320 // RETURNS: %TRUE if the @tree_column can be reordered by the user.
33321 int get_reorderable() {
33322 return gtk_tree_view_column_get_reorderable(&this);
33325 // Returns %TRUE if the @tree_column can be resized by the end user.
33326 // RETURNS: %TRUE, if the @tree_column can be resized.
33327 int get_resizable() {
33328 return gtk_tree_view_column_get_resizable(&this);
33331 // Returns the current type of @tree_column.
33332 // RETURNS: The type of @tree_column.
33333 TreeViewColumnSizing get_sizing() {
33334 return gtk_tree_view_column_get_sizing(&this);
33337 // Gets the logical @sort_column_id that the model sorts on when this
33338 // column is selected for sorting.
33339 // See gtk_tree_view_column_set_sort_column_id().
33340 // this column can't be used for sorting.
33341 // RETURNS: the current @sort_column_id for this column, or -1 if
33342 int get_sort_column_id() {
33343 return gtk_tree_view_column_get_sort_column_id(&this);
33346 // Gets the value set by gtk_tree_view_column_set_sort_indicator().
33347 // RETURNS: whether the sort indicator arrow is displayed
33348 int get_sort_indicator() {
33349 return gtk_tree_view_column_get_sort_indicator(&this);
33352 // Gets the value set by gtk_tree_view_column_set_sort_order().
33353 // RETURNS: the sort order the sort indicator is indicating
33354 SortType get_sort_order() {
33355 return gtk_tree_view_column_get_sort_order(&this);
33358 // Returns the spacing of @tree_column.
33359 // RETURNS: the spacing of @tree_column.
33360 int get_spacing() {
33361 return gtk_tree_view_column_get_spacing(&this);
33364 // Returns the title of the widget.
33365 // modified or freed.
33366 // RETURNS: the title of the column. This string should not be
33367 char* get_title() {
33368 return gtk_tree_view_column_get_title(&this);
33371 // Returns the #GtkTreeView wherein @tree_column has been inserted.
33372 // If @column is currently not inserted in any tree view, %NULL is
33373 // returned.
33374 // been inserted if any, %NULL otherwise.
33375 // RETURNS: The tree view wherein @column has
33376 Widget* get_tree_view() {
33377 return gtk_tree_view_column_get_tree_view(&this);
33380 // Returns %TRUE if @tree_column is visible.
33381 // the tree will show the column.
33382 // RETURNS: whether the column is visible or not. If it is visible, then
33383 int get_visible() {
33384 return gtk_tree_view_column_get_visible(&this);
33387 // Returns the #GtkWidget in the button on the column header.
33388 // If a custom widget has not been set then %NULL is returned.
33389 // header, or %NULL
33390 // RETURNS: The #GtkWidget in the column
33391 Widget* get_widget() {
33392 return gtk_tree_view_column_get_widget(&this);
33395 // Returns the current size of @tree_column in pixels.
33396 // RETURNS: The current width of @tree_column.
33397 int get_width() {
33398 return gtk_tree_view_column_get_width(&this);
33401 // Adds the @cell to end of the column. If @expand is %FALSE, then the @cell
33402 // is allocated no more space than it needs. Any unused space is divided
33403 // evenly between cells for which @expand is %TRUE.
33404 // <cell>: The #GtkCellRenderer.
33405 // <expand>: %TRUE if @cell is to be given extra space allocated to @tree_column.
33406 void pack_end(CellRenderer* cell, int expand) {
33407 gtk_tree_view_column_pack_end(&this, cell, expand);
33410 // Packs the @cell into the beginning of the column. If @expand is %FALSE, then
33411 // the @cell is allocated no more space than it needs. Any unused space is divided
33412 // evenly between cells for which @expand is %TRUE.
33413 // <cell>: The #GtkCellRenderer.
33414 // <expand>: %TRUE if @cell is to be given extra space allocated to @tree_column.
33415 void pack_start(CellRenderer* cell, int expand) {
33416 gtk_tree_view_column_pack_start(&this, cell, expand);
33419 // Flags the column, and the cell renderers added to this column, to have
33420 // their sizes renegotiated.
33421 void queue_resize() {
33422 gtk_tree_view_column_queue_resize(&this);
33425 // Sets the alignment of the title or custom widget inside the column header.
33426 // The alignment determines its location inside the button -- 0.0 for left, 0.5
33427 // for center, 1.0 for right.
33428 // <xalign>: The alignment, which is between [0.0 and 1.0] inclusive.
33429 void set_alignment(float xalign) {
33430 gtk_tree_view_column_set_alignment(&this, xalign);
33433 // Unintrospectable method: set_attributes() / gtk_tree_view_column_set_attributes()
33434 // Sets the attributes in the list as the attributes of @tree_column.
33435 // The attributes should be in attribute/column order, as in
33436 // gtk_tree_view_column_add_attribute(). All existing attributes
33437 // are removed, and replaced with the new attributes.
33438 // <cell_renderer>: the #GtkCellRenderer we're setting the attributes of
33439 /+ Not available -- variadic methods unsupported - use the C function directly.
33440 alias gtk_tree_view_column_set_attributes set_attributes; // Variadic
33443 // Sets the #GtkTreeViewColumnFunc to use for the column. This
33444 // function is used instead of the standard attributes mapping for
33445 // setting the column value, and should set the value of @tree_column's
33446 // cell renderer as appropriate. @func may be %NULL to remove an
33447 // older one.
33448 // <cell_renderer>: A #GtkCellRenderer
33449 // <func>: The #GtkTreeViewColumnFunc to use.
33450 // <func_data>: The user data for @func.
33451 // <destroy>: The destroy notification for @func_data
33452 void set_cell_data_func(CellRenderer* cell_renderer, TreeCellDataFunc func, void* func_data, GLib2.DestroyNotify destroy) {
33453 gtk_tree_view_column_set_cell_data_func(&this, cell_renderer, func, func_data, destroy);
33456 // Sets the header to be active if @active is %TRUE. When the header is active,
33457 // then it can take keyboard focus, and can be clicked.
33458 // <clickable>: %TRUE if the header is active.
33459 void set_clickable(int clickable) {
33460 gtk_tree_view_column_set_clickable(&this, clickable);
33463 // Sets the column to take available extra space. This space is shared equally
33464 // amongst all columns that have the expand set to %TRUE. If no column has this
33465 // option set, then the last column gets all extra space. By default, every
33466 // column is created with this %FALSE.
33467 // <expand>: %TRUE if the column should take available extra space, %FALSE if not
33468 void set_expand(int expand) {
33469 gtk_tree_view_column_set_expand(&this, expand);
33472 // Sets the size of the column in pixels. This is meaningful only if the sizing
33473 // type is #GTK_TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
33474 // the min/max width for the column. Please note that the min/max width of the
33475 // column doesn't actually affect the "fixed_width" property of the widget, just
33476 // the actual size when displayed.
33477 // <fixed_width>: The size to set @tree_column to. Must be greater than 0.
33478 void set_fixed_width(int fixed_width) {
33479 gtk_tree_view_column_set_fixed_width(&this, fixed_width);
33482 // Sets the maximum width of the @tree_column. If @max_width is -1, then the
33483 // maximum width is unset. Note, the column can actually be wider than max
33484 // width if it's the last column in a view. In this case, the column expands to
33485 // fill any extra space.
33486 // <max_width>: The maximum width of the column in pixels, or -1.
33487 void set_max_width(int max_width) {
33488 gtk_tree_view_column_set_max_width(&this, max_width);
33491 // Sets the minimum width of the @tree_column. If @min_width is -1, then the
33492 // minimum width is unset.
33493 // <min_width>: The minimum width of the column in pixels, or -1.
33494 void set_min_width(int min_width) {
33495 gtk_tree_view_column_set_min_width(&this, min_width);
33498 // If @reorderable is %TRUE, then the column can be reordered by the end user
33499 // dragging the header.
33500 // <reorderable>: %TRUE, if the column can be reordered.
33501 void set_reorderable(int reorderable) {
33502 gtk_tree_view_column_set_reorderable(&this, reorderable);
33505 // If @resizable is %TRUE, then the user can explicitly resize the column by
33506 // grabbing the outer edge of the column button. If resizable is %TRUE and
33507 // sizing mode of the column is #GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
33508 // mode is changed to #GTK_TREE_VIEW_COLUMN_GROW_ONLY.
33509 // <resizable>: %TRUE, if the column can be resized
33510 void set_resizable(int resizable) {
33511 gtk_tree_view_column_set_resizable(&this, resizable);
33514 // Sets the growth behavior of @tree_column to @type.
33515 // <type>: The #GtkTreeViewColumnSizing.
33516 void set_sizing(TreeViewColumnSizing type) {
33517 gtk_tree_view_column_set_sizing(&this, type);
33520 // Sets the logical @sort_column_id that this column sorts on when this column
33521 // is selected for sorting. Doing so makes the column header clickable.
33522 // <sort_column_id>: The @sort_column_id of the model to sort on.
33523 void set_sort_column_id(int sort_column_id) {
33524 gtk_tree_view_column_set_sort_column_id(&this, sort_column_id);
33527 // Call this function with a @setting of %TRUE to display an arrow in
33528 // the header button indicating the column is sorted. Call
33529 // gtk_tree_view_column_set_sort_order() to change the direction of
33530 // the arrow.
33531 // <setting>: %TRUE to display an indicator that the column is sorted
33532 void set_sort_indicator(int setting) {
33533 gtk_tree_view_column_set_sort_indicator(&this, setting);
33536 // Changes the appearance of the sort indicator.
33537 // This <emphasis>does not</emphasis> actually sort the model. Use
33538 // gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
33539 // support. This function is primarily for custom sorting behavior, and should
33540 // be used in conjunction with gtk_tree_sortable_set_sort_column() to do
33541 // that. For custom models, the mechanism will vary.
33542 // The sort indicator changes direction to indicate normal sort or reverse sort.
33543 // Note that you must have the sort indicator enabled to see anything when
33544 // calling this function; see gtk_tree_view_column_set_sort_indicator().
33545 // <order>: sort order that the sort indicator should indicate
33546 void set_sort_order(SortType order) {
33547 gtk_tree_view_column_set_sort_order(&this, order);
33550 // Sets the spacing field of @tree_column, which is the number of pixels to
33551 // place between cell renderers packed into it.
33552 // <spacing>: distance between cell renderers in pixels.
33553 void set_spacing(int spacing) {
33554 gtk_tree_view_column_set_spacing(&this, spacing);
33557 // Sets the title of the @tree_column. If a custom widget has been set, then
33558 // this value is ignored.
33559 // <title>: The title of the @tree_column.
33560 void set_title(char* title) {
33561 gtk_tree_view_column_set_title(&this, title);
33564 // Sets the visibility of @tree_column.
33565 // <visible>: %TRUE if the @tree_column is visible.
33566 void set_visible(int visible) {
33567 gtk_tree_view_column_set_visible(&this, visible);
33570 // Sets the widget in the header to be @widget. If widget is %NULL, then the
33571 // header button is set with a #GtkLabel set to the title of @tree_column.
33572 // <widget>: A child #GtkWidget, or %NULL.
33573 void set_widget(Widget* widget=null) {
33574 gtk_tree_view_column_set_widget(&this, widget);
33576 extern (C) alias static void function (TreeViewColumn* this_, void* user_data=null) signal_clicked;
33578 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33579 return super_.signal_connect!name(cb, data, cf);
33582 ulong signal_connect(string name:"clicked", CB/*:signal_clicked*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33583 return signal_connect_data(&this, cast(char*)"clicked",
33584 cast(GObject2.Callback)cb, data, null, cf);
33588 struct TreeViewColumnClass {
33589 ObjectClass parent_class;
33590 extern (C) void function (TreeViewColumn* tree_column) clicked;
33591 extern (C) void function () _gtk_reserved1;
33592 extern (C) void function () _gtk_reserved2;
33593 extern (C) void function () _gtk_reserved3;
33594 extern (C) void function () _gtk_reserved4;
33597 extern (C) alias int function (TreeView* tree_view, TreeViewColumn* column, TreeViewColumn* prev_column, TreeViewColumn* next_column, void* data) TreeViewColumnDropFunc;
33599 enum TreeViewColumnSizing {
33600 GROW_ONLY = 0,
33601 AUTOSIZE = 1,
33602 FIXED = 2
33604 enum TreeViewDropPosition {
33605 BEFORE = 0,
33606 AFTER = 1,
33607 INTO_OR_BEFORE = 2,
33608 INTO_OR_AFTER = 3
33610 enum TreeViewGridLines {
33611 NONE = 0,
33612 HORIZONTAL = 1,
33613 VERTICAL = 2,
33614 BOTH = 3
33616 extern (C) alias void function (TreeView* tree_view, TreePath* path, void* user_data) TreeViewMappingFunc;
33618 enum TreeViewMode {
33619 LINE = 0,
33620 ITEM = 1
33622 struct TreeViewPrivate {
33625 extern (C) alias int function (TreeModel* model, TreeIter* iter, void* data) TreeViewRowSeparatorFunc;
33627 extern (C) alias int function (TreeModel* model, int column, char* key, TreeIter* iter, void* search_data) TreeViewSearchEqualFunc;
33629 extern (C) alias void function (TreeView* tree_view, Widget* search_dialog, void* user_data) TreeViewSearchPositionFunc;
33631 struct TypeInfo {
33632 char* type_name;
33633 uint object_size, class_size;
33634 ClassInitFunc class_init_func;
33635 ObjectInitFunc object_init_func;
33636 void* reserved_1, reserved_2;
33637 ClassInitFunc base_class_init_func;
33640 struct UIManager /* : GObject.Object */ {
33641 alias parent this;
33642 alias parent super_;
33643 alias parent object;
33644 GObject2.Object parent;
33645 private UIManagerPrivate* private_data;
33648 // Creates a new ui manager object.
33649 // RETURNS: a new ui manager object.
33650 static UIManager* /*new*/ new_() {
33651 return gtk_ui_manager_new();
33654 // Adds a UI element to the current contents of @self.
33655 // If @type is %GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
33656 // separator if such an element can be inserted at the place determined by
33657 // the place determined by @path.
33658 // If @path points to a menuitem or toolitem, the new element will be inserted
33659 // before or after this item, depending on @top.
33660 // <merge_id>: the merge id for the merged UI, see gtk_ui_manager_new_merge_id()
33661 // <path>: a path
33662 // <name>: the name for the added UI element
33663 // <action>: the name of the action to be proxied, or %NULL to add a separator
33664 // <type>: the type of UI element to add.
33665 // <top>: if %TRUE, the UI element is added before its siblings, otherwise it is added after its siblings.
33666 void add_ui(uint merge_id, char* path, char* name, char* action, UIManagerItemType type, int top) {
33667 gtk_ui_manager_add_ui(&this, merge_id, path, name, action, type, top);
33670 // Parses a file containing a <link linkend="XML-UI">UI definition</link> and
33671 // merges it with the current contents of @self.
33672 // to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
33673 // the return value is 0.
33674 // RETURNS: The merge id for the merged UI. The merge id can be used
33675 // <filename>: the name of the file to parse
33676 uint add_ui_from_file(char* filename, GLib2.Error** error=null) {
33677 return gtk_ui_manager_add_ui_from_file(&this, filename, error);
33680 // Parses a string containing a <link linkend="XML-UI">UI definition</link> and
33681 // merges it with the current contents of @self. An enclosing &lt;ui&gt;
33682 // element is added if it is missing.
33683 // to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
33684 // the return value is 0.
33685 // RETURNS: The merge id for the merged UI. The merge id can be used
33686 // <buffer>: the string to parse
33687 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
33688 uint add_ui_from_string(char* buffer, ssize_t length, GLib2.Error** error=null) {
33689 return gtk_ui_manager_add_ui_from_string(&this, buffer, length, error);
33692 // Makes sure that all pending updates to the UI have been completed.
33693 // This may occasionally be necessary, since #GtkUIManager updates the
33694 // UI in an idle function. A typical example where this function is
33695 // useful is to enforce that the menubar and toolbar have been added to
33696 // the main window before showing it:
33697 // |[
33698 // gtk_container_add (GTK_CONTAINER (window), vbox);
33699 // g_signal_connect (merge, "add-widget",
33700 // G_CALLBACK (add_widget), vbox);
33701 // gtk_ui_manager_add_ui_from_file (merge, "my-menus");
33702 // gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
33703 // gtk_ui_manager_ensure_update (merge);
33704 // gtk_widget_show (window);
33705 // ]|
33706 void ensure_update() {
33707 gtk_ui_manager_ensure_update(&this);
33710 // Returns the #GtkAccelGroup associated with @self.
33711 // RETURNS: the #GtkAccelGroup.
33712 AccelGroup* get_accel_group() {
33713 return gtk_ui_manager_get_accel_group(&this);
33716 // Looks up an action by following a path. See gtk_ui_manager_get_widget()
33717 // for more information about paths.
33718 // or %NULL if no widget was found.
33719 // RETURNS: the action whose proxy widget is found by following the path,
33720 // <path>: a path
33721 Action* get_action(char* path) {
33722 return gtk_ui_manager_get_action(&this, path);
33725 // Returns the list of action groups associated with @self.
33726 // action groups. The list is owned by GTK+
33727 // and should not be modified.
33728 // RETURNS: a #GList of
33729 GLib2.List* get_action_groups() {
33730 return gtk_ui_manager_get_action_groups(&this);
33733 // Returns whether menus generated by this #GtkUIManager
33734 // will have tearoff menu items.
33735 // RETURNS: whether tearoff menu items are added
33736 int get_add_tearoffs() {
33737 return gtk_ui_manager_get_add_tearoffs(&this);
33740 // Obtains a list of all toplevel widgets of the requested types.
33741 // all toplevel widgets of the requested types. Free the returned list with g_slist_free().
33742 // RETURNS: a newly-allocated #GSList of
33743 // <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.
33744 GLib2.SList* /*new container*/ get_toplevels(UIManagerItemType types) {
33745 return gtk_ui_manager_get_toplevels(&this, types);
33748 // Creates a <link linkend="XML-UI">UI definition</link> of the merged UI.
33749 // the merged UI.
33750 // RETURNS: A newly allocated string containing an XML representation of
33751 char* /*new*/ get_ui() {
33752 return gtk_ui_manager_get_ui(&this);
33755 // Looks up a widget by following a path.
33756 // The path consists of the names specified in the XML description of the UI.
33757 // separated by '/'. Elements which don't have a name or action attribute in
33758 // the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name
33759 // (e.g. "popup"). The root element ("/ui") can be omitted in the path.
33760 // Note that the widget found by following a path that ends in a &lt;menu&gt;
33761 // element is the menuitem to which the menu is attached, not the menu itself.
33762 // Also note that the widgets constructed by a ui manager are not tied to
33763 // the lifecycle of the ui manager. If you add the widgets returned by this
33764 // function to some container or explicitly ref them, they will survive the
33765 // destruction of the ui manager.
33766 // was found.
33767 // RETURNS: the widget found by following the path, or %NULL if no widget
33768 // <path>: a path
33769 Widget* get_widget(char* path) {
33770 return gtk_ui_manager_get_widget(&this, path);
33773 // Inserts an action group into the list of action groups associated
33774 // with @self. Actions in earlier groups hide actions with the same
33775 // name in later groups.
33776 // <action_group>: the action group to be inserted
33777 // <pos>: the position at which the group will be inserted.
33778 void insert_action_group(ActionGroup* action_group, int pos) {
33779 gtk_ui_manager_insert_action_group(&this, action_group, pos);
33782 // Returns an unused merge id, suitable for use with
33783 // gtk_ui_manager_add_ui().
33784 // RETURNS: an unused merge id.
33785 uint new_merge_id() {
33786 return gtk_ui_manager_new_merge_id(&this);
33789 // Removes an action group from the list of action groups associated
33790 // with @self.
33791 // <action_group>: the action group to be removed
33792 void remove_action_group(ActionGroup* action_group) {
33793 gtk_ui_manager_remove_action_group(&this, action_group);
33796 // Unmerges the part of @self<!-- -->s content identified by @merge_id.
33797 // <merge_id>: a merge id as returned by gtk_ui_manager_add_ui_from_string()
33798 void remove_ui(uint merge_id) {
33799 gtk_ui_manager_remove_ui(&this, merge_id);
33802 // Sets the "add_tearoffs" property, which controls whether menus
33803 // generated by this #GtkUIManager will have tearoff menu items.
33804 // Note that this only affects regular menus. Generated popup
33805 // menus never have tearoff menu items.
33806 // <add_tearoffs>: whether tearoff menu items are added
33807 void set_add_tearoffs(int add_tearoffs) {
33808 gtk_ui_manager_set_add_tearoffs(&this, add_tearoffs);
33811 // The "actions-changed" signal is emitted whenever the set of actions
33812 // changes.
33813 extern (C) alias static void function (UIManager* this_, void* user_data=null) signal_actions_changed;
33815 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33816 return super_.signal_connect!name(cb, data, cf);
33819 ulong signal_connect(string name:"actions-changed", CB/*:signal_actions_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33820 return signal_connect_data(&this, cast(char*)"actions-changed",
33821 cast(GObject2.Callback)cb, data, null, cf);
33824 // The add_widget signal is emitted for each generated menubar and toolbar.
33825 // It is not emitted for generated popup menus, which can be obtained by
33826 // gtk_ui_manager_get_widget().
33827 // <widget>: the added widget
33828 extern (C) alias static void function (UIManager* this_, Widget* widget, void* user_data=null) signal_add_widget;
33829 ulong signal_connect(string name:"add-widget", CB/*:signal_add_widget*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33830 return signal_connect_data(&this, cast(char*)"add-widget",
33831 cast(GObject2.Callback)cb, data, null, cf);
33834 // The connect_proxy signal is emitted after connecting a proxy to
33835 // an action in the group.
33836 // This is intended for simple customizations for which a custom action
33837 // class would be too clumsy, e.g. showing tooltips for menuitems in the
33838 // statusbar.
33839 // <action>: the action
33840 // <proxy>: the proxy
33841 extern (C) alias static void function (UIManager* this_, Action* action, Widget* proxy, void* user_data=null) signal_connect_proxy;
33842 ulong signal_connect(string name:"connect-proxy", CB/*:signal_connect_proxy*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33843 return signal_connect_data(&this, cast(char*)"connect-proxy",
33844 cast(GObject2.Callback)cb, data, null, cf);
33847 // The disconnect_proxy signal is emitted after disconnecting a proxy
33848 // from an action in the group.
33849 // <action>: the action
33850 // <proxy>: the proxy
33851 extern (C) alias static void function (UIManager* this_, Action* action, Widget* proxy, void* user_data=null) signal_disconnect_proxy;
33852 ulong signal_connect(string name:"disconnect-proxy", CB/*:signal_disconnect_proxy*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33853 return signal_connect_data(&this, cast(char*)"disconnect-proxy",
33854 cast(GObject2.Callback)cb, data, null, cf);
33857 // The post_activate signal is emitted just after the @action
33858 // is activated.
33859 // This is intended for applications to get notification
33860 // just after any action is activated.
33861 // <action>: the action
33862 extern (C) alias static void function (UIManager* this_, Action* action, void* user_data=null) signal_post_activate;
33863 ulong signal_connect(string name:"post-activate", CB/*:signal_post_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33864 return signal_connect_data(&this, cast(char*)"post-activate",
33865 cast(GObject2.Callback)cb, data, null, cf);
33868 // The pre_activate signal is emitted just before the @action
33869 // is activated.
33870 // This is intended for applications to get notification
33871 // just before any action is activated.
33872 // <action>: the action
33873 extern (C) alias static void function (UIManager* this_, Action* action, void* user_data=null) signal_pre_activate;
33874 ulong signal_connect(string name:"pre-activate", CB/*:signal_pre_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33875 return signal_connect_data(&this, cast(char*)"pre-activate",
33876 cast(GObject2.Callback)cb, data, null, cf);
33880 struct UIManagerClass {
33881 GObject2.ObjectClass parent_class;
33882 extern (C) void function (UIManager* merge, Widget* widget) add_widget;
33883 extern (C) void function (UIManager* merge) actions_changed;
33884 extern (C) void function (UIManager* merge, Action* action, Widget* proxy) connect_proxy;
33885 extern (C) void function (UIManager* merge, Action* action, Widget* proxy) disconnect_proxy;
33886 extern (C) void function (UIManager* merge, Action* action) pre_activate;
33887 extern (C) void function (UIManager* merge, Action* action) post_activate;
33889 // RETURNS: the widget found by following the path, or %NULL if no widget
33890 // <path>: a path
33891 extern (C) Widget* function (UIManager* manager, char* path) get_widget;
33893 // RETURNS: the action whose proxy widget is found by following the path,
33894 // <path>: a path
33895 extern (C) Action* function (UIManager* manager, char* path) get_action;
33896 extern (C) void function () _gtk_reserved1;
33897 extern (C) void function () _gtk_reserved2;
33900 enum UIManagerItemType {
33901 AUTO = 0,
33902 MENUBAR = 1,
33903 MENU = 2,
33904 TOOLBAR = 4,
33905 PLACEHOLDER = 8,
33906 POPUP = 16,
33907 MENUITEM = 32,
33908 TOOLITEM = 64,
33909 SEPARATOR = 128,
33910 ACCELERATOR = 256,
33911 POPUP_WITH_ACCELS = 512
33913 struct UIManagerPrivate {
33916 enum Unit {
33917 PIXEL = 0,
33918 POINTS = 1,
33919 INCH = 2,
33920 MM = 3
33922 enum UpdateType {
33923 CONTINUOUS = 0,
33924 DISCONTINUOUS = 1,
33925 DELAYED = 2
33928 // A #GtkVBox is a container that organizes child widgets into a single column.
33929 // Use the #GtkBox packing interface to determine the arrangement,
33930 // spacing, height, and alignment of #GtkVBox children.
33931 // All children are allocated the same width.
33932 struct VBox /* : Box */ {
33933 alias box this;
33934 alias box super_;
33935 Box box;
33938 // Creates a new #GtkVBox.
33939 // RETURNS: a new #GtkVBox.
33940 // <homogeneous>: %TRUE if all children are to be given equal space allotments.
33941 // <spacing>: the number of pixels to place by default between children.
33942 static VBox* new_(int homogeneous, int spacing) {
33943 return gtk_vbox_new(homogeneous, spacing);
33947 struct VBoxClass {
33948 BoxClass parent_class;
33951 struct VButtonBox /* : ButtonBox */ {
33952 alias button_box this;
33953 alias button_box super_;
33954 alias button_box buttonbox;
33955 ButtonBox button_box;
33958 // Creates a new vertical button box.
33959 // RETURNS: a new button box #GtkWidget.
33960 static VButtonBox* new_() {
33961 return gtk_vbutton_box_new();
33964 // Retrieves the current layout used to arrange buttons in button box widgets.
33965 // RETURNS: the current #GtkButtonBoxStyle.
33966 static ButtonBoxStyle get_layout_default() {
33967 return gtk_vbutton_box_get_layout_default();
33970 // Retrieves the current default spacing for vertical button boxes. This is the number of pixels
33971 // to be placed between the buttons when they are arranged.
33972 // RETURNS: the default number of pixels between buttons.
33973 static int get_spacing_default() {
33974 return gtk_vbutton_box_get_spacing_default();
33977 // Sets a new layout mode that will be used by all button boxes.
33978 // <layout>: a new #GtkButtonBoxStyle.
33979 static void set_layout_default(ButtonBoxStyle layout) {
33980 gtk_vbutton_box_set_layout_default(layout);
33983 // Changes the default spacing that is placed between widgets in an
33984 // vertical button box.
33985 // <spacing>: an integer value.
33986 static void set_spacing_default(int spacing) {
33987 gtk_vbutton_box_set_spacing_default(spacing);
33991 struct VButtonBoxClass {
33992 ButtonBoxClass parent_class;
33996 // The VPaned widget is a container widget with two
33997 // children arranged vertically. The division between
33998 // the two panes is adjustable by the user by dragging
33999 // a handle. See #GtkPaned for details.
34000 struct VPaned /* : Paned */ {
34001 alias paned this;
34002 alias paned super_;
34003 Paned paned;
34006 // Create a new #GtkVPaned
34007 // RETURNS: the new #GtkVPaned
34008 static VPaned* new_() {
34009 return gtk_vpaned_new();
34013 struct VPanedClass {
34014 PanedClass parent_class;
34018 // <note>
34019 // This widget is considered too specialized/little-used for
34020 // GTK+, and will be removed in GTK 3. If your application needs this widget,
34021 // feel free to use it, as the widget is useful in some applications; it's just
34022 // not of general interest. However, we are not accepting new features for the
34023 // widget, and it will move out of the GTK+ distribution.
34024 // </note>
34025 // The VRuler widget is a widget arranged vertically creating a ruler that is
34026 // utilized around other widgets such as a text widget. The ruler is used to show
34027 // the location of the mouse on the window and to show the size of the window in
34028 // specified units. The available units of measurement are GTK_PIXELS, GTK_INCHES
34029 // and GTK_CENTIMETERS. GTK_PIXELS is the default unit of measurement.
34030 struct VRuler /* : Ruler */ {
34031 alias ruler this;
34032 alias ruler super_;
34033 Ruler ruler;
34036 // Creates a new vertical ruler
34037 // unmaintained and too specialized. There is no replacement.
34038 // RETURNS: a new #GtkVRuler.
34039 static VRuler* new_() {
34040 return gtk_vruler_new();
34044 struct VRulerClass {
34045 RulerClass parent_class;
34049 // The #GtkVScale widget is used to allow the user to select a value using
34050 // a vertical slider. To create one, use gtk_hscale_new_with_range().
34051 // The position to show the current value, and the number of decimal places
34052 // shown can be set using the parent #GtkScale class's functions.
34053 struct VScale /* : Scale */ {
34054 alias scale this;
34055 alias scale super_;
34056 Scale scale;
34059 // Creates a new #GtkVScale.
34060 // RETURNS: a new #GtkVScale.
34061 // <adjustment>: the #GtkAdjustment which sets the range of the scale.
34062 static VScale* new_(Adjustment* adjustment) {
34063 return gtk_vscale_new(adjustment);
34066 // Creates a new vertical scale widget that lets the user input a
34067 // number between @min and @max (including @min and @max) with the
34068 // increment @step. @step must be nonzero; it's the distance the
34069 // slider moves when using the arrow keys to adjust the scale value.
34070 // Note that the way in which the precision is derived works best if @step
34071 // is a power of ten. If the resulting precision is not suitable for your
34072 // needs, use gtk_scale_set_digits() to correct it.
34073 // RETURNS: a new #GtkVScale
34074 // <min>: minimum value
34075 // <max>: maximum value
34076 // <step>: step increment (tick size) used with keyboard shortcuts
34077 static VScale* new_with_range(double min, double max, double step) {
34078 return gtk_vscale_new_with_range(min, max, step);
34082 struct VScaleClass {
34083 ScaleClass parent_class;
34087 // The #GtkVScrollbar widget is a widget arranged vertically creating a
34088 // scrollbar. See #GtkScrollbar for details on
34089 // scrollbars. #GtkAdjustment pointers may be added to handle the
34090 // adjustment of the scrollbar or it may be left %NULL in which case one
34091 // will be created for you. See #GtkScrollbar for a description of what the
34092 // fields in an adjustment represent for a scrollbar.
34093 struct VScrollbar /* : Scrollbar */ {
34094 alias scrollbar this;
34095 alias scrollbar super_;
34096 Scrollbar scrollbar;
34099 // Creates a new vertical scrollbar.
34100 // RETURNS: the new #GtkVScrollbar
34101 // <adjustment>: the #GtkAdjustment to use, or %NULL to create a new adjustment
34102 static VScrollbar* new_(Adjustment* adjustment=null) {
34103 return gtk_vscrollbar_new(adjustment);
34107 struct VScrollbarClass {
34108 ScrollbarClass parent_class;
34112 // The #GtkVSeparator widget is a vertical separator, used to group the
34113 // widgets within a window. It displays a vertical line with a shadow to
34114 // make it appear sunken into the interface.
34115 struct VSeparator /* : Separator */ {
34116 alias separator this;
34117 alias separator super_;
34118 Separator separator;
34121 // Creates a new #GtkVSeparator.
34122 // RETURNS: a new #GtkVSeparator.
34123 static VSeparator* new_() {
34124 return gtk_vseparator_new();
34128 struct VSeparatorClass {
34129 SeparatorClass parent_class;
34133 // The #GtkViewport widget acts as an adaptor class, implementing
34134 // scrollability for child widgets that lack their own scrolling
34135 // capabilities. Use #GtkViewport to scroll child widgets such as
34136 // #GtkTable, #GtkBox, and so on.
34137 // If a widget has native scrolling abilities, such as #GtkTextView,
34138 // #GtkTreeView or #GtkIconview, it can be added to a #GtkScrolledWindow
34139 // with gtk_container_add(). If a widget does not, you must first add the
34140 // widget to a #GtkViewport, then add the viewport to the scrolled window.
34141 // The convenience function gtk_scrolled_window_add_with_viewport() does
34142 // exactly this, so you can ignore the presence of the viewport.
34143 struct Viewport /* : Bin */ {
34144 alias bin this;
34145 alias bin super_;
34146 Bin bin;
34147 ShadowType shadow_type;
34148 Gdk2.Window* view_window, bin_window;
34149 Adjustment* hadjustment, vadjustment;
34152 // Creates a new #GtkViewport with the given adjustments.
34153 // RETURNS: a new #GtkViewport.
34154 // <hadjustment>: horizontal adjustment.
34155 // <vadjustment>: vertical adjustment.
34156 static Viewport* new_(Adjustment* hadjustment, Adjustment* vadjustment) {
34157 return gtk_viewport_new(hadjustment, vadjustment);
34160 // Gets the bin window of the #GtkViewport.
34161 // RETURNS: a #GdkWindow
34162 Gdk2.Window* get_bin_window() {
34163 return gtk_viewport_get_bin_window(&this);
34166 // Returns the horizontal adjustment of the viewport.
34167 // RETURNS: the horizontal adjustment of @viewport.
34168 Adjustment* get_hadjustment() {
34169 return gtk_viewport_get_hadjustment(&this);
34172 // Gets the shadow type of the #GtkViewport. See
34173 // gtk_viewport_set_shadow_type().
34174 // RETURNS: the shadow type
34175 ShadowType get_shadow_type() {
34176 return gtk_viewport_get_shadow_type(&this);
34179 // Returns the vertical adjustment of the viewport.
34180 // RETURNS: the vertical adjustment of @viewport.
34181 Adjustment* get_vadjustment() {
34182 return gtk_viewport_get_vadjustment(&this);
34185 // Gets the view window of the #GtkViewport.
34186 // RETURNS: a #GdkWindow
34187 Gdk2.Window* get_view_window() {
34188 return gtk_viewport_get_view_window(&this);
34191 // Sets the horizontal adjustment of the viewport.
34192 // <adjustment>: a #GtkAdjustment.
34193 void set_hadjustment(Adjustment* adjustment=null) {
34194 gtk_viewport_set_hadjustment(&this, adjustment);
34197 // Sets the shadow type of the viewport.
34198 // <type>: the new shadow type.
34199 void set_shadow_type(ShadowType type) {
34200 gtk_viewport_set_shadow_type(&this, type);
34203 // Sets the vertical adjustment of the viewport.
34204 // <adjustment>: a #GtkAdjustment.
34205 void set_vadjustment(Adjustment* adjustment=null) {
34206 gtk_viewport_set_vadjustment(&this, adjustment);
34209 // Set the scroll adjustments for the viewport. Usually scrolled containers
34210 // like #GtkScrolledWindow will emit this signal to connect two instances
34211 // of #GtkScrollbar to the scroll directions of the #GtkViewport.
34212 extern (C) alias static void function (Viewport* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
34214 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34215 return super_.signal_connect!name(cb, data, cf);
34218 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34219 return signal_connect_data(&this, cast(char*)"set-scroll-adjustments",
34220 cast(GObject2.Callback)cb, data, null, cf);
34224 struct ViewportClass {
34225 BinClass parent_class;
34226 extern (C) void function (Viewport* viewport, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
34229 enum Visibility {
34230 NONE = 0,
34231 PARTIAL = 1,
34232 FULL = 2
34235 // #GtkVolumeButton is a subclass of #GtkScaleButton that has
34236 // been tailored for use as a volume control widget with suitable
34237 // icons, tooltips and accessible labels.
34238 struct VolumeButton /* : ScaleButton */ {
34239 alias parent this;
34240 alias parent super_;
34241 alias parent scalebutton;
34242 ScaleButton parent;
34245 // Creates a #GtkVolumeButton, with a range between 0.0 and 1.0, with
34246 // a stepping of 0.02. Volume values can be obtained and modified using
34247 // the functions from #GtkScaleButton.
34248 // RETURNS: a new #GtkVolumeButton
34249 static VolumeButton* new_() {
34250 return gtk_volume_button_new();
34254 struct VolumeButtonClass {
34255 ScaleButtonClass parent_class;
34256 extern (C) void function () _gtk_reserved1;
34257 extern (C) void function () _gtk_reserved2;
34258 extern (C) void function () _gtk_reserved3;
34259 extern (C) void function () _gtk_reserved4;
34263 // GtkWidget is the base class all widgets in GTK+ derive from. It manages the
34264 // widget lifecycle, states and style.
34265 // <refsect2 id="style-properties">
34266 // <para>
34267 // <structname>GtkWidget</structname> introduces <firstterm>style
34268 // properties</firstterm> - these are basically object properties that are stored
34269 // not on the object, but in the style object associated to the widget. Style
34270 // properties are set in <link linkend="gtk-Resource-Files">resource files</link>.
34271 // This mechanism is used for configuring such things as the location of the
34272 // scrollbar arrows through the theme, giving theme authors more control over the
34273 // look of applications without the need to write a theme engine in C.
34274 // </para>
34275 // <para>
34276 // Use gtk_widget_class_install_style_property() to install style properties for
34277 // a widget class, gtk_widget_class_find_style_property() or
34278 // gtk_widget_class_list_style_properties() to get information about existing
34279 // style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or
34280 // gtk_widget_style_get_valist() to obtain the value of a style property.
34281 // </para>
34282 // </refsect2>
34283 // <refsect2 id="GtkWidget-BUILDER-UI">
34284 // <title>GtkWidget as GtkBuildable</title>
34285 // <para>
34286 // The GtkWidget implementation of the GtkBuildable interface supports a
34287 // custom &lt;accelerator&gt; element, which has attributes named key,
34288 // modifiers and signal and allows to specify accelerators.
34289 // </para>
34290 // <example>
34291 // <title>A UI definition fragment specifying an accelerator</title>
34292 // <programlisting><![CDATA[
34293 // <object class="GtkButton">
34294 // <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
34295 // </object>
34296 // ]]></programlisting>
34297 // </example>
34298 // <para>
34299 // In addition to accelerators, <structname>GtkWidget</structname> also support a
34300 // custom &lt;accessible&gt; element, which supports actions and relations.
34301 // Properties on the accessible implementation of an object can be set by accessing the
34302 // internal child "accessible" of a <structname>GtkWidget</structname>.
34303 // </para>
34304 // <example>
34305 // <title>A UI definition fragment specifying an accessible</title>
34306 // <programlisting><![CDATA[
34307 // <object class="GtkButton" id="label1"/>
34308 // <property name="label">I am a Label for a Button</property>
34309 // </object>
34310 // <object class="GtkButton" id="button1">
34311 // <accessibility>
34312 // <action action_name="click" translatable="yes">Click the button.</action>
34313 // <relation target="label1" type="labelled-by"/>
34314 // </accessibility>
34315 // <child internal-child="accessible">
34316 // <object class="AtkObject" id="a11y-button1">
34317 // <property name="AtkObject::name">Clickable Button</property>
34318 // </object>
34319 // </child>
34320 // </object>
34321 // ]]></programlisting>
34322 // </example>
34323 // </refsect2>
34324 struct Widget /* : Object */ {
34325 alias object this;
34326 alias object super_;
34327 Object object;
34328 ushort private_flags;
34329 ubyte state, saved_state;
34330 char* name;
34331 Style* style;
34332 Requisition requisition;
34333 Allocation allocation;
34334 Gdk2.Window* window;
34335 Widget* parent;
34338 // Unintrospectable constructor: new() / gtk_widget_new()
34339 // This is a convenience function for creating a widget and setting
34340 // its properties in one go. For example you might write:
34341 // <literal>gtk_widget_new (GTK_TYPE_LABEL, "label", "Hello World", "xalign",
34342 // 0.0, NULL)</literal> to create a left-aligned label. Equivalent to
34343 // g_object_new(), but returns a widget so you don't have to
34344 // cast the object yourself.
34345 // RETURNS: a new #GtkWidget of type @widget_type
34346 // <type>: type ID of the widget to create
34347 // <first_property_name>: name of first property to set
34348 alias gtk_widget_new new_; // Variadic
34350 // Obtains the default colormap used to create widgets.
34351 // RETURNS: default widget colormap
34352 static Gdk2.Colormap* get_default_colormap() {
34353 return gtk_widget_get_default_colormap();
34356 // Obtains the current default reading direction. See
34357 // gtk_widget_set_default_direction().
34358 // RETURNS: the current default direction.
34359 static TextDirection get_default_direction() {
34360 return gtk_widget_get_default_direction();
34363 // Returns the default style used by all widgets initially.
34364 // by GTK+ and should not be modified or freed.
34365 // RETURNS: the default style. This #GtkStyle object is owned
34366 static Style* get_default_style() {
34367 return gtk_widget_get_default_style();
34370 // Obtains the visual of the default colormap. Not really useful;
34371 // used to be useful before gdk_colormap_get_visual() existed.
34372 // RETURNS: visual of the default colormap
34373 static Gdk2.Visual* get_default_visual() {
34374 return gtk_widget_get_default_visual();
34376 // Removes a colormap pushed with gtk_widget_push_colormap().
34377 static void pop_colormap() {
34378 gtk_widget_pop_colormap();
34380 // Cancels the effect of a previous call to gtk_widget_push_composite_child().
34381 static void pop_composite_child() {
34382 gtk_widget_pop_composite_child();
34385 // Pushes @cmap onto a global stack of colormaps; the topmost
34386 // colormap on the stack will be used to create all widgets.
34387 // Remove @cmap with gtk_widget_pop_colormap(). There's little
34388 // reason to use this function.
34389 // <cmap>: a #GdkColormap
34390 static void push_colormap(Gdk2.Colormap* cmap) {
34391 gtk_widget_push_colormap(cmap);
34394 // Makes all newly-created widgets as composite children until
34395 // the corresponding gtk_widget_pop_composite_child() call.
34396 // A composite child is a child that's an implementation detail of the
34397 // container it's inside and should not be visible to people using the
34398 // container. Composite children aren't treated differently by GTK (but
34399 // see gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI
34400 // builders might want to treat them in a different way.
34401 // Here is a simple example:
34402 // |[
34403 // gtk_widget_push_composite_child ();
34404 // scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
34405 // gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
34406 // gtk_widget_pop_composite_child ();
34407 // gtk_widget_set_parent (scrolled_window->hscrollbar,
34408 // GTK_WIDGET (scrolled_window));
34409 // g_object_ref (scrolled_window->hscrollbar);
34410 // ]|
34411 static void push_composite_child() {
34412 gtk_widget_push_composite_child();
34415 // Sets the default colormap to use when creating widgets.
34416 // gtk_widget_push_colormap() is a better function to use if
34417 // you only want to affect a few widgets, rather than all widgets.
34418 // <colormap>: a #GdkColormap
34419 static void set_default_colormap(Gdk2.Colormap* colormap) {
34420 gtk_widget_set_default_colormap(colormap);
34423 // Sets the default reading direction for widgets where the
34424 // direction has not been explicitly set by gtk_widget_set_direction().
34425 // <dir>: the new default direction. This cannot be %GTK_TEXT_DIR_NONE.
34426 static void set_default_direction(TextDirection dir) {
34427 gtk_widget_set_default_direction(dir);
34430 // For widgets that can be "activated" (buttons, menu items, etc.)
34431 // this function activates them. Activation is what happens when you
34432 // press Enter on a widget during key navigation. If @widget isn't
34433 // activatable, the function returns %FALSE.
34434 // RETURNS: %TRUE if the widget was activatable
34435 int activate() {
34436 return gtk_widget_activate(&this);
34439 // Installs an accelerator for this @widget in @accel_group that causes
34440 // The @accel_group needs to be added to the widget's toplevel via
34441 // gtk_window_add_accel_group(), and the signal must be of type %G_RUN_ACTION.
34442 // Accelerators added through this function are not user changeable during
34443 // runtime. If you want to support accelerators that can be changed by the
34444 // user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or
34445 // gtk_menu_item_set_accel_path() instead.
34446 // <accel_signal>: widget signal to emit on accelerator activation
34447 // <accel_group>: accel group for this widget, added to its toplevel
34448 // <accel_key>: GDK keyval of the accelerator
34449 // <accel_mods>: modifier key combination of the accelerator
34450 // <accel_flags>: flag accelerators, e.g. %GTK_ACCEL_VISIBLE
34451 void add_accelerator(char* accel_signal, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags) {
34452 gtk_widget_add_accelerator(&this, accel_signal, accel_group, accel_key, accel_mods, accel_flags);
34455 // Adds the events in the bitfield @events to the event mask for
34456 // <events>: an event mask, see #GdkEventMask
34457 void add_events(int events) {
34458 gtk_widget_add_events(&this, events);
34461 // Adds a widget to the list of mnemonic labels for
34462 // this widget. (See gtk_widget_list_mnemonic_labels()). Note the
34463 // list of mnemonic labels for the widget is cleared when the
34464 // widget is destroyed, so the caller must make sure to update
34465 // its internal state at this point as well, by using a connection
34466 // to the #GtkWidget::destroy signal or a weak notifier.
34467 // <label>: a #GtkWidget that acts as a mnemonic label for @widget
34468 void add_mnemonic_label(Widget* label) {
34469 gtk_widget_add_mnemonic_label(&this, label);
34472 // Determines whether an accelerator that activates the signal
34473 // identified by @signal_id can currently be activated.
34474 // This is done by emitting the #GtkWidget::can-activate-accel
34475 // signal on @widget; if the signal isn't overridden by a
34476 // handler or in a derived widget, then the default check is
34477 // that the widget must be sensitive, and the widget and all
34478 // its ancestors mapped.
34479 // RETURNS: %TRUE if the accelerator can be activated.
34480 // <signal_id>: the ID of a signal installed on @widget
34481 int can_activate_accel(uint signal_id) {
34482 return gtk_widget_can_activate_accel(&this, signal_id);
34485 // This function is used by custom widget implementations; if you're
34486 // writing an app, you'd use gtk_widget_grab_focus() to move the focus
34487 // to a particular widget, and gtk_container_set_focus_chain() to
34488 // change the focus tab order. So you may want to investigate those
34489 // functions instead.
34490 // gtk_widget_child_focus() is called by containers as the user moves
34491 // around the window using keyboard shortcuts. @direction indicates
34492 // what kind of motion is taking place (up, down, left, right, tab
34493 // forward, tab backward). gtk_widget_child_focus() emits the
34494 // #GtkWidget::focus signal; widgets override the default handler
34495 // for this signal in order to implement appropriate focus behavior.
34496 // The default ::focus handler for a widget should return %TRUE if
34497 // moving in @direction left the focus on a focusable location inside
34498 // that widget, and %FALSE if moving in @direction moved the focus
34499 // outside the widget. If returning %TRUE, widgets normally
34500 // call gtk_widget_grab_focus() to place the focus accordingly;
34501 // if returning %FALSE, they don't modify the current focus location.
34502 // This function replaces gtk_container_focus() from GTK+ 1.2.
34503 // It was necessary to check that the child was visible, sensitive,
34504 // and focusable before calling gtk_container_focus().
34505 // gtk_widget_child_focus() returns %FALSE if the widget is not
34506 // currently in a focusable state, so there's no need for those checks.
34507 // RETURNS: %TRUE if focus ended up inside @widget
34508 // <direction>: direction of focus movement
34509 int child_focus(DirectionType direction) {
34510 return gtk_widget_child_focus(&this, direction);
34513 // Emits a #GtkWidget::child-notify signal for the
34514 // <link linkend="child-properties">child property</link> @child_property
34515 // on @widget.
34516 // This is the analogue of g_object_notify() for child properties.
34517 // <child_property>: the name of a child property installed on the class of @widget<!-- -->'s parent
34518 void child_notify(char* child_property) {
34519 gtk_widget_child_notify(&this, child_property);
34522 // Same as gtk_widget_path(), but always uses the name of a widget's type,
34523 // never uses a custom name set with gtk_widget_set_name().
34524 // <path_length>: location to store the length of the class path, or %NULL
34525 // <path>: location to store the class path as an allocated string, or %NULL
34526 // <path_reversed>: location to store the reverse class path as an allocated string, or %NULL
34527 void class_path(/*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null) {
34528 gtk_widget_class_path(&this, path_length, path, path_reversed);
34531 // Creates a new #PangoContext with the appropriate font map,
34532 // font description, and base direction for drawing text for
34533 // this widget. See also gtk_widget_get_pango_context().
34534 // RETURNS: the new #PangoContext
34535 Pango.Context* /*new*/ create_pango_context() {
34536 return gtk_widget_create_pango_context(&this);
34539 // Creates a new #PangoLayout with the appropriate font map,
34540 // font description, and base direction for drawing text for
34541 // this widget.
34542 // If you keep a #PangoLayout created in this way around, in order to
34543 // notify the layout of changes to the base direction or font of this
34544 // widget, you must call pango_layout_context_changed() in response to
34545 // the #GtkWidget::style-set and #GtkWidget::direction-changed signals
34546 // for the widget.
34547 // RETURNS: the new #PangoLayout
34548 // <text>: text to set on the layout (can be %NULL)
34549 Pango.Layout* /*new*/ create_pango_layout(char* text) {
34550 return gtk_widget_create_pango_layout(&this, text);
34553 // Destroys a widget. Equivalent to gtk_object_destroy(), except that
34554 // you don't have to cast the widget to #GtkObject. When a widget is
34555 // destroyed, it will break any references it holds to other objects.
34556 // If the widget is inside a container, the widget will be removed
34557 // from the container. If the widget is a toplevel (derived from
34558 // #GtkWindow), it will be removed from the list of toplevels, and the
34559 // reference GTK+ holds to it will be removed. Removing a
34560 // widget from its container or the list of toplevels results in the
34561 // widget being finalized, unless you've added additional references
34562 // to the widget with g_object_ref().
34563 // In most cases, only toplevel widgets (windows) require explicit
34564 // destruction, because when you destroy a toplevel its children will
34565 // be destroyed as well.
34566 void destroy() {
34567 gtk_widget_destroy(&this);
34570 // This function sets *@widget_pointer to %NULL if @widget_pointer !=
34571 // %NULL. It's intended to be used as a callback connected to the
34572 // "destroy" signal of a widget. You connect gtk_widget_destroyed()
34573 // as a signal handler, and pass the address of your widget variable
34574 // as user data. Then when the widget is destroyed, the variable will
34575 // be set to %NULL. Useful for example to avoid multiple copies
34576 // of the same dialog.
34577 // <widget_pointer>: address of a variable that contains @widget
34578 void destroyed(/*inout*/ Widget** widget_pointer) {
34579 gtk_widget_destroyed(&this, widget_pointer);
34582 // In GTK+ 1.2, this function would immediately render the
34583 // region @area of a widget, by invoking the virtual draw method of a
34584 // widget. In GTK+ 2.0, the draw method is gone, and instead
34585 // gtk_widget_draw() simply invalidates the specified region of the
34586 // widget, then updates the invalid region of the widget immediately.
34587 // Usually you don't want to update the region immediately for
34588 // performance reasons, so in general gtk_widget_queue_draw_area() is
34589 // a better choice if you want to draw a region of a widget.
34590 // <area>: area to draw
34591 void draw(Gdk2.Rectangle* area) {
34592 gtk_widget_draw(&this, area);
34595 // Ensures that @widget has a style (@widget->style). Not a very useful
34596 // function; most of the time, if you want the style, the widget is
34597 // realized, and realized widgets are guaranteed to have a style
34598 // already.
34599 void ensure_style() {
34600 gtk_widget_ensure_style(&this);
34603 // Notifies the user about an input-related error on this widget.
34604 // If the #GtkSettings:gtk-error-bell setting is %TRUE, it calls
34605 // gdk_window_beep(), otherwise it does nothing.
34606 // Note that the effect of gdk_window_beep() can be configured in many
34607 // ways, depending on the windowing backend and the desktop environment
34608 // or window manager that is used.
34609 void error_bell() {
34610 gtk_widget_error_bell(&this);
34613 // Rarely-used function. This function is used to emit
34614 // the event signals on a widget (those signals should never
34615 // be emitted without using this function to do so).
34616 // If you want to synthesize an event though, don't use this function;
34617 // instead, use gtk_main_do_event() so the event will behave as if
34618 // it were in the event queue. Don't synthesize expose events; instead,
34619 // use gdk_window_invalidate_rect() to invalidate a region of the
34620 // window.
34621 // the event was handled)
34622 // RETURNS: return from the event signal emission (%TRUE if
34623 // <event>: a #GdkEvent
34624 int event(Gdk2.Event* event) {
34625 return gtk_widget_event(&this, event);
34628 // Stops emission of #GtkWidget::child-notify signals on @widget. The
34629 // signals are queued until gtk_widget_thaw_child_notify() is called
34630 // on @widget.
34631 // This is the analogue of g_object_freeze_notify() for child properties.
34632 void freeze_child_notify() {
34633 gtk_widget_freeze_child_notify(&this);
34636 // Returns the accessible object that describes the widget to an
34637 // assistive technology.
34638 // If no accessibility library is loaded (i.e. no ATK implementation library is
34639 // loaded via <envar>GTK_MODULES</envar> or via another application library,
34640 // such as libgnome), then this #AtkObject instance may be a no-op. Likewise,
34641 // if no class-specific #AtkObject implementation is available for the widget
34642 // instance in question, it will inherit an #AtkObject implementation from the
34643 // first ancestor class for which such an implementation is defined.
34644 // The documentation of the <ulink url="http://developer.gnome.org/doc/API/2.0/atk/index.html">ATK</ulink>
34645 // library contains more information about accessible objects and their uses.
34646 // RETURNS: the #AtkObject associated with @widget
34647 Atk.Object* get_accessible() {
34648 return gtk_widget_get_accessible(&this);
34651 // Unintrospectable method: get_action() / gtk_widget_get_action()
34652 // Returns the #GtkAction that @widget is a proxy for.
34653 // See also gtk_action_get_proxies().
34654 // %NULL, if it is not attached to an action.
34655 // RETURNS: the action that a widget is a proxy for, or
34656 Action* get_action() {
34657 return gtk_widget_get_action(&this);
34660 // Retrieves the widget's allocation.
34661 // <allocation>: a pointer to a #GtkAllocation to copy to
34662 void get_allocation(/*out*/ Allocation* allocation) {
34663 gtk_widget_get_allocation(&this, allocation);
34666 // Gets the first ancestor of @widget with type @widget_type. For example,
34667 // <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</literal> gets
34668 // the first #GtkBox that's an ancestor of @widget. No reference will be
34669 // added to the returned widget; it should not be unreferenced. See note
34670 // about checking for a toplevel #GtkWindow in the docs for
34671 // gtk_widget_get_toplevel().
34672 // Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor()
34673 // considers @widget to be an ancestor of itself.
34674 // RETURNS: the ancestor widget, or %NULL if not found
34675 // <widget_type>: ancestor type
34676 Widget* get_ancestor(Type widget_type) {
34677 return gtk_widget_get_ancestor(&this, widget_type);
34680 // Determines whether the application intends to draw on the widget in
34681 // an #GtkWidget::expose-event handler.
34682 // See gtk_widget_set_app_paintable()
34683 // RETURNS: %TRUE if the widget is app paintable
34684 int get_app_paintable() {
34685 return gtk_widget_get_app_paintable(&this);
34688 // Determines whether @widget can be a default widget. See
34689 // gtk_widget_set_can_default().
34690 // RETURNS: %TRUE if @widget can be a default widget, %FALSE otherwise
34691 int get_can_default() {
34692 return gtk_widget_get_can_default(&this);
34695 // Determines whether @widget can own the input focus. See
34696 // gtk_widget_set_can_focus().
34697 // RETURNS: %TRUE if @widget can own the input focus, %FALSE otherwise
34698 int get_can_focus() {
34699 return gtk_widget_get_can_focus(&this);
34702 // This function is only for use in widget implementations. Obtains
34703 // geometry on the widget (e.g. with gtk_widget_set_size_request()),
34704 // in which case it returns that geometry instead of the widget's
34705 // requisition.
34706 // This function differs from gtk_widget_size_request() in that
34707 // it retrieves the last size request value from @widget->requisition,
34708 // while gtk_widget_size_request() actually calls the "size_request" method
34709 // on @widget to compute the size request and fill in @widget->requisition,
34710 // and only then returns @widget->requisition.
34711 // Because this function does not call the "size_request" method, it
34712 // can only be used when you know that @widget->requisition is
34713 // up-to-date, that is, gtk_widget_size_request() has been called
34714 // since the last time a resize was queued. In general, only container
34715 // implementations have this information; applications should use
34716 // gtk_widget_size_request().
34717 // <requisition>: a #GtkRequisition to be filled in
34718 void get_child_requisition(Requisition* requisition) {
34719 gtk_widget_get_child_requisition(&this, requisition);
34722 // Gets the value set with gtk_widget_set_child_visible().
34723 // If you feel a need to use this function, your code probably
34724 // needs reorganization.
34725 // This function is only useful for container implementations and
34726 // never should be called by an application.
34727 // RETURNS: %TRUE if the widget is mapped with the parent.
34728 int get_child_visible() {
34729 return gtk_widget_get_child_visible(&this);
34732 // Returns the clipboard object for the given selection to
34733 // be used with @widget. @widget must have a #GdkDisplay
34734 // associated with it, so must be attached to a toplevel
34735 // window.
34736 // clipboard already exists, a new one will
34737 // be created. Once a clipboard object has
34738 // been created, it is persistent for all time.
34739 // RETURNS: the appropriate clipboard object. If no
34740 // <selection>: a #GdkAtom 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.
34741 Clipboard* get_clipboard(Gdk2.Atom selection) {
34742 return gtk_widget_get_clipboard(&this, selection);
34745 // Gets the colormap that will be used to render @widget. No reference will
34746 // be added to the returned colormap; it should not be unreferenced.
34747 // RETURNS: the colormap used by @widget
34748 Gdk2.Colormap* get_colormap() {
34749 return gtk_widget_get_colormap(&this);
34752 // Obtains the composite name of a widget.
34753 // a composite child. The string should be freed when it is no
34754 // longer needed.
34755 // RETURNS: the composite name of @widget, or %NULL if @widget is not
34756 char* /*new*/ get_composite_name() {
34757 return gtk_widget_get_composite_name(&this);
34760 // Gets the reading direction for a particular widget. See
34761 // gtk_widget_set_direction().
34762 // RETURNS: the reading direction for the widget.
34763 TextDirection get_direction() {
34764 return gtk_widget_get_direction(&this);
34767 // Get the #GdkDisplay for the toplevel window associated with
34768 // this widget. This function can only be called after the widget
34769 // has been added to a widget hierarchy with a #GtkWindow at the top.
34770 // In general, you should only create display specific
34771 // resources when a widget has been realized, and you should
34772 // free those resources when the widget is unrealized.
34773 // RETURNS: the #GdkDisplay for the toplevel for this widget.
34774 Gdk2.Display* get_display() {
34775 return gtk_widget_get_display(&this);
34778 // Determines whether the widget is double buffered.
34779 // See gtk_widget_set_double_buffered()
34780 // RETURNS: %TRUE if the widget is double buffered
34781 int get_double_buffered() {
34782 return gtk_widget_get_double_buffered(&this);
34785 // Returns the event mask for the widget (a bitfield containing flags
34786 // from the #GdkEventMask enumeration). These are the events that the widget
34787 // will receive.
34788 // RETURNS: event mask for @widget
34789 int get_events() {
34790 return gtk_widget_get_events(&this);
34793 // Retrieves the extension events the widget will receive; see
34794 // gdk_input_set_extension_events().
34795 // RETURNS: extension events for @widget
34796 Gdk2.ExtensionMode get_extension_events() {
34797 return gtk_widget_get_extension_events(&this);
34800 // Returns the current value of the has-tooltip property. See
34801 // GtkWidget:has-tooltip for more information.
34802 // RETURNS: current value of has-tooltip on @widget.
34803 int get_has_tooltip() {
34804 return gtk_widget_get_has_tooltip(&this);
34807 // Determines whether @widget has a #GdkWindow of its own. See
34808 // gtk_widget_set_has_window().
34809 // RETURNS: %TRUE if @widget has a window, %FALSE otherwise
34810 int get_has_window() {
34811 return gtk_widget_get_has_window(&this);
34814 // Whether the widget is mapped.
34815 // RETURNS: %TRUE if the widget is mapped, %FALSE otherwise.
34816 int get_mapped() {
34817 return gtk_widget_get_mapped(&this);
34820 // Returns the current modifier style for the widget. (As set by
34821 // gtk_widget_modify_style().) If no style has previously set, a new
34822 // #GtkRcStyle will be created with all values unset, and set as the
34823 // modifier style for the widget. If you make changes to this rc
34824 // style, you must call gtk_widget_modify_style(), passing in the
34825 // returned rc style, to make sure that your changes take effect.
34826 // normally end up destroying it, because gtk_widget_modify_style() copies
34827 // the passed-in style and sets the copy as the new modifier style,
34828 // thus dropping any reference to the old modifier style. Add a reference
34829 // to the modifier style if you want to keep it alive.
34830 // owned by the widget. If you want to keep a pointer to value this
34831 // around, you must add a refcount using g_object_ref().
34832 // RETURNS: the modifier style for the widget. This rc style is
34833 RcStyle* get_modifier_style() {
34834 return gtk_widget_get_modifier_style(&this);
34837 // Retrieves the name of a widget. See gtk_widget_set_name() for the
34838 // significance of widget names.
34839 // should not be modified or freed
34840 // RETURNS: name of the widget. This string is owned by GTK+ and
34841 char* get_name() {
34842 return gtk_widget_get_name(&this);
34845 // Returns the current value of the GtkWidget:no-show-all property,
34846 // which determines whether calls to gtk_widget_show_all() and
34847 // gtk_widget_hide_all() will affect this widget.
34848 // RETURNS: the current value of the "no-show-all" property.
34849 int get_no_show_all() {
34850 return gtk_widget_get_no_show_all(&this);
34853 // Gets a #PangoContext with the appropriate font map, font description,
34854 // and base direction for this widget. Unlike the context returned
34855 // by gtk_widget_create_pango_context(), this context is owned by
34856 // the widget (it can be used until the screen for the widget changes
34857 // or the widget is removed from its toplevel), and will be updated to
34858 // match any changes to the widget's attributes.
34859 // If you create and keep a #PangoLayout using this context, you must
34860 // deal with changes to the context by calling pango_layout_context_changed()
34861 // on the layout in response to the #GtkWidget::style-set and
34862 // #GtkWidget::direction-changed signals for the widget.
34863 // RETURNS: the #PangoContext for the widget.
34864 Pango.Context* get_pango_context() {
34865 return gtk_widget_get_pango_context(&this);
34868 // Returns the parent container of @widget.
34869 // RETURNS: the parent container of @widget, or %NULL
34870 Widget* get_parent() {
34871 return gtk_widget_get_parent(&this);
34874 // Gets @widget's parent window.
34875 // RETURNS: the parent window of @widget.
34876 Gdk2.Window* get_parent_window() {
34877 return gtk_widget_get_parent_window(&this);
34880 // Obtains the location of the mouse pointer in widget coordinates.
34881 // Widget coordinates are a bit odd; for historical reasons, they are
34882 // defined as @widget->window coordinates for widgets that are not
34883 // #GTK_NO_WINDOW widgets, and are relative to @widget->allocation.x,
34884 // <x>: return location for the X coordinate, or %NULL
34885 // <y>: return location for the Y coordinate, or %NULL
34886 void get_pointer(/*out*/ int* x=null, /*out*/ int* y=null) {
34887 gtk_widget_get_pointer(&this, x, y);
34890 // Determines whether @widget is realized.
34891 // RETURNS: %TRUE if @widget is realized, %FALSE otherwise
34892 int get_realized() {
34893 return gtk_widget_get_realized(&this);
34896 // Determines whether @widget is alyways treated as default widget
34897 // withing its toplevel when it has the focus, even if another widget
34898 // is the default.
34899 // See gtk_widget_set_receives_default().
34900 // %FALSE otherwise
34901 // RETURNS: %TRUE if @widget acts as default widget when focussed,
34902 int get_receives_default() {
34903 return gtk_widget_get_receives_default(&this);
34906 // Retrieves the widget's requisition.
34907 // This function should only be used by widget implementations in
34908 // order to figure whether the widget's requisition has actually
34909 // changed after some internal state change (so that they can call
34910 // gtk_widget_queue_resize() instead of gtk_widget_queue_draw()).
34911 // Normally, gtk_widget_size_request() should be used.
34912 // <requisition>: a pointer to a #GtkRequisition to copy to
34913 void get_requisition(/*out*/ Requisition* requisition) {
34914 gtk_widget_get_requisition(&this, requisition);
34917 // Get the root window where this widget is located. This function can
34918 // only be called after the widget has been added to a widget
34919 // hierarchy with #GtkWindow at the top.
34920 // The root window is useful for such purposes as creating a popup
34921 // #GdkWindow associated with the window. In general, you should only
34922 // create display specific resources when a widget has been realized,
34923 // and you should free those resources when the widget is unrealized.
34924 // RETURNS: the #GdkWindow root window for the toplevel for this widget.
34925 Gdk2.Window* get_root_window() {
34926 return gtk_widget_get_root_window(&this);
34929 // Get the #GdkScreen from the toplevel window associated with
34930 // this widget. This function can only be called after the widget
34931 // has been added to a widget hierarchy with a #GtkWindow
34932 // at the top.
34933 // In general, you should only create screen specific
34934 // resources when a widget has been realized, and you should
34935 // free those resources when the widget is unrealized.
34936 // RETURNS: the #GdkScreen for the toplevel for this widget.
34937 Gdk2.Screen* get_screen() {
34938 return gtk_widget_get_screen(&this);
34941 // Returns the widget's sensitivity (in the sense of returning
34942 // the value that has been set using gtk_widget_set_sensitive()).
34943 // The effective sensitivity of a widget is however determined by both its
34944 // own and its parent widget's sensitivity. See gtk_widget_is_sensitive().
34945 // RETURNS: %TRUE if the widget is sensitive
34946 int get_sensitive() {
34947 return gtk_widget_get_sensitive(&this);
34950 // Gets the settings object holding the settings (global property
34951 // settings, RC file information, etc) used for this widget.
34952 // Note that this function can only be called when the #GtkWidget
34953 // is attached to a toplevel, since the settings object is specific
34954 // to a particular #GdkScreen.
34955 // RETURNS: the relevant #GtkSettings object
34956 Settings* get_settings() {
34957 return gtk_widget_get_settings(&this);
34960 // Gets the size request that was explicitly set for the widget using
34961 // gtk_widget_set_size_request(). A value of -1 stored in @width or
34962 // and the natural requisition of the widget will be used intead. See
34963 // gtk_widget_set_size_request(). To get the size a widget will
34964 // actually use, call gtk_widget_size_request() instead of
34965 // this function.
34966 // <width>: return location for width, or %NULL
34967 // <height>: return location for height, or %NULL
34968 void get_size_request(/*out*/ int* width=null, /*out*/ int* height=null) {
34969 gtk_widget_get_size_request(&this, width, height);
34972 // Unintrospectable method: get_snapshot() / gtk_widget_get_snapshot()
34973 // Create a #GdkPixmap of the contents of the widget and its children.
34974 // Works even if the widget is obscured. The depth and visual of the
34975 // resulting pixmap is dependent on the widget being snapshot and likely
34976 // differs from those of a target widget displaying the pixmap.
34977 // The function gdk_pixbuf_get_from_drawable() can be used to convert
34978 // the pixmap to a visual independant representation.
34979 // The snapshot area used by this function is the @widget's allocation plus
34980 // any extra space occupied by additional windows belonging to this widget
34981 // (such as the arrows of a spin button).
34982 // Thus, the resulting snapshot pixmap is possibly larger than the allocation.
34983 // If @clip_rect is non-%NULL, the resulting pixmap is shrunken to
34984 // match the specified clip_rect. The (x,y) coordinates of @clip_rect are
34985 // interpreted widget relative. If width or height of @clip_rect are 0 or
34986 // negative, the width or height of the resulting pixmap will be shrunken
34987 // by the respective amount.
34988 // For instance a @clip_rect <literal>{ +5, +5, -10, -10 }</literal> will
34989 // chop off 5 pixels at each side of the snapshot pixmap.
34990 // If non-%NULL, @clip_rect will contain the exact widget-relative snapshot
34991 // coordinates upon return. A @clip_rect of <literal>{ -1, -1, 0, 0 }</literal>
34992 // can be used to preserve the auto-grown snapshot area and use @clip_rect
34993 // as a pure output parameter.
34994 // The returned pixmap can be %NULL, if the resulting @clip_area was empty.
34995 // RETURNS: #GdkPixmap snapshot of the widget
34996 // <clip_rect>: a #GdkRectangle or %NULL
34997 Gdk2.Pixmap* get_snapshot(Gdk2.Rectangle* clip_rect=null) {
34998 return gtk_widget_get_snapshot(&this, clip_rect);
35001 // Returns the widget's state. See gtk_widget_set_state().
35002 // RETURNS: the state of @widget.
35003 StateType get_state() {
35004 return gtk_widget_get_state(&this);
35007 // Simply an accessor function that returns @widget->style.
35008 // RETURNS: the widget's #GtkStyle
35009 Style* get_style() {
35010 return gtk_widget_get_style(&this);
35013 // Gets the contents of the tooltip for @widget.
35014 // returned string with g_free() when done.
35015 // RETURNS: the tooltip text, or %NULL. You should free the
35016 char* /*new*/ get_tooltip_markup() {
35017 return gtk_widget_get_tooltip_markup(&this);
35020 // Gets the contents of the tooltip for @widget.
35021 // returned string with g_free() when done.
35022 // RETURNS: the tooltip text, or %NULL. You should free the
35023 char* /*new*/ get_tooltip_text() {
35024 return gtk_widget_get_tooltip_text(&this);
35027 // Returns the #GtkWindow of the current tooltip. This can be the
35028 // GtkWindow created by default, or the custom tooltip window set
35029 // using gtk_widget_set_tooltip_window().
35030 // RETURNS: The #GtkWindow of the current tooltip.
35031 Window* get_tooltip_window() {
35032 return gtk_widget_get_tooltip_window(&this);
35035 // This function returns the topmost widget in the container hierarchy
35036 // returned as the topmost widget. No reference will be added to the
35037 // returned widget; it should not be unreferenced.
35038 // Note the difference in behavior vs. gtk_widget_get_ancestor();
35039 // <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</literal>
35040 // would return
35041 // %NULL if @widget wasn't inside a toplevel window, and if the
35042 // window was inside a #GtkWindow-derived widget which was in turn
35043 // inside the toplevel #GtkWindow. While the second case may
35044 // seem unlikely, it actually happens when a #GtkPlug is embedded
35045 // inside a #GtkSocket within the same application.
35046 // To reliably find the toplevel #GtkWindow, use
35047 // gtk_widget_get_toplevel() and check if the %TOPLEVEL flags
35048 // is set on the result.
35049 // |[
35050 // GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
35051 // if (gtk_widget_is_toplevel (toplevel))
35052 // {
35053 // /&ast; Perform action on toplevel. &ast;/
35054 // }
35055 // ]|
35056 // if there's no ancestor.
35057 // RETURNS: the topmost ancestor of @widget, or @widget itself
35058 Widget* get_toplevel() {
35059 return gtk_widget_get_toplevel(&this);
35062 // Determines whether the widget is visible. Note that this doesn't
35063 // take into account whether the widget's parent is also visible
35064 // or the widget is obscured in any way.
35065 // See gtk_widget_set_visible().
35066 // RETURNS: %TRUE if the widget is visible
35067 int get_visible() {
35068 return gtk_widget_get_visible(&this);
35071 // Gets the visual that will be used to render @widget.
35072 // RETURNS: the visual for @widget
35073 Gdk2.Visual* get_visual() {
35074 return gtk_widget_get_visual(&this);
35077 // Returns the widget's window if it is realized, %NULL otherwise
35078 // RETURNS: @widget's window.
35079 Gdk2.Window* get_window() {
35080 return gtk_widget_get_window(&this);
35083 // Causes @widget to become the default widget. @widget must have the
35084 // %GTK_CAN_DEFAULT flag set; typically you have to set this flag
35085 // yourself by calling <literal>gtk_widget_set_can_default (@widget,
35086 // %TRUE)</literal>. The default widget is activated when
35087 // the user presses Enter in a window. Default widgets must be
35088 // activatable, that is, gtk_widget_activate() should affect them.
35089 void grab_default() {
35090 gtk_widget_grab_default(&this);
35093 // Causes @widget to have the keyboard focus for the #GtkWindow it's
35094 // inside. @widget must be a focusable widget, such as a #GtkEntry;
35095 // something like #GtkFrame won't work.
35096 // More precisely, it must have the %GTK_CAN_FOCUS flag set. Use
35097 // gtk_widget_set_can_focus() to modify that flag.
35098 // The widget also needs to be realized and mapped. This is indicated by the
35099 // related signals. Grabbing the focus immediately after creating the widget
35100 // will likely fail and cause critical warnings.
35101 void grab_focus() {
35102 gtk_widget_grab_focus(&this);
35105 // Determines whether @widget is the current default widget within its
35106 // toplevel. See gtk_widget_set_can_default().
35107 // its toplevel, %FALSE otherwise
35108 // RETURNS: %TRUE if @widget is the current default widget within
35109 int has_default() {
35110 return gtk_widget_has_default(&this);
35113 // Determines if the widget has the global input focus. See
35114 // gtk_widget_is_focus() for the difference between having the global
35115 // input focus, and only having the focus within a toplevel.
35116 // RETURNS: %TRUE if the widget has the global input focus.
35117 int has_focus() {
35118 return gtk_widget_has_focus(&this);
35121 // Determines whether the widget is currently grabbing events, so it
35122 // is the only widget receiving input events (keyboard and mouse).
35123 // See also gtk_grab_add().
35124 // RETURNS: %TRUE if the widget is in the grab_widgets stack
35125 int has_grab() {
35126 return gtk_widget_has_grab(&this);
35129 // Determines if the widget style has been looked up through the rc mechanism.
35130 // mechanism, %FALSE otherwise.
35131 // RETURNS: %TRUE if the widget has been looked up through the rc
35132 int has_rc_style() {
35133 return gtk_widget_has_rc_style(&this);
35136 // Checks whether there is a #GdkScreen is associated with
35137 // this widget. All toplevel widgets have an associated
35138 // screen, and all widgets added into a hierarchy with a toplevel
35139 // window at the top.
35140 // with the widget.
35141 // RETURNS: %TRUE if there is a #GdkScreen associcated
35142 int has_screen() {
35143 return gtk_widget_has_screen(&this);
35146 // Reverses the effects of gtk_widget_show(), causing the widget to be
35147 // hidden (invisible to the user).
35148 void hide() {
35149 gtk_widget_hide(&this);
35151 // Recursively hides a widget and any child widgets.
35152 void hide_all() {
35153 gtk_widget_hide_all(&this);
35156 // Utility function; intended to be connected to the #GtkWidget::delete-event
35157 // signal on a #GtkWindow. The function calls gtk_widget_hide() on its
35158 // argument, then returns %TRUE. If connected to ::delete-event, the
35159 // result is that clicking the close button for a window (on the
35160 // window frame, top right corner usually) will hide but not destroy
35161 // the window. By default, GTK+ destroys windows when ::delete-event
35162 // is received.
35163 // RETURNS: %TRUE
35164 int hide_on_delete() {
35165 return gtk_widget_hide_on_delete(&this);
35168 // Sets an input shape for this widget's GDK window. This allows for
35169 // windows which react to mouse click in a nonrectangular region, see
35170 // gdk_window_input_shape_combine_mask() for more information.
35171 // <shape_mask>: shape to be added, or %NULL to remove an existing shape
35172 // <offset_x>: X position of shape mask with respect to @window
35173 // <offset_y>: Y position of shape mask with respect to @window
35174 void input_shape_combine_mask(Gdk2.Bitmap* shape_mask, int offset_x, int offset_y) {
35175 gtk_widget_input_shape_combine_mask(&this, shape_mask, offset_x, offset_y);
35178 // Computes the intersection of a @widget's area and @area, storing
35179 // the intersection in @intersection, and returns %TRUE if there was
35180 // an intersection. @intersection may be %NULL if you're only
35181 // interested in whether there was an intersection.
35182 // RETURNS: %TRUE if there was an intersection
35183 // <area>: a rectangle
35184 // <intersection>: rectangle to store intersection of @widget and @area
35185 int intersect(Gdk2.Rectangle* area, Gdk2.Rectangle* intersection) {
35186 return gtk_widget_intersect(&this, area, intersection);
35189 // Determines whether @widget is somewhere inside @ancestor, possibly with
35190 // intermediate containers.
35191 // grandchild, great grandchild, etc.
35192 // RETURNS: %TRUE if @ancestor contains @widget as a child,
35193 // <ancestor>: another #GtkWidget
35194 int is_ancestor(Widget* ancestor) {
35195 return gtk_widget_is_ancestor(&this, ancestor);
35198 // Whether @widget can rely on having its alpha channel
35199 // drawn correctly. On X11 this function returns whether a
35200 // compositing manager is running for @widget's screen.
35201 // Please note that the semantics of this call will change
35202 // in the future if used on a widget that has a composited
35203 // window in its hierarchy (as set by gdk_window_set_composited()).
35204 // channel being drawn correctly.
35205 // RETURNS: %TRUE if the widget can rely on its alpha
35206 int is_composited() {
35207 return gtk_widget_is_composited(&this);
35210 // Determines whether @widget can be drawn to. A widget can be drawn
35211 // to if it is mapped and visible.
35212 // RETURNS: %TRUE if @widget is drawable, %FALSE otherwise
35213 int is_drawable() {
35214 return gtk_widget_is_drawable(&this);
35217 // Determines if the widget is the focus widget within its
35218 // toplevel. (This does not mean that the %HAS_FOCUS flag is
35219 // necessarily set; %HAS_FOCUS will only be set if the
35220 // toplevel widget additionally has the global input focus.)
35221 // RETURNS: %TRUE if the widget is the focus widget.
35222 int is_focus() {
35223 return gtk_widget_is_focus(&this);
35226 // Returns the widget's effective sensitivity, which means
35227 // it is sensitive itself and also its parent widget is sensntive
35228 // RETURNS: %TRUE if the widget is effectively sensitive
35229 int is_sensitive() {
35230 return gtk_widget_is_sensitive(&this);
35233 // Determines whether @widget is a toplevel widget. Currently only
35234 // #GtkWindow and #GtkInvisible are toplevel widgets. Toplevel
35235 // widgets have no parent widget.
35236 // RETURNS: %TRUE if @widget is a toplevel, %FALSE otherwise
35237 int is_toplevel() {
35238 return gtk_widget_is_toplevel(&this);
35241 // This function should be called whenever keyboard navigation within
35242 // a single widget hits a boundary. The function emits the
35243 // #GtkWidget::keynav-failed signal on the widget and its return
35244 // value should be interpreted in a way similar to the return value of
35245 // gtk_widget_child_focus():
35246 // When %TRUE is returned, stay in the widget, the failed keyboard
35247 // navigation is Ok and/or there is nowhere we can/should move the
35248 // focus to.
35249 // When %FALSE is returned, the caller should continue with keyboard
35250 // navigation outside the widget, e.g. by calling
35251 // gtk_widget_child_focus() on the widget's toplevel.
35252 // The default ::keynav-failed handler returns %TRUE for
35253 // %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD. For the other
35254 // values of #GtkDirectionType, it looks at the
35255 // #GtkSettings:gtk-keynav-cursor-only setting and returns %FALSE
35256 // if the setting is %TRUE. This way the entire user interface
35257 // becomes cursor-navigatable on input devices such as mobile phones
35258 // which only have cursor keys but no tab key.
35259 // Whenever the default handler returns %TRUE, it also calls
35260 // gtk_widget_error_bell() to notify the user of the failed keyboard
35261 // navigation.
35262 // A use case for providing an own implementation of ::keynav-failed
35263 // (either by connecting to it or by overriding it) would be a row of
35264 // #GtkEntry widgets where the user should be able to navigate the
35265 // entire row with the cursor keys, as e.g. known from user interfaces
35266 // that require entering license keys.
35267 // if the emitting widget should try to handle the keyboard
35268 // navigation attempt in its parent container(s).
35269 // RETURNS: %TRUE if stopping keyboard navigation is fine, %FALSE
35270 // <direction>: direction of focus movement
35271 int keynav_failed(DirectionType direction) {
35272 return gtk_widget_keynav_failed(&this, direction);
35275 // Lists the closures used by @widget for accelerator group connections
35276 // with gtk_accel_group_connect_by_path() or gtk_accel_group_connect().
35277 // The closures can be used to monitor accelerator changes on @widget,
35278 // by connecting to the @GtkAccelGroup::accel-changed signal of the
35279 // #GtkAccelGroup of a closure which can be found out with
35280 // gtk_accel_group_from_accel_closure().
35281 // a newly allocated #GList of closures
35282 GLib2.List* /*new container*/ list_accel_closures() {
35283 return gtk_widget_list_accel_closures(&this);
35286 // Returns a newly allocated list of the widgets, normally labels, for
35287 // which this widget is a the target of a mnemonic (see for example,
35288 // gtk_label_set_mnemonic_widget()).
35289 // The widgets in the list are not individually referenced. If you
35290 // want to iterate through the list and perform actions involving
35291 // callbacks that might destroy the widgets, you
35292 // <emphasis>must</emphasis> call <literal>g_list_foreach (result,
35293 // (GFunc)g_object_ref, NULL)</literal> first, and then unref all the
35294 // widgets afterwards.
35295 // mnemonic labels; free this list
35296 // with g_list_free() when you are done with it.
35297 // RETURNS: the list of
35298 GLib2.List* /*new container*/ list_mnemonic_labels() {
35299 return gtk_widget_list_mnemonic_labels(&this);
35302 // This function is only for use in widget implementations. Causes
35303 // a widget to be mapped if it isn't already.
35304 void map() {
35305 gtk_widget_map(&this);
35308 // Emits the #GtkWidget::mnemonic-activate signal.
35309 // The default handler for this signal activates the @widget if
35310 // is %TRUE.
35311 // RETURNS: %TRUE if the signal has been handled
35312 // <group_cycling>: %TRUE if there are other widgets with the same mnemonic
35313 int mnemonic_activate(int group_cycling) {
35314 return gtk_widget_mnemonic_activate(&this, group_cycling);
35317 // Sets the base color for a widget in a particular state.
35318 // All other style values are left untouched. The base color
35319 // is the background color used along with the text color
35320 // (see gtk_widget_modify_text()) for widgets such as #GtkEntry
35321 // and #GtkTextView. See also gtk_widget_modify_style().
35322 // Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set)
35323 // draw on their parent container's window and thus may not draw any
35324 // background themselves. This is the case for e.g. #GtkLabel. To modify
35325 // the background of such widgets, you have to set the base color on their
35326 // parent; if you want to set the background of a rectangular area around
35327 // a label, try placing the label in a #GtkEventBox widget and setting
35328 // the base color on that.
35329 // <state>: the state for which to set the base color
35330 // <color>: the color to assign (does not need to be allocated), or %NULL to undo the effect of previous calls to of gtk_widget_modify_base().
35331 void modify_base(StateType state, Gdk2.Color* color=null) {
35332 gtk_widget_modify_base(&this, state, color);
35335 // Sets the background color for a widget in a particular state.
35336 // All other style values are left untouched. See also
35337 // gtk_widget_modify_style().
35338 // Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set)
35339 // draw on their parent container's window and thus may not draw any
35340 // background themselves. This is the case for e.g. #GtkLabel. To modify
35341 // the background of such widgets, you have to set the background color
35342 // on their parent; if you want to set the background of a rectangular
35343 // area around a label, try placing the label in a #GtkEventBox widget
35344 // and setting the background color on that.
35345 // <state>: the state for which to set the background color
35346 // <color>: the color to assign (does not need to be allocated), or %NULL to undo the effect of previous calls to of gtk_widget_modify_bg().
35347 void modify_bg(StateType state, Gdk2.Color* color=null) {
35348 gtk_widget_modify_bg(&this, state, color);
35351 // Sets the cursor color to use in a widget, overriding the
35352 // #GtkWidget:cursor-color and #GtkWidget:secondary-cursor-color
35353 // style properties. All other style values are left untouched.
35354 // See also gtk_widget_modify_style().
35355 // <primary>: the color to use for primary cursor (does not need to be allocated), or %NULL to undo the effect of previous calls to of gtk_widget_modify_cursor().
35356 // <secondary>: the color to use for secondary cursor (does not need to be allocated), or %NULL to undo the effect of previous calls to of gtk_widget_modify_cursor().
35357 void modify_cursor(Gdk2.Color* primary, Gdk2.Color* secondary) {
35358 gtk_widget_modify_cursor(&this, primary, secondary);
35361 // Sets the foreground color for a widget in a particular state.
35362 // All other style values are left untouched. See also
35363 // gtk_widget_modify_style().
35364 // <state>: the state for which to set the foreground color
35365 // <color>: the color to assign (does not need to be allocated), or %NULL to undo the effect of previous calls to of gtk_widget_modify_fg().
35366 void modify_fg(StateType state, Gdk2.Color* color=null) {
35367 gtk_widget_modify_fg(&this, state, color);
35370 // Sets the font to use for a widget. All other style values are left
35371 // untouched. See also gtk_widget_modify_style().
35372 // <font_desc>: the font description to use, or %NULL to undo the effect of previous calls to gtk_widget_modify_font().
35373 void modify_font(Pango.FontDescription* font_desc=null) {
35374 gtk_widget_modify_font(&this, font_desc);
35377 // Modifies style values on the widget. Modifications made using this
35378 // technique take precedence over style values set via an RC file,
35379 // however, they will be overriden if a style is explicitely set on
35380 // the widget using gtk_widget_set_style(). The #GtkRcStyle structure
35381 // is designed so each field can either be set or unset, so it is
35382 // possible, using this function, to modify some style values and
35383 // leave the others unchanged.
35384 // Note that modifications made with this function are not cumulative
35385 // with previous calls to gtk_widget_modify_style() or with such
35386 // functions as gtk_widget_modify_fg(). If you wish to retain
35387 // previous values, you must first call gtk_widget_get_modifier_style(),
35388 // make your modifications to the returned style, then call
35389 // gtk_widget_modify_style() with that style. On the other hand,
35390 // if you first call gtk_widget_modify_style(), subsequent calls
35391 // to such functions gtk_widget_modify_fg() will have a cumulative
35392 // effect with the initial modifications.
35393 // <style>: the #GtkRcStyle holding the style modifications
35394 void modify_style(RcStyle* style) {
35395 gtk_widget_modify_style(&this, style);
35398 // Sets the text color for a widget in a particular state. All other
35399 // style values are left untouched. The text color is the foreground
35400 // color used along with the base color (see gtk_widget_modify_base())
35401 // for widgets such as #GtkEntry and #GtkTextView. See also
35402 // gtk_widget_modify_style().
35403 // <state>: the state for which to set the text color
35404 // <color>: the color to assign (does not need to be allocated), or %NULL to undo the effect of previous calls to of gtk_widget_modify_text().
35405 void modify_text(StateType state, Gdk2.Color* color=null) {
35406 gtk_widget_modify_text(&this, state, color);
35409 // Obtains the full path to @widget. The path is simply the name of a
35410 // widget and all its parents in the container hierarchy, separated by
35411 // periods. The name of a widget comes from
35412 // gtk_widget_get_name(). Paths are used to apply styles to a widget
35413 // in gtkrc configuration files. Widget names are the type of the
35414 // widget by default (e.g. "GtkButton") or can be set to an
35415 // application-specific value with gtk_widget_set_name(). By setting
35416 // the name of a widget, you allow users or theme authors to apply
35417 // styles to that specific widget in their gtkrc
35418 // file. @path_reversed_p fills in the path in reverse order,
35419 // i.e. starting with @widget's name instead of starting with the name
35420 // of @widget's outermost ancestor.
35421 // <path_length>: location to store length of the path, or %NULL
35422 // <path>: location to store allocated path string, or %NULL
35423 // <path_reversed>: location to store allocated reverse path string, or %NULL
35424 void path(/*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null) {
35425 gtk_widget_path(&this, path_length, path, path_reversed);
35427 // This function does the same as gtk_widget_queue_draw().
35428 void queue_clear() {
35429 gtk_widget_queue_clear(&this);
35432 // This function is no longer different from
35433 // gtk_widget_queue_draw_area(), though it once was. Now it just calls
35434 // gtk_widget_queue_draw_area(). Originally
35435 // gtk_widget_queue_clear_area() would force a redraw of the
35436 // background for %GTK_NO_WINDOW widgets, and
35437 // gtk_widget_queue_draw_area() would not. Now both functions ensure
35438 // the background will be redrawn.
35439 // <x>: x coordinate of upper-left corner of rectangle to redraw
35440 // <y>: y coordinate of upper-left corner of rectangle to redraw
35441 // <width>: width of region to draw
35442 // <height>: height of region to draw
35443 void queue_clear_area(int x, int y, int width, int height) {
35444 gtk_widget_queue_clear_area(&this, x, y, width, height);
35447 // Equivalent to calling gtk_widget_queue_draw_area() for the
35448 // entire area of a widget.
35449 void queue_draw() {
35450 gtk_widget_queue_draw(&this);
35453 // Invalidates the rectangular area of @widget defined by @x, @y,
35454 // widget's window and all its child windows. Once the main loop
35455 // becomes idle (after the current batch of events has been processed,
35456 // roughly), the window will receive expose events for the union of
35457 // all regions that have been invalidated.
35458 // Normally you would only use this function in widget
35459 // implementations. You might also use it, or
35460 // gdk_window_invalidate_rect() directly, to schedule a redraw of a
35461 // #GtkDrawingArea or some portion thereof.
35462 // Frequently you can just call gdk_window_invalidate_rect() or
35463 // gdk_window_invalidate_region() instead of this function. Those
35464 // functions will invalidate only a single window, instead of the
35465 // widget and all its children.
35466 // The advantage of adding to the invalidated region compared to
35467 // simply drawing immediately is efficiency; using an invalid region
35468 // ensures that you only have to redraw one time.
35469 // <x>: x coordinate of upper-left corner of rectangle to redraw
35470 // <y>: y coordinate of upper-left corner of rectangle to redraw
35471 // <width>: width of region to draw
35472 // <height>: height of region to draw
35473 void queue_draw_area(int x, int y, int width, int height) {
35474 gtk_widget_queue_draw_area(&this, x, y, width, height);
35477 // This function is only for use in widget implementations.
35478 // Flags a widget to have its size renegotiated; should
35479 // be called when a widget for some reason has a new size request.
35480 // For example, when you change the text in a #GtkLabel, #GtkLabel
35481 // queues a resize to ensure there's enough space for the new text.
35482 void queue_resize() {
35483 gtk_widget_queue_resize(&this);
35486 // This function works like gtk_widget_queue_resize(),
35487 // except that the widget is not invalidated.
35488 void queue_resize_no_redraw() {
35489 gtk_widget_queue_resize_no_redraw(&this);
35492 // Creates the GDK (windowing system) resources associated with a
35493 // widget. For example, @widget->window will be created when a widget
35494 // is realized. Normally realization happens implicitly; if you show
35495 // a widget and all its parent containers, then the widget will be
35496 // realized and mapped automatically.
35497 // Realizing a widget requires all
35498 // the widget's parent widgets to be realized; calling
35499 // gtk_widget_realize() realizes the widget's parents in addition to
35500 // when you realize it, bad things will happen.
35501 // This function is primarily used in widget implementations, and
35502 // isn't very useful otherwise. Many times when you think you might
35503 // need it, a better approach is to connect to a signal that will be
35504 // called after the widget is realized automatically, such as
35505 // GtkWidget::expose-event. Or simply g_signal_connect () to the
35506 // GtkWidget::realize signal.
35507 void realize() {
35508 gtk_widget_realize(&this);
35511 // Unintrospectable method: ref() / gtk_widget_ref()
35512 // Adds a reference to a widget. This function is exactly the same
35513 // as calling g_object_ref(), and exists mostly for historical
35514 // reasons. It can still be convenient to avoid casting a widget
35515 // to a #GObject, it saves a small amount of typing.
35516 // RETURNS: the widget that was referenced
35517 Widget* ref_() {
35518 return gtk_widget_ref(&this);
35521 // Unintrospectable method: region_intersect() / gtk_widget_region_intersect()
35522 // Computes the intersection of a @widget's area and @region, returning
35523 // the intersection. The result may be empty, use gdk_region_empty() to
35524 // check.
35525 // RETURNS: 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.
35526 // <region>: a #GdkRegion, in the same coordinate system as for %NO_WINDOW widgets; relative to the parent window of @widget->window for widgets with their own window.
35527 Gdk2.Region* region_intersect(Gdk2.Region* region) {
35528 return gtk_widget_region_intersect(&this, region);
35531 // Removes an accelerator from @widget, previously installed with
35532 // gtk_widget_add_accelerator().
35533 // RETURNS: whether an accelerator was installed and could be removed
35534 // <accel_group>: accel group for this widget
35535 // <accel_key>: GDK keyval of the accelerator
35536 // <accel_mods>: modifier key combination of the accelerator
35537 int remove_accelerator(AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods) {
35538 return gtk_widget_remove_accelerator(&this, accel_group, accel_key, accel_mods);
35541 // Removes a widget from the list of mnemonic labels for
35542 // this widget. (See gtk_widget_list_mnemonic_labels()). The widget
35543 // must have previously been added to the list with
35544 // gtk_widget_add_mnemonic_label().
35545 // <label>: a #GtkWidget that was previously set as a mnemnic label for
35546 void remove_mnemonic_label(Widget* label) {
35547 gtk_widget_remove_mnemonic_label(&this, label);
35550 // A convenience function that uses the theme engine and RC file
35551 // settings for @widget to look up @stock_id and render it to
35552 // a pixbuf. @stock_id should be a stock icon ID such as
35553 // #GTK_STOCK_OPEN or #GTK_STOCK_OK. @size should be a size
35554 // such as #GTK_ICON_SIZE_MENU. @detail should be a string that
35555 // identifies the widget or code doing the rendering, so that
35556 // theme engines can special-case rendering for that widget or code.
35557 // The pixels in the returned #GdkPixbuf are shared with the rest of
35558 // the application and should not be modified. The pixbuf should be freed
35559 // after use with g_object_unref().
35560 // stock ID wasn't known
35561 // RETURNS: a new pixbuf, or %NULL if the
35562 // <stock_id>: a stock ID
35563 // <size>: (type int) 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).
35564 // <detail>: render detail to pass to theme engine
35565 GdkPixbuf2.Pixbuf* /*new*/ render_icon(char* stock_id, IconSize size, char* detail=null) {
35566 return gtk_widget_render_icon(&this, stock_id, size, detail);
35569 // Moves a widget from one #GtkContainer to another, handling reference
35570 // count issues to avoid destroying the widget.
35571 // <new_parent>: a #GtkContainer to move the widget into
35572 void reparent(Widget* new_parent) {
35573 gtk_widget_reparent(&this, new_parent);
35576 // Reset the styles of @widget and all descendents, so when
35577 // they are looked up again, they get the correct values
35578 // for the currently loaded RC file settings.
35579 // This function is not useful for applications.
35580 void reset_rc_styles() {
35581 gtk_widget_reset_rc_styles(&this);
35583 // Recursively resets the shape on this widget and its descendants.
35584 void reset_shapes() {
35585 gtk_widget_reset_shapes(&this);
35588 // Very rarely-used function. This function is used to emit
35589 // an expose event signals on a widget. This function is not
35590 // normally used directly. The only time it is used is when
35591 // propagating an expose event to a child %NO_WINDOW widget, and
35592 // that is normally done using gtk_container_propagate_expose().
35593 // If you want to force an area of a window to be redrawn,
35594 // use gdk_window_invalidate_rect() or gdk_window_invalidate_region().
35595 // To cause the redraw to be done immediately, follow that call
35596 // with a call to gdk_window_process_updates().
35597 // the event was handled)
35598 // RETURNS: return from the event signal emission (%TRUE if
35599 // <event>: a expose #GdkEvent
35600 int send_expose(Gdk2.Event* event) {
35601 return gtk_widget_send_expose(&this, event);
35604 // Sends the focus change @event to @widget
35605 // This function is not meant to be used by applications. The only time it
35606 // should be used is when it is necessary for a #GtkWidget to assign focus
35607 // to a widget that is semantically owned by the first widget even though
35608 // it's not a direct child - for instance, a search entry in a floating
35609 // window similar to the quick search in #GtkTreeView.
35610 // An example of its usage is:
35611 // |[
35612 // GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
35613 // fevent->focus_change.type = GDK_FOCUS_CHANGE;
35614 // fevent->focus_change.in = TRUE;
35615 // fevent->focus_change.window = gtk_widget_get_window (widget);
35616 // if (fevent->focus_change.window != NULL)
35617 // g_object_ref (fevent->focus_change.window);
35618 // gtk_widget_send_focus_change (widget, fevent);
35619 // gdk_event_free (event);
35620 // ]|
35621 // if the event was handled, and %FALSE otherwise
35622 // RETURNS: the return value from the event signal emission: %TRUE
35623 // <event>: a #GdkEvent of type GDK_FOCUS_CHANGE
35624 int send_focus_change(Gdk2.Event* event) {
35625 return gtk_widget_send_focus_change(&this, event);
35628 // Unintrospectable method: set() / gtk_widget_set()
35629 // Precursor of g_object_set().
35630 // <first_property_name>: name of first property to set
35631 /+ Not available -- variadic methods unsupported - use the C function directly.
35632 alias gtk_widget_set set; // Variadic
35635 // Given an accelerator group, @accel_group, and an accelerator path,
35636 // key binding that is defined for @accel_path is pressed, @widget
35637 // will be activated. This removes any accelerators (for any
35638 // accelerator group) installed by previous calls to
35639 // gtk_widget_set_accel_path(). Associating accelerators with
35640 // paths allows them to be modified by the user and the modifications
35641 // to be saved for future use. (See gtk_accel_map_save().)
35642 // This function is a low level function that would most likely
35643 // be used by a menu creation system like #GtkUIManager. If you
35644 // use #GtkUIManager, setting up accelerator paths will be done
35645 // automatically.
35646 // Even when you you aren't using #GtkUIManager, if you only want to
35647 // set up accelerators on menu items gtk_menu_item_set_accel_path()
35648 // provides a somewhat more convenient interface.
35649 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
35650 // pass a static string, you can save some memory by interning it first with
35651 // g_intern_static_string().
35652 // <accel_path>: path used to look up the accelerator
35653 // <accel_group>: a #GtkAccelGroup.
35654 void set_accel_path(char* accel_path=null, AccelGroup* accel_group=null) {
35655 gtk_widget_set_accel_path(&this, accel_path, accel_group);
35658 // Sets the widget's allocation. This should not be used
35659 // directly, but from within a widget's size_allocate method.
35660 // <allocation>: a pointer to a #GtkAllocation to copy from
35661 void set_allocation(Allocation* allocation) {
35662 gtk_widget_set_allocation(&this, allocation);
35665 // Sets whether the application intends to draw on the widget in
35666 // an #GtkWidget::expose-event handler.
35667 // This is a hint to the widget and does not affect the behavior of
35668 // the GTK+ core; many widgets ignore this flag entirely. For widgets
35669 // that do pay attention to the flag, such as #GtkEventBox and #GtkWindow,
35670 // the effect is to suppress default themed drawing of the widget's
35671 // background. (Children of the widget will still be drawn.) The application
35672 // is then entirely responsible for drawing the widget background.
35673 // Note that the background is still drawn when the widget is mapped.
35674 // If this is not suitable (e.g. because you want to make a transparent
35675 // window using an RGBA visual), you can work around this by doing:
35676 // |[
35677 // gtk_widget_realize (window);
35678 // gdk_window_set_back_pixmap (window->window, NULL, FALSE);
35679 // gtk_widget_show (window);
35680 // ]|
35681 // <app_paintable>: %TRUE if the application will paint on the widget
35682 void set_app_paintable(int app_paintable) {
35683 gtk_widget_set_app_paintable(&this, app_paintable);
35686 // Specifies whether @widget can be a default widget. See
35687 // gtk_widget_grab_default() for details about the meaning of
35688 // "default".
35689 // <can_default>: whether or not @widget can be a default widget.
35690 void set_can_default(int can_default) {
35691 gtk_widget_set_can_default(&this, can_default);
35694 // Specifies whether @widget can own the input focus. See
35695 // gtk_widget_grab_focus() for actually setting the input focus on a
35696 // widget.
35697 // <can_focus>: whether or not @widget can own the input focus.
35698 void set_can_focus(int can_focus) {
35699 gtk_widget_set_can_focus(&this, can_focus);
35702 // Sets whether @widget should be mapped along with its when its parent
35703 // is mapped and @widget has been shown with gtk_widget_show().
35704 // The child visibility can be set for widget before it is added to
35705 // a container with gtk_widget_set_parent(), to avoid mapping
35706 // children unnecessary before immediately unmapping them. However
35707 // it will be reset to its default state of %TRUE when the widget
35708 // is removed from a container.
35709 // Note that changing the child visibility of a widget does not
35710 // queue a resize on the widget. Most of the time, the size of
35711 // a widget is computed from all visible children, whether or
35712 // not they are mapped. If this is not the case, the container
35713 // can queue a resize itself.
35714 // This function is only useful for container implementations and
35715 // never should be called by an application.
35716 // <is_visible>: if %TRUE, @widget should be mapped along with its parent.
35717 void set_child_visible(int is_visible) {
35718 gtk_widget_set_child_visible(&this, is_visible);
35721 // Sets the colormap for the widget to the given value. Widget must not
35722 // have been previously realized. This probably should only be used
35723 // from an <function>init()</function> function (i.e. from the constructor
35724 // for the widget).
35725 // <colormap>: a colormap
35726 void set_colormap(Gdk2.Colormap* colormap) {
35727 gtk_widget_set_colormap(&this, colormap);
35730 // Sets a widgets composite name. The widget must be
35731 // a composite child of its parent; see gtk_widget_push_composite_child().
35732 // <name>: the name to set
35733 void set_composite_name(char* name) {
35734 gtk_widget_set_composite_name(&this, name);
35737 // Sets the reading direction on a particular widget. This direction
35738 // controls the primary direction for widgets containing text,
35739 // and also the direction in which the children of a container are
35740 // packed. The ability to set the direction is present in order
35741 // so that correct localization into languages with right-to-left
35742 // reading directions can be done. Generally, applications will
35743 // let the default reading direction present, except for containers
35744 // where the containers are arranged in an order that is explicitely
35745 // visual rather than logical (such as buttons for text justification).
35746 // If the direction is set to %GTK_TEXT_DIR_NONE, then the value
35747 // set by gtk_widget_set_default_direction() will be used.
35748 // <dir>: the new direction
35749 void set_direction(TextDirection dir) {
35750 gtk_widget_set_direction(&this, dir);
35753 // Widgets are double buffered by default; you can use this function
35754 // to turn off the buffering. "Double buffered" simply means that
35755 // gdk_window_begin_paint_region() and gdk_window_end_paint() are called
35756 // automatically around expose events sent to the
35757 // widget. gdk_window_begin_paint() diverts all drawing to a widget's
35758 // window to an offscreen buffer, and gdk_window_end_paint() draws the
35759 // buffer to the screen. The result is that users see the window
35760 // update in one smooth step, and don't see individual graphics
35761 // primitives being rendered.
35762 // In very simple terms, double buffered widgets don't flicker,
35763 // so you would only use this function to turn off double buffering
35764 // if you had special needs and really knew what you were doing.
35765 // expose events, since even the clearing to the background color or
35766 // pixmap will not happen automatically (as it is done in
35767 // gdk_window_begin_paint()).
35768 // <double_buffered>: %TRUE to double-buffer a widget
35769 void set_double_buffered(int double_buffered) {
35770 gtk_widget_set_double_buffered(&this, double_buffered);
35773 // Sets the event mask (see #GdkEventMask) for a widget. The event
35774 // mask determines which events a widget will receive. Keep in mind
35775 // that different widgets have different default event masks, and by
35776 // changing the event mask you may disrupt a widget's functionality,
35777 // so be careful. This function must be called while a widget is
35778 // unrealized. Consider gtk_widget_add_events() for widgets that are
35779 // already realized, or if you want to preserve the existing event
35780 // mask. This function can't be used with #GTK_NO_WINDOW widgets;
35781 // to get events on those widgets, place them inside a #GtkEventBox
35782 // and receive events on the event box.
35783 // <events>: event mask
35784 void set_events(int events) {
35785 gtk_widget_set_events(&this, events);
35788 // Sets the extension events mask to @mode. See #GdkExtensionMode
35789 // and gdk_input_set_extension_events().
35790 // <mode>: bitfield of extension events to receive
35791 void set_extension_events(Gdk2.ExtensionMode mode) {
35792 gtk_widget_set_extension_events(&this, mode);
35795 // Sets the has-tooltip property on @widget to @has_tooltip. See
35796 // GtkWidget:has-tooltip for more information.
35797 // <has_tooltip>: whether or not @widget has a tooltip.
35798 void set_has_tooltip(int has_tooltip) {
35799 gtk_widget_set_has_tooltip(&this, has_tooltip);
35802 // Specifies whether @widget has a #GdkWindow of its own. Note that
35803 // all realized widgets have a non-%NULL "window" pointer
35804 // (gtk_widget_get_window() never returns a %NULL window when a widget
35805 // is realized), but for many of them it's actually the #GdkWindow of
35806 // one of its parent widgets. Widgets that do not create a %window for
35807 // themselves in GtkWidget::realize() must announce this by
35808 // calling this function with @has_window = %FALSE.
35809 // This function should only be called by widget implementations,
35810 // and they should call it in their init() function.
35811 // <has_window>: whether or not @widget has a window.
35812 void set_has_window(int has_window) {
35813 gtk_widget_set_has_window(&this, has_window);
35816 // Marks the widget as being realized.
35817 // This function should only ever be called in a derived widget's
35818 // "map" or "unmap" implementation.
35819 // <mapped>: %TRUE to mark the widget as mapped
35820 void set_mapped(int mapped) {
35821 gtk_widget_set_mapped(&this, mapped);
35824 // Widgets can be named, which allows you to refer to them from a
35825 // gtkrc file. You can apply a style to widgets with a particular name
35826 // in the gtkrc file. See the documentation for gtkrc files (on the
35827 // same page as the docs for #GtkRcStyle).
35828 // Note that widget names are separated by periods in paths (see
35829 // gtk_widget_path()), so names with embedded periods may cause confusion.
35830 // <name>: name for the widget
35831 void set_name(char* name) {
35832 gtk_widget_set_name(&this, name);
35835 // Sets the #GtkWidget:no-show-all property, which determines whether
35836 // calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect
35837 // this widget.
35838 // This is mostly for use in constructing widget hierarchies with externally
35839 // controlled visibility, see #GtkUIManager.
35840 // <no_show_all>: the new value for the "no-show-all" property
35841 void set_no_show_all(int no_show_all) {
35842 gtk_widget_set_no_show_all(&this, no_show_all);
35845 // This function is useful only when implementing subclasses of
35846 // #GtkContainer.
35847 // Sets the container as the parent of @widget, and takes care of
35848 // some details such as updating the state and style of the child
35849 // to reflect its new location. The opposite function is
35850 // gtk_widget_unparent().
35851 // <parent>: parent container
35852 void set_parent(Widget* parent) {
35853 gtk_widget_set_parent(&this, parent);
35856 // Sets a non default parent window for @widget.
35857 // <parent_window>: the new parent window.
35858 void set_parent_window(Gdk2.Window* parent_window) {
35859 gtk_widget_set_parent_window(&this, parent_window);
35862 // Marks the widget as being realized.
35863 // This function should only ever be called in a derived widget's
35864 // "realize" or "unrealize" implementation.
35865 // <realized>: %TRUE to mark the widget as realized
35866 void set_realized(int realized) {
35867 gtk_widget_set_realized(&this, realized);
35870 // Specifies whether @widget will be treated as the default widget
35871 // within its toplevel when it has the focus, even if another widget
35872 // is the default.
35873 // See gtk_widget_grab_default() for details about the meaning of
35874 // "default".
35875 // <receives_default>: whether or not @widget can be a default widget.
35876 void set_receives_default(int receives_default) {
35877 gtk_widget_set_receives_default(&this, receives_default);
35880 // Sets whether the entire widget is queued for drawing when its size
35881 // allocation changes. By default, this setting is %TRUE and
35882 // the entire widget is redrawn on every size change. If your widget
35883 // leaves the upper left unchanged when made bigger, turning this
35884 // setting off will improve performance.
35885 // Note that for %NO_WINDOW widgets setting this flag to %FALSE turns
35886 // its position changes; this is to allow containers that don't draw
35887 // anything to avoid excess invalidations. If you set this flag on a
35888 // %NO_WINDOW widget that <emphasis>does</emphasis> draw on @widget->window,
35889 // you are responsible for invalidating both the old and new allocation
35890 // of the widget when the widget is moved and responsible for invalidating
35891 // regions newly when the widget increases size.
35892 // <redraw_on_allocate>: if %TRUE, the entire widget will be redrawn when it is allocated to a new size. Otherwise, only the new portion of the widget will be redrawn.
35893 void set_redraw_on_allocate(int redraw_on_allocate) {
35894 gtk_widget_set_redraw_on_allocate(&this, redraw_on_allocate);
35897 // For widgets that support scrolling, sets the scroll adjustments and
35898 // returns %TRUE. For widgets that don't support scrolling, does
35899 // nothing and returns %FALSE. Widgets that don't support scrolling
35900 // can be scrolled by placing them in a #GtkViewport, which does
35901 // support scrolling.
35902 // RETURNS: %TRUE if the widget supports scrolling
35903 // <hadjustment>: an adjustment for horizontal scrolling, or %NULL
35904 // <vadjustment>: an adjustment for vertical scrolling, or %NULL
35905 int set_scroll_adjustments(Adjustment* hadjustment=null, Adjustment* vadjustment=null) {
35906 return gtk_widget_set_scroll_adjustments(&this, hadjustment, vadjustment);
35909 // Sets the sensitivity of a widget. A widget is sensitive if the user
35910 // can interact with it. Insensitive widgets are "grayed out" and the
35911 // user can't interact with them. Insensitive widgets are known as
35912 // "inactive", "disabled", or "ghosted" in some other toolkits.
35913 // <sensitive>: %TRUE to make the widget sensitive
35914 void set_sensitive(int sensitive) {
35915 gtk_widget_set_sensitive(&this, sensitive);
35918 // Sets the minimum size of a widget; that is, the widget's size
35919 // request will be @width by @height. You can use this function to
35920 // force a widget to be either larger or smaller than it normally
35921 // would be.
35922 // In most cases, gtk_window_set_default_size() is a better choice for
35923 // toplevel windows than this function; setting the default size will
35924 // still allow users to shrink the window. Setting the size request
35925 // will force them to leave the window at least as large as the size
35926 // request. When dealing with window sizes,
35927 // gtk_window_set_geometry_hints() can be a useful function as well.
35928 // Note the inherent danger of setting any fixed size - themes,
35929 // translations into other languages, different fonts, and user action
35930 // can all change the appropriate size for a given widget. So, it's
35931 // basically impossible to hardcode a size that will always be
35932 // correct.
35933 // The size request of a widget is the smallest size a widget can
35934 // accept while still functioning well and drawing itself correctly.
35935 // However in some strange cases a widget may be allocated less than
35936 // its requested size, and in many cases a widget may be allocated more
35937 // space than it requested.
35938 // If the size request in a given direction is -1 (unset), then
35939 // the "natural" size request of the widget will be used instead.
35940 // Widgets can't actually be allocated a size less than 1 by 1, but
35941 // you can pass 0,0 to this function to mean "as small as possible."
35942 // <width>: width @widget should request, or -1 to unset
35943 // <height>: height @widget should request, or -1 to unset
35944 void set_size_request(int width, int height) {
35945 gtk_widget_set_size_request(&this, width, height);
35948 // This function is for use in widget implementations. Sets the state
35949 // of a widget (insensitive, prelighted, etc.) Usually you should set
35950 // the state using wrapper functions such as gtk_widget_set_sensitive().
35951 // <state>: new state for @widget
35952 void set_state(StateType state) {
35953 gtk_widget_set_state(&this, state);
35956 // Sets the #GtkStyle for a widget (@widget->style). You probably don't
35957 // want to use this function; it interacts badly with themes, because
35958 // themes work by replacing the #GtkStyle. Instead, use
35959 // gtk_widget_modify_style().
35960 // <style>: a #GtkStyle, or %NULL to remove the effect of a previous gtk_widget_set_style() and go back to the default style
35961 void set_style(Style* style=null) {
35962 gtk_widget_set_style(&this, style);
35965 // Sets @markup as the contents of the tooltip, which is marked up with
35966 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
35967 // This function will take care of setting GtkWidget:has-tooltip to %TRUE
35968 // and of the default handler for the GtkWidget::query-tooltip signal.
35969 // See also the GtkWidget:tooltip-markup property and
35970 // gtk_tooltip_set_markup().
35971 // <markup>: the contents of the tooltip for @widget, or %NULL
35972 void set_tooltip_markup(char* markup=null) {
35973 gtk_widget_set_tooltip_markup(&this, markup);
35976 // Sets @text as the contents of the tooltip. This function will take
35977 // care of setting GtkWidget:has-tooltip to %TRUE and of the default
35978 // handler for the GtkWidget::query-tooltip signal.
35979 // See also the GtkWidget:tooltip-text property and gtk_tooltip_set_text().
35980 // <text>: the contents of the tooltip for @widget
35981 void set_tooltip_text(char* text) {
35982 gtk_widget_set_tooltip_text(&this, text);
35985 // Replaces the default, usually yellow, window used for displaying
35986 // tooltips with @custom_window. GTK+ will take care of showing and
35987 // hiding @custom_window at the right moment, to behave likewise as
35988 // the default tooltip window. If @custom_window is %NULL, the default
35989 // tooltip window will be used.
35990 // If the custom window should have the default theming it needs to
35991 // have the name "gtk-tooltip", see gtk_widget_set_name().
35992 // <custom_window>: a #GtkWindow, or %NULL
35993 void set_tooltip_window(Window* custom_window=null) {
35994 gtk_widget_set_tooltip_window(&this, custom_window);
35997 // Sets the position of a widget. The funny "u" in the name comes from
35998 // the "user position" hint specified by the X Window System, and
35999 // exists for legacy reasons. This function doesn't work if a widget
36000 // is inside a container; it's only really useful on #GtkWindow.
36001 // Don't use this function to center dialogs over the main application
36002 // window; most window managers will do the centering on your behalf
36003 // if you call gtk_window_set_transient_for(), and it's really not
36004 // possible to get the centering to work correctly in all cases from
36005 // application code. But if you insist, use gtk_window_set_position()
36006 // to set #GTK_WIN_POS_CENTER_ON_PARENT, don't do the centering
36007 // manually.
36008 // Note that although @x and @y can be individually unset, the position
36009 // is not honoured unless both @x and @y are set.
36010 // <x>: x position; -1 to unset x; -2 to leave x unchanged
36011 // <y>: y position; -1 to unset y; -2 to leave y unchanged
36012 void set_uposition(int x, int y) {
36013 gtk_widget_set_uposition(&this, x, y);
36016 // Sets the minimum size of a widget; that is, the widget's size
36017 // request will be @width by @height. You can use this function to
36018 // force a widget to be either larger or smaller than it is. The
36019 // strange "usize" name dates from the early days of GTK+, and derives
36020 // from X Window System terminology. In many cases,
36021 // gtk_window_set_default_size() is a better choice for toplevel
36022 // windows than this function; setting the default size will still
36023 // allow users to shrink the window. Setting the usize will force them
36024 // to leave the window at least as large as the usize. When dealing
36025 // with window sizes, gtk_window_set_geometry_hints() can be a useful
36026 // function as well.
36027 // Note the inherent danger of setting any fixed size - themes,
36028 // translations into other languages, different fonts, and user action
36029 // can all change the appropriate size for a given widget. So, it's
36030 // basically impossible to hardcode a size that will always be
36031 // correct.
36032 // <width>: minimum width, or -1 to unset
36033 // <height>: minimum height, or -1 to unset
36034 void set_usize(int width, int height) {
36035 gtk_widget_set_usize(&this, width, height);
36038 // Sets the visibility state of @widget. Note that setting this to
36039 // %TRUE doesn't mean the widget is actually viewable, see
36040 // gtk_widget_get_visible().
36041 // This function simply calls gtk_widget_show() or gtk_widget_hide()
36042 // but is nicer to use when the visibility of the widget depends on
36043 // some condition.
36044 // <visible>: whether the widget should be shown or not
36045 void set_visible(int visible) {
36046 gtk_widget_set_visible(&this, visible);
36049 // Sets a widget's window. This function should only be used in a
36050 // widget's GtkWidget::realize() implementation. The %window passed is
36051 // usually either new window created with gdk_window_new(), or the
36052 // window of its parent widget as returned by
36053 // gtk_widget_get_parent_window().
36054 // Widgets must indicate whether they will create their own #GdkWindow
36055 // by calling gtk_widget_set_has_window(). This is usually done in the
36056 // widget's init() function.
36057 // <window>: a #GdkWindow
36058 void set_window(Gdk2.Window* window) {
36059 gtk_widget_set_window(&this, window);
36062 // Sets a shape for this widget's GDK window. This allows for
36063 // transparent windows etc., see gdk_window_shape_combine_mask()
36064 // for more information.
36065 // <shape_mask>: shape to be added, or %NULL to remove an existing shape
36066 // <offset_x>: X position of shape mask with respect to @window
36067 // <offset_y>: Y position of shape mask with respect to @window
36068 void shape_combine_mask(Gdk2.Bitmap* shape_mask, int offset_x, int offset_y) {
36069 gtk_widget_shape_combine_mask(&this, shape_mask, offset_x, offset_y);
36072 // Flags a widget to be displayed. Any widget that isn't shown will
36073 // not appear on the screen. If you want to show all the widgets in a
36074 // container, it's easier to call gtk_widget_show_all() on the
36075 // container, instead of individually showing the widgets.
36076 // Remember that you have to show the containers containing a widget,
36077 // in addition to the widget itself, before it will appear onscreen.
36078 // When a toplevel container is shown, it is immediately realized and
36079 // mapped; other shown widgets are realized and mapped when their
36080 // toplevel container is realized and mapped.
36081 void show() {
36082 gtk_widget_show(&this);
36085 // Recursively shows a widget, and any child widgets (if the widget is
36086 // a container).
36087 void show_all() {
36088 gtk_widget_show_all(&this);
36091 // Shows a widget. If the widget is an unmapped toplevel widget
36092 // (i.e. a #GtkWindow that has not yet been shown), enter the main
36093 // loop and wait for the window to actually be mapped. Be careful;
36094 // because the main loop is running, anything can happen during
36095 // this function.
36096 void show_now() {
36097 gtk_widget_show_now(&this);
36100 // This function is only used by #GtkContainer subclasses, to assign a size
36101 // and position to their child widgets.
36102 // <allocation>: position and size to be allocated to @widget
36103 void size_allocate(Allocation* allocation) {
36104 gtk_widget_size_allocate(&this, allocation);
36107 // This function is typically used when implementing a #GtkContainer
36108 // subclass. Obtains the preferred size of a widget. The container
36109 // uses this information to arrange its child widgets and decide what
36110 // size allocations to give them with gtk_widget_size_allocate().
36111 // You can also call this function from an application, with some
36112 // caveats. Most notably, getting a size request requires the widget
36113 // to be associated with a screen, because font information may be
36114 // needed. Multihead-aware applications should keep this in mind.
36115 // Also remember that the size request is not necessarily the size
36116 // a widget will actually be allocated.
36117 // See also gtk_widget_get_child_requisition().
36118 // <requisition>: a #GtkRequisition to be filled in
36119 void size_request(Requisition* requisition) {
36120 gtk_widget_size_request(&this, requisition);
36123 // This function attaches the widget's #GtkStyle to the widget's
36124 // #GdkWindow. It is a replacement for
36125 // <programlisting>
36126 // widget->style = gtk_style_attach (widget->style, widget->window);
36127 // </programlisting>
36128 // and should only ever be called in a derived widget's "realize"
36129 // implementation which does not chain up to its parent class'
36130 // "realize" implementation, because one of the parent classes
36131 // (finally #GtkWidget) would attach the style itself.
36132 void style_attach() {
36133 gtk_widget_style_attach(&this);
36136 // Unintrospectable method: style_get() / gtk_widget_style_get()
36137 // Gets the values of a multiple style properties of @widget.
36138 // <first_property_name>: the name of the first property to get
36139 /+ Not available -- variadic methods unsupported - use the C function directly.
36140 alias gtk_widget_style_get style_get; // Variadic
36143 // Gets the value of a style property of @widget.
36144 // <property_name>: the name of a style property
36145 // <value>: location to return the property value
36146 void style_get_property(char* property_name, GObject2.Value* value) {
36147 gtk_widget_style_get_property(&this, property_name, value);
36150 // Unintrospectable method: style_get_valist() / gtk_widget_style_get_valist()
36151 // Non-vararg variant of gtk_widget_style_get(). Used primarily by language
36152 // bindings.
36153 // <first_property_name>: the name of the first property to get
36154 // <var_args>: a <type>va_list</type> of pairs of property names and locations to return the property values, starting with the location for @first_property_name.
36155 void style_get_valist(char* first_property_name, va_list var_args) {
36156 gtk_widget_style_get_valist(&this, first_property_name, var_args);
36159 // Reverts the effect of a previous call to gtk_widget_freeze_child_notify().
36160 // This causes all queued #GtkWidget::child-notify signals on @widget to be
36161 // emitted.
36162 void thaw_child_notify() {
36163 gtk_widget_thaw_child_notify(&this);
36166 // Translate coordinates relative to @src_widget's allocation to coordinates
36167 // relative to @dest_widget's allocations. In order to perform this
36168 // operation, both widgets must be realized, and must share a common
36169 // toplevel.
36170 // was no common ancestor. In this case, nothing is stored in
36171 // *@dest_x and *@dest_y. Otherwise %TRUE.
36172 // RETURNS: %FALSE if either widget was not realized, or there
36173 // <dest_widget>: a #GtkWidget
36174 // <src_x>: X position relative to @src_widget
36175 // <src_y>: Y position relative to @src_widget
36176 // <dest_x>: location to store X position relative to @dest_widget
36177 // <dest_y>: location to store Y position relative to @dest_widget
36178 int translate_coordinates(Widget* dest_widget, int src_x, int src_y, /*out*/ int* dest_x, /*out*/ int* dest_y) {
36179 return gtk_widget_translate_coordinates(&this, dest_widget, src_x, src_y, dest_x, dest_y);
36182 // Triggers a tooltip query on the display where the toplevel of @widget
36183 // is located. See gtk_tooltip_trigger_tooltip_query() for more
36184 // information.
36185 void trigger_tooltip_query() {
36186 gtk_widget_trigger_tooltip_query(&this);
36189 // This function is only for use in widget implementations. Causes
36190 // a widget to be unmapped if it's currently mapped.
36191 void unmap() {
36192 gtk_widget_unmap(&this);
36195 // This function is only for use in widget implementations.
36196 // Should be called by implementations of the remove method
36197 // on #GtkContainer, to dissociate a child from the container.
36198 void unparent() {
36199 gtk_widget_unparent(&this);
36202 // This function is only useful in widget implementations.
36203 // Causes a widget to be unrealized (frees all GDK resources
36204 // associated with the widget, such as @widget->window).
36205 void unrealize() {
36206 gtk_widget_unrealize(&this);
36208 // Inverse of gtk_widget_ref(). Equivalent to g_object_unref().
36209 void unref() {
36210 gtk_widget_unref(&this);
36212 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_accel_closures_changed;
36214 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36215 return super_.signal_connect!name(cb, data, cf);
36218 ulong signal_connect(string name:"accel-closures-changed", CB/*:signal_accel_closures_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36219 return signal_connect_data(&this, cast(char*)"accel-closures-changed",
36220 cast(GObject2.Callback)cb, data, null, cf);
36223 // The ::button-press-event signal will be emitted when a button
36224 // (typically from a mouse) is pressed.
36225 // To receive this signal, the #GdkWindow associated to the
36226 // widget needs to enable the #GDK_BUTTON_PRESS_MASK mask.
36227 // This signal will be sent to the grab widget if there is one.
36228 // %FALSE to propagate the event further.
36229 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36230 // <event>: the #GdkEventButton which triggered this signal.
36231 extern (C) alias static c_int function (Widget* this_, Gdk2.EventButton* event, void* user_data=null) signal_button_press_event;
36232 ulong signal_connect(string name:"button-press-event", CB/*:signal_button_press_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36233 return signal_connect_data(&this, cast(char*)"button-press-event",
36234 cast(GObject2.Callback)cb, data, null, cf);
36237 // The ::button-release-event signal will be emitted when a button
36238 // (typically from a mouse) is released.
36239 // To receive this signal, the #GdkWindow associated to the
36240 // widget needs to enable the #GDK_BUTTON_RELEASE_MASK mask.
36241 // This signal will be sent to the grab widget if there is one.
36242 // %FALSE to propagate the event further.
36243 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36244 // <event>: the #GdkEventButton which triggered this signal.
36245 extern (C) alias static c_int function (Widget* this_, Gdk2.EventButton* event, void* user_data=null) signal_button_release_event;
36246 ulong signal_connect(string name:"button-release-event", CB/*:signal_button_release_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36247 return signal_connect_data(&this, cast(char*)"button-release-event",
36248 cast(GObject2.Callback)cb, data, null, cf);
36251 // Determines whether an accelerator that activates the signal
36252 // identified by @signal_id can currently be activated.
36253 // This signal is present to allow applications and derived
36254 // widgets to override the default #GtkWidget handling
36255 // for determining whether an accelerator can be activated.
36256 // RETURNS: %TRUE if the signal can be activated.
36257 // <signal_id>: the ID of a signal installed on @widget
36258 extern (C) alias static c_int function (Widget* this_, c_uint signal_id, void* user_data=null) signal_can_activate_accel;
36259 ulong signal_connect(string name:"can-activate-accel", CB/*:signal_can_activate_accel*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36260 return signal_connect_data(&this, cast(char*)"can-activate-accel",
36261 cast(GObject2.Callback)cb, data, null, cf);
36264 // Unintrospectable glib:signal: child-notify() / ()
36265 // The ::child-notify signal is emitted for each
36266 // <link linkend="child-properties">child property</link> that has
36267 // changed on an object. The signal's detail holds the property name.
36268 // <pspec>: the #GParamSpec of the changed child property
36269 extern (C) alias static void function (Widget* this_, void* pspec, void* user_data=null) signal_child_notify;
36270 ulong signal_connect(string name:"child-notify", CB/*:signal_child_notify*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36271 return signal_connect_data(&this, cast(char*)"child-notify",
36272 cast(GObject2.Callback)cb, data, null, cf);
36275 // The ::client-event will be emitted when the @widget's window
36276 // receives a message (via a ClientMessage event) from another
36277 // application.
36278 // the event. %FALSE to propagate the event further.
36279 // RETURNS: %TRUE to stop other handlers from being invoked for
36280 // <event>: the #GdkEventClient which triggered this signal.
36281 extern (C) alias static c_int function (Widget* this_, Gdk2.EventClient* event, void* user_data=null) signal_client_event;
36282 ulong signal_connect(string name:"client-event", CB/*:signal_client_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36283 return signal_connect_data(&this, cast(char*)"client-event",
36284 cast(GObject2.Callback)cb, data, null, cf);
36287 // The ::composited-changed signal is emitted when the composited
36288 // status of @widget<!-- -->s screen changes.
36289 // See gdk_screen_is_composited().
36290 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_composited_changed;
36291 ulong signal_connect(string name:"composited-changed", CB/*:signal_composited_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36292 return signal_connect_data(&this, cast(char*)"composited-changed",
36293 cast(GObject2.Callback)cb, data, null, cf);
36296 // The ::configure-event signal will be emitted when the size, position or
36297 // stacking of the @widget's window has changed.
36298 // To receive this signal, the #GdkWindow associated to the widget needs
36299 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
36300 // automatically for all new windows.
36301 // %FALSE to propagate the event further.
36302 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36303 // <event>: the #GdkEventConfigure which triggered this signal.
36304 extern (C) alias static c_int function (Widget* this_, Gdk2.EventConfigure* event, void* user_data=null) signal_configure_event;
36305 ulong signal_connect(string name:"configure-event", CB/*:signal_configure_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36306 return signal_connect_data(&this, cast(char*)"configure-event",
36307 cast(GObject2.Callback)cb, data, null, cf);
36310 // Emitted when a redirected window belonging to @widget gets drawn into.
36311 // The region/area members of the event shows what area of the redirected
36312 // drawable was drawn into.
36313 // %FALSE to propagate the event further.
36314 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36315 // <event>: the #GdkEventExpose event
36316 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_damage_event;
36317 ulong signal_connect(string name:"damage-event", CB/*:signal_damage_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36318 return signal_connect_data(&this, cast(char*)"damage-event",
36319 cast(GObject2.Callback)cb, data, null, cf);
36322 // The ::delete-event signal is emitted if a user requests that
36323 // a toplevel window is closed. The default handler for this signal
36324 // destroys the window. Connecting gtk_widget_hide_on_delete() to
36325 // this signal will cause the window to be hidden instead, so that
36326 // it can later be shown again without reconstructing it.
36327 // %FALSE to propagate the event further.
36328 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36329 // <event>: the event which triggered this signal
36330 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_delete_event;
36331 ulong signal_connect(string name:"delete-event", CB/*:signal_delete_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36332 return signal_connect_data(&this, cast(char*)"delete-event",
36333 cast(GObject2.Callback)cb, data, null, cf);
36336 // The ::destroy-event signal is emitted when a #GdkWindow is destroyed.
36337 // You rarely get this signal, because most widgets disconnect themselves
36338 // from their window before they destroy it, so no widget owns the
36339 // window at destroy time.
36340 // To receive this signal, the #GdkWindow associated to the widget needs
36341 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
36342 // automatically for all new windows.
36343 // %FALSE to propagate the event further.
36344 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36345 // <event>: the event which triggered this signal
36346 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_destroy_event;
36347 ulong signal_connect(string name:"destroy-event", CB/*:signal_destroy_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36348 return signal_connect_data(&this, cast(char*)"destroy-event",
36349 cast(GObject2.Callback)cb, data, null, cf);
36352 // The ::direction-changed signal is emitted when the text direction
36353 // of a widget changes.
36354 // <previous_direction>: the previous text direction of @widget
36355 extern (C) alias static void function (Widget* this_, TextDirection* previous_direction, void* user_data=null) signal_direction_changed;
36356 ulong signal_connect(string name:"direction-changed", CB/*:signal_direction_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36357 return signal_connect_data(&this, cast(char*)"direction-changed",
36358 cast(GObject2.Callback)cb, data, null, cf);
36361 // The ::drag-begin signal is emitted on the drag source when a drag is
36362 // started. A typical reason to connect to this signal is to set up a
36363 // custom drag icon with gtk_drag_source_set_icon().
36364 // Note that some widgets set up a drag icon in the default handler of
36365 // this signal, so you may have to use g_signal_connect_after() to
36366 // override what the default handler did.
36367 // <drag_context>: the drag context
36368 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) signal_drag_begin;
36369 ulong signal_connect(string name:"drag-begin", CB/*:signal_drag_begin*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36370 return signal_connect_data(&this, cast(char*)"drag-begin",
36371 cast(GObject2.Callback)cb, data, null, cf);
36374 // The ::drag-data-delete signal is emitted on the drag source when a drag
36375 // with the action %GDK_ACTION_MOVE is successfully completed. The signal
36376 // handler is responsible for deleting the data that has been dropped. What
36377 // "delete" means depends on the context of the drag operation.
36378 // <drag_context>: the drag context
36379 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) signal_drag_data_delete;
36380 ulong signal_connect(string name:"drag-data-delete", CB/*:signal_drag_data_delete*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36381 return signal_connect_data(&this, cast(char*)"drag-data-delete",
36382 cast(GObject2.Callback)cb, data, null, cf);
36385 // The ::drag-data-get signal is emitted on the drag source when the drop
36386 // site requests the data which is dragged. It is the responsibility of
36387 // the signal handler to fill @data with the data in the format which
36388 // is indicated by @info. See gtk_selection_data_set() and
36389 // gtk_selection_data_set_text().
36390 // <drag_context>: the drag context
36391 // <data>: the #GtkSelectionData to be filled with the dragged data
36392 // <info>: the info that has been registered with the target in the #GtkTargetList
36393 // <time>: the timestamp at which the data was requested
36394 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, SelectionData* data, c_uint info, c_uint time, void* user_data=null) signal_drag_data_get;
36395 ulong signal_connect(string name:"drag-data-get", CB/*:signal_drag_data_get*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36396 return signal_connect_data(&this, cast(char*)"drag-data-get",
36397 cast(GObject2.Callback)cb, data, null, cf);
36400 // The ::drag-data-received signal is emitted on the drop site when the
36401 // dragged data has been received. If the data was received in order to
36402 // determine whether the drop will be accepted, the handler is expected
36403 // to call gdk_drag_status() and <emphasis>not</emphasis> finish the drag.
36404 // If the data was received in response to a #GtkWidget::drag-drop signal
36405 // (and this is the last target to be received), the handler for this
36406 // signal is expected to process the received data and then call
36407 // gtk_drag_finish(), setting the @success parameter depending on whether
36408 // the data was processed successfully.
36409 // The handler may inspect and modify @drag_context->action before calling
36410 // gtk_drag_finish(), e.g. to implement %GDK_ACTION_ASK as shown in the
36411 // following example:
36412 // |[
36413 // void
36414 // drag_data_received (GtkWidget *widget,
36415 // GdkDragContext *drag_context,
36416 // gint x,
36417 // gint y,
36418 // GtkSelectionData *data,
36419 // guint info,
36420 // guint time)
36421 // {
36422 // if ((data->length >= 0) && (data->format == 8))
36423 // {
36424 // if (drag_context->action == GDK_ACTION_ASK)
36425 // {
36426 // GtkWidget *dialog;
36427 // gint response;
36428 // dialog = gtk_message_dialog_new (NULL,
36429 // GTK_DIALOG_MODAL |
36430 // GTK_DIALOG_DESTROY_WITH_PARENT,
36431 // GTK_MESSAGE_INFO,
36432 // GTK_BUTTONS_YES_NO,
36433 // "Move the data ?\n");
36434 // response = gtk_dialog_run (GTK_DIALOG (dialog));
36435 // gtk_widget_destroy (dialog);
36436 // if (response == GTK_RESPONSE_YES)
36437 // drag_context->action = GDK_ACTION_MOVE;
36438 // else
36439 // drag_context->action = GDK_ACTION_COPY;
36440 // }
36441 // gtk_drag_finish (drag_context, TRUE, FALSE, time);
36442 // return;
36443 // }
36444 // gtk_drag_finish (drag_context, FALSE, FALSE, time);
36445 // }
36446 // ]|
36447 // <drag_context>: the drag context
36448 // <x>: where the drop happened
36449 // <y>: where the drop happened
36450 // <data>: the received data
36451 // <info>: the info that has been registered with the target in the #GtkTargetList
36452 // <time>: the timestamp at which the data was received
36453 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, SelectionData* data, c_uint info, c_uint time, void* user_data=null) signal_drag_data_received;
36454 ulong signal_connect(string name:"drag-data-received", CB/*:signal_drag_data_received*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36455 return signal_connect_data(&this, cast(char*)"drag-data-received",
36456 cast(GObject2.Callback)cb, data, null, cf);
36459 // The ::drag-drop signal is emitted on the drop site when the user drops
36460 // the data onto the widget. The signal handler must determine whether
36461 // the cursor position is in a drop zone or not. If it is not in a drop
36462 // zone, it returns %FALSE and no further processing is necessary.
36463 // Otherwise, the handler returns %TRUE. In this case, the handler must
36464 // ensure that gtk_drag_finish() is called to let the source know that
36465 // the drop is done. The call to gtk_drag_finish() can be done either
36466 // directly or in a #GtkWidget::drag-data-received handler which gets
36467 // triggered by calling gtk_drag_get_data() to receive the data for one
36468 // or more of the supported targets.
36469 // RETURNS: whether the cursor position is in a drop zone
36470 // <drag_context>: the drag context
36471 // <x>: the x coordinate of the current cursor position
36472 // <y>: the y coordinate of the current cursor position
36473 // <time>: the timestamp of the motion event
36474 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, c_uint time, void* user_data=null) signal_drag_drop;
36475 ulong signal_connect(string name:"drag-drop", CB/*:signal_drag_drop*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36476 return signal_connect_data(&this, cast(char*)"drag-drop",
36477 cast(GObject2.Callback)cb, data, null, cf);
36480 // The ::drag-end signal is emitted on the drag source when a drag is
36481 // finished. A typical reason to connect to this signal is to undo
36482 // things done in #GtkWidget::drag-begin.
36483 // <drag_context>: the drag context
36484 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) signal_drag_end;
36485 ulong signal_connect(string name:"drag-end", CB/*:signal_drag_end*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36486 return signal_connect_data(&this, cast(char*)"drag-end",
36487 cast(GObject2.Callback)cb, data, null, cf);
36490 // The ::drag-failed signal is emitted on the drag source when a drag has
36491 // failed. The signal handler may hook custom code to handle a failed DND
36492 // operation based on the type of error, it returns %TRUE is the failure has
36493 // been already handled (not showing the default "drag operation failed"
36494 // animation), otherwise it returns %FALSE.
36495 // RETURNS: %TRUE if the failed drag operation has been already handled.
36496 // <drag_context>: the drag context
36497 // <result>: the result of the drag operation
36498 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, DragResult* result, void* user_data=null) signal_drag_failed;
36499 ulong signal_connect(string name:"drag-failed", CB/*:signal_drag_failed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36500 return signal_connect_data(&this, cast(char*)"drag-failed",
36501 cast(GObject2.Callback)cb, data, null, cf);
36504 // The ::drag-leave signal is emitted on the drop site when the cursor
36505 // leaves the widget. A typical reason to connect to this signal is to
36506 // undo things done in #GtkWidget::drag-motion, e.g. undo highlighting
36507 // with gtk_drag_unhighlight()
36508 // <drag_context>: the drag context
36509 // <time>: the timestamp of the motion event
36510 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, c_uint time, void* user_data=null) signal_drag_leave;
36511 ulong signal_connect(string name:"drag-leave", CB/*:signal_drag_leave*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36512 return signal_connect_data(&this, cast(char*)"drag-leave",
36513 cast(GObject2.Callback)cb, data, null, cf);
36516 // The drag-motion signal is emitted on the drop site when the user
36517 // moves the cursor over the widget during a drag. The signal handler
36518 // must determine whether the cursor position is in a drop zone or not.
36519 // If it is not in a drop zone, it returns %FALSE and no further processing
36520 // is necessary. Otherwise, the handler returns %TRUE. In this case, the
36521 // handler is responsible for providing the necessary information for
36522 // displaying feedback to the user, by calling gdk_drag_status().
36523 // If the decision whether the drop will be accepted or rejected can't be
36524 // made based solely on the cursor position and the type of the data, the
36525 // handler may inspect the dragged data by calling gtk_drag_get_data() and
36526 // defer the gdk_drag_status() call to the #GtkWidget::drag-data-received
36527 // handler. Note that you cannot not pass #GTK_DEST_DEFAULT_DROP,
36528 // #GTK_DEST_DEFAULT_MOTION or #GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set()
36529 // when using the drag-motion signal that way.
36530 // Also note that there is no drag-enter signal. The drag receiver has to
36531 // keep track of whether he has received any drag-motion signals since the
36532 // last #GtkWidget::drag-leave and if not, treat the drag-motion signal as
36533 // an "enter" signal. Upon an "enter", the handler will typically highlight
36534 // the drop site with gtk_drag_highlight().
36535 // |[
36536 // static void
36537 // drag_motion (GtkWidget *widget,
36538 // GdkDragContext *context,
36539 // gint x,
36540 // gint y,
36541 // guint time)
36542 // {
36543 // GdkAtom target;
36544 // PrivateData *private_data = GET_PRIVATE_DATA (widget);
36545 // if (!private_data->drag_highlight)
36546 // {
36547 // private_data->drag_highlight = 1;
36548 // gtk_drag_highlight (widget);
36549 // }
36550 // target = gtk_drag_dest_find_target (widget, context, NULL);
36551 // if (target == GDK_NONE)
36552 // gdk_drag_status (context, 0, time);
36553 // else
36554 // {
36555 // private_data->pending_status = context->suggested_action;
36556 // gtk_drag_get_data (widget, context, target, time);
36557 // }
36558 // return TRUE;
36559 // }
36560 // static void
36561 // drag_data_received (GtkWidget *widget,
36562 // GdkDragContext *context,
36563 // gint x,
36564 // gint y,
36565 // GtkSelectionData *selection_data,
36566 // guint info,
36567 // guint time)
36568 // {
36569 // PrivateData *private_data = GET_PRIVATE_DATA (widget);
36570 // if (private_data->suggested_action)
36571 // {
36572 // private_data->suggested_action = 0;
36573 // /&ast; We are getting this data due to a request in drag_motion,
36574 // * rather than due to a request in drag_drop, so we are just
36575 // * supposed to call gdk_drag_status (), not actually paste in
36576 // * the data.
36577 // &ast;/
36578 // str = gtk_selection_data_get_text (selection_data);
36579 // if (!data_is_acceptable (str))
36580 // gdk_drag_status (context, 0, time);
36581 // else
36582 // gdk_drag_status (context, private_data->suggested_action, time);
36583 // }
36584 // else
36585 // {
36586 // /&ast; accept the drop &ast;/
36587 // }
36588 // }
36589 // ]|
36590 // RETURNS: whether the cursor position is in a drop zone
36591 // <drag_context>: the drag context
36592 // <x>: the x coordinate of the current cursor position
36593 // <y>: the y coordinate of the current cursor position
36594 // <time>: the timestamp of the motion event
36595 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, c_uint time, void* user_data=null) signal_drag_motion;
36596 ulong signal_connect(string name:"drag-motion", CB/*:signal_drag_motion*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36597 return signal_connect_data(&this, cast(char*)"drag-motion",
36598 cast(GObject2.Callback)cb, data, null, cf);
36601 // The ::enter-notify-event will be emitted when the pointer enters
36602 // the @widget's window.
36603 // To receive this signal, the #GdkWindow associated to the widget needs
36604 // to enable the #GDK_ENTER_NOTIFY_MASK mask.
36605 // This signal will be sent to the grab widget if there is one.
36606 // %FALSE to propagate the event further.
36607 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36608 // <event>: the #GdkEventCrossing which triggered this signal.
36609 extern (C) alias static c_int function (Widget* this_, Gdk2.EventCrossing* event, void* user_data=null) signal_enter_notify_event;
36610 ulong signal_connect(string name:"enter-notify-event", CB/*:signal_enter_notify_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36611 return signal_connect_data(&this, cast(char*)"enter-notify-event",
36612 cast(GObject2.Callback)cb, data, null, cf);
36615 // The GTK+ main loop will emit three signals for each GDK event delivered
36616 // signal that matches the type of event delivered (e.g.
36617 // #GtkWidget::key-press-event) and finally a generic
36618 // #GtkWidget::event-after signal.
36619 // and to cancel the emission of the second specific ::event signal.
36620 // %FALSE to propagate the event further and to allow the emission of
36621 // the second signal. The ::event-after signal is emitted regardless of
36622 // the return value.
36623 // RETURNS: %TRUE to stop other handlers from being invoked for the event
36624 // <event>: the #GdkEvent which triggered this signal
36625 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_event;
36626 ulong signal_connect(string name:"event", CB/*:signal_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36627 return signal_connect_data(&this, cast(char*)"event",
36628 cast(GObject2.Callback)cb, data, null, cf);
36631 // After the emission of the #GtkWidget::event signal and (optionally)
36632 // the second more specific signal, ::event-after will be emitted
36633 // regardless of the previous two signals handlers return values.
36634 // <event>: the #GdkEvent which triggered this signal
36635 extern (C) alias static void function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_event_after;
36636 ulong signal_connect(string name:"event-after", CB/*:signal_event_after*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36637 return signal_connect_data(&this, cast(char*)"event-after",
36638 cast(GObject2.Callback)cb, data, null, cf);
36641 // The ::expose-event signal is emitted when an area of a previously
36642 // obscured #GdkWindow is made visible and needs to be redrawn.
36643 // #GTK_NO_WINDOW widgets will get a synthesized event from their parent
36644 // widget.
36645 // To receive this signal, the #GdkWindow associated to the widget needs
36646 // to enable the #GDK_EXPOSURE_MASK mask.
36647 // Note that the ::expose-event signal has been replaced by a ::draw
36648 // signal in GTK+ 3. The <link linkend="http://library.gnome.org/devel/gtk3/3.0/gtk-migrating-2-to-3.html">GTK+ 3 migration guide</link>
36649 // for hints on how to port from ::expose-event to ::draw.
36650 // %FALSE to propagate the event further.
36651 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36652 // <event>: the #GdkEventExpose which triggered this signal.
36653 extern (C) alias static c_int function (Widget* this_, Gdk2.EventExpose* event, void* user_data=null) signal_expose_event;
36654 ulong signal_connect(string name:"expose-event", CB/*:signal_expose_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36655 return signal_connect_data(&this, cast(char*)"expose-event",
36656 cast(GObject2.Callback)cb, data, null, cf);
36659 // RETURNS: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
36660 // <returns>: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
36661 extern (C) alias static c_int function (Widget* this_, DirectionType* returns, void* user_data=null) signal_focus;
36662 ulong signal_connect(string name:"focus", CB/*:signal_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36663 return signal_connect_data(&this, cast(char*)"focus",
36664 cast(GObject2.Callback)cb, data, null, cf);
36667 // The ::focus-in-event signal will be emitted when the keyboard focus
36668 // enters the @widget's window.
36669 // To receive this signal, the #GdkWindow associated to the widget needs
36670 // to enable the #GDK_FOCUS_CHANGE_MASK mask.
36671 // %FALSE to propagate the event further.
36672 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36673 // <event>: the #GdkEventFocus which triggered this signal.
36674 extern (C) alias static c_int function (Widget* this_, Gdk2.EventFocus* event, void* user_data=null) signal_focus_in_event;
36675 ulong signal_connect(string name:"focus-in-event", CB/*:signal_focus_in_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36676 return signal_connect_data(&this, cast(char*)"focus-in-event",
36677 cast(GObject2.Callback)cb, data, null, cf);
36680 // The ::focus-out-event signal will be emitted when the keyboard focus
36681 // leaves the @widget's window.
36682 // To receive this signal, the #GdkWindow associated to the widget needs
36683 // to enable the #GDK_FOCUS_CHANGE_MASK mask.
36684 // %FALSE to propagate the event further.
36685 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36686 // <event>: the #GdkEventFocus which triggered this signal.
36687 extern (C) alias static c_int function (Widget* this_, Gdk2.EventFocus* event, void* user_data=null) signal_focus_out_event;
36688 ulong signal_connect(string name:"focus-out-event", CB/*:signal_focus_out_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36689 return signal_connect_data(&this, cast(char*)"focus-out-event",
36690 cast(GObject2.Callback)cb, data, null, cf);
36693 // Emitted when a pointer or keyboard grab on a window belonging
36694 // to @widget gets broken.
36695 // On X11, this happens when the grab window becomes unviewable
36696 // (i.e. it or one of its ancestors is unmapped), or if the same
36697 // application grabs the pointer or keyboard again.
36698 // the event. %FALSE to propagate the event further.
36699 // RETURNS: %TRUE to stop other handlers from being invoked for
36700 // <event>: the #GdkEventGrabBroken event
36701 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_grab_broken_event;
36702 ulong signal_connect(string name:"grab-broken-event", CB/*:signal_grab_broken_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36703 return signal_connect_data(&this, cast(char*)"grab-broken-event",
36704 cast(GObject2.Callback)cb, data, null, cf);
36706 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_grab_focus;
36707 ulong signal_connect(string name:"grab-focus", CB/*:signal_grab_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36708 return signal_connect_data(&this, cast(char*)"grab-focus",
36709 cast(GObject2.Callback)cb, data, null, cf);
36712 // The ::grab-notify signal is emitted when a widget becomes
36713 // shadowed by a GTK+ grab (not a pointer or keyboard grab) on
36714 // another widget, or when it becomes unshadowed due to a grab
36715 // being removed.
36716 // A widget is shadowed by a gtk_grab_add() when the topmost
36717 // grab widget in the grab stack of its window group is not
36718 // its ancestor.
36719 // <was_grabbed>: %FALSE if the widget becomes shadowed, %TRUE if it becomes unshadowed
36720 extern (C) alias static void function (Widget* this_, c_int was_grabbed, void* user_data=null) signal_grab_notify;
36721 ulong signal_connect(string name:"grab-notify", CB/*:signal_grab_notify*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36722 return signal_connect_data(&this, cast(char*)"grab-notify",
36723 cast(GObject2.Callback)cb, data, null, cf);
36725 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_hide;
36726 ulong signal_connect(string name:"hide", CB/*:signal_hide*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36727 return signal_connect_data(&this, cast(char*)"hide",
36728 cast(GObject2.Callback)cb, data, null, cf);
36731 // The ::hierarchy-changed signal is emitted when the
36732 // anchored state of a widget changes. A widget is
36733 // <firstterm>anchored</firstterm> when its toplevel
36734 // ancestor is a #GtkWindow. This signal is emitted when
36735 // a widget changes from un-anchored to anchored or vice-versa.
36736 // <previous_toplevel>: the previous toplevel ancestor, or %NULL if the widget was previously unanchored
36737 extern (C) alias static void function (Widget* this_, Widget* previous_toplevel=null, void* user_data=null) signal_hierarchy_changed;
36738 ulong signal_connect(string name:"hierarchy-changed", CB/*:signal_hierarchy_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36739 return signal_connect_data(&this, cast(char*)"hierarchy-changed",
36740 cast(GObject2.Callback)cb, data, null, cf);
36743 // The ::key-press-event signal is emitted when a key is pressed.
36744 // To receive this signal, the #GdkWindow associated to the widget needs
36745 // to enable the #GDK_KEY_PRESS_MASK mask.
36746 // This signal will be sent to the grab widget if there is one.
36747 // %FALSE to propagate the event further.
36748 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36749 // <event>: the #GdkEventKey which triggered this signal.
36750 extern (C) alias static c_int function (Widget* this_, Gdk2.EventKey* event, void* user_data=null) signal_key_press_event;
36751 ulong signal_connect(string name:"key-press-event", CB/*:signal_key_press_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36752 return signal_connect_data(&this, cast(char*)"key-press-event",
36753 cast(GObject2.Callback)cb, data, null, cf);
36756 // The ::key-release-event signal is emitted when a key is pressed.
36757 // To receive this signal, the #GdkWindow associated to the widget needs
36758 // to enable the #GDK_KEY_RELEASE_MASK mask.
36759 // This signal will be sent to the grab widget if there is one.
36760 // %FALSE to propagate the event further.
36761 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36762 // <event>: the #GdkEventKey which triggered this signal.
36763 extern (C) alias static c_int function (Widget* this_, Gdk2.EventKey* event, void* user_data=null) signal_key_release_event;
36764 ulong signal_connect(string name:"key-release-event", CB/*:signal_key_release_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36765 return signal_connect_data(&this, cast(char*)"key-release-event",
36766 cast(GObject2.Callback)cb, data, null, cf);
36769 // Gets emitted if keyboard navigation fails.
36770 // See gtk_widget_keynav_failed() for details.
36771 // if the emitting widget should try to handle the keyboard
36772 // navigation attempt in its parent container(s).
36773 // RETURNS: %TRUE if stopping keyboard navigation is fine, %FALSE
36774 // <direction>: the direction of movement
36775 extern (C) alias static c_int function (Widget* this_, DirectionType* direction, void* user_data=null) signal_keynav_failed;
36776 ulong signal_connect(string name:"keynav-failed", CB/*:signal_keynav_failed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36777 return signal_connect_data(&this, cast(char*)"keynav-failed",
36778 cast(GObject2.Callback)cb, data, null, cf);
36781 // The ::leave-notify-event will be emitted when the pointer leaves
36782 // the @widget's window.
36783 // To receive this signal, the #GdkWindow associated to the widget needs
36784 // to enable the #GDK_LEAVE_NOTIFY_MASK mask.
36785 // This signal will be sent to the grab widget if there is one.
36786 // %FALSE to propagate the event further.
36787 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36788 // <event>: the #GdkEventCrossing which triggered this signal.
36789 extern (C) alias static c_int function (Widget* this_, Gdk2.EventCrossing* event, void* user_data=null) signal_leave_notify_event;
36790 ulong signal_connect(string name:"leave-notify-event", CB/*:signal_leave_notify_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36791 return signal_connect_data(&this, cast(char*)"leave-notify-event",
36792 cast(GObject2.Callback)cb, data, null, cf);
36794 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_map;
36795 ulong signal_connect(string name:"map", CB/*:signal_map*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36796 return signal_connect_data(&this, cast(char*)"map",
36797 cast(GObject2.Callback)cb, data, null, cf);
36800 // The ::map-event signal will be emitted when the @widget's window is
36801 // mapped. A window is mapped when it becomes visible on the screen.
36802 // To receive this signal, the #GdkWindow associated to the widget needs
36803 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
36804 // automatically for all new windows.
36805 // %FALSE to propagate the event further.
36806 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36807 // <event>: the #GdkEventAny which triggered this signal.
36808 extern (C) alias static c_int function (Widget* this_, Gdk2.EventAny* event, void* user_data=null) signal_map_event;
36809 ulong signal_connect(string name:"map-event", CB/*:signal_map_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36810 return signal_connect_data(&this, cast(char*)"map-event",
36811 cast(GObject2.Callback)cb, data, null, cf);
36813 extern (C) alias static c_int function (Widget* this_, c_int object, void* user_data=null) signal_mnemonic_activate;
36814 ulong signal_connect(string name:"mnemonic-activate", CB/*:signal_mnemonic_activate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36815 return signal_connect_data(&this, cast(char*)"mnemonic-activate",
36816 cast(GObject2.Callback)cb, data, null, cf);
36819 // The ::motion-notify-event signal is emitted when the pointer moves
36820 // over the widget's #GdkWindow.
36821 // To receive this signal, the #GdkWindow associated to the widget
36822 // needs to enable the #GDK_POINTER_MOTION_MASK mask.
36823 // This signal will be sent to the grab widget if there is one.
36824 // %FALSE to propagate the event further.
36825 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36826 // <event>: the #GdkEventMotion which triggered this signal.
36827 extern (C) alias static c_int function (Widget* this_, Gdk2.EventMotion* event, void* user_data=null) signal_motion_notify_event;
36828 ulong signal_connect(string name:"motion-notify-event", CB/*:signal_motion_notify_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36829 return signal_connect_data(&this, cast(char*)"motion-notify-event",
36830 cast(GObject2.Callback)cb, data, null, cf);
36832 extern (C) alias static void function (Widget* this_, DirectionType* object, void* user_data=null) signal_move_focus;
36833 ulong signal_connect(string name:"move-focus", CB/*:signal_move_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36834 return signal_connect_data(&this, cast(char*)"move-focus",
36835 cast(GObject2.Callback)cb, data, null, cf);
36838 // The ::no-expose-event will be emitted when the @widget's window is
36839 // drawn as a copy of another #GdkDrawable (with gdk_draw_drawable() or
36840 // gdk_window_copy_area()) which was completely unobscured. If the source
36841 // window was partially obscured #GdkEventExpose events will be generated
36842 // for those areas.
36843 // %FALSE to propagate the event further.
36844 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36845 // <event>: the #GdkEventNoExpose which triggered this signal.
36846 extern (C) alias static c_int function (Widget* this_, Gdk2.EventNoExpose* event, void* user_data=null) signal_no_expose_event;
36847 ulong signal_connect(string name:"no-expose-event", CB/*:signal_no_expose_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36848 return signal_connect_data(&this, cast(char*)"no-expose-event",
36849 cast(GObject2.Callback)cb, data, null, cf);
36852 // The ::parent-set signal is emitted when a new parent
36853 // has been set on a widget.
36854 // <old_parent>: the previous parent, or %NULL if the widget just got its initial parent.
36855 extern (C) alias static void function (Widget* this_, Widget* old_parent=null, void* user_data=null) signal_parent_set;
36856 ulong signal_connect(string name:"parent-set", CB/*:signal_parent_set*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36857 return signal_connect_data(&this, cast(char*)"parent-set",
36858 cast(GObject2.Callback)cb, data, null, cf);
36861 // This signal gets emitted whenever a widget should pop up a context
36862 // menu. This usually happens through the standard key binding mechanism;
36863 // by pressing a certain key while a widget is focused, the user can cause
36864 // the widget to pop up a menu. For example, the #GtkEntry widget creates
36865 // a menu with clipboard commands. See <xref linkend="checklist-popup-menu"/>
36866 // for an example of how to use this signal.
36867 // RETURNS: %TRUE if a menu was activated
36868 extern (C) alias static c_int function (Widget* this_, void* user_data=null) signal_popup_menu;
36869 ulong signal_connect(string name:"popup-menu", CB/*:signal_popup_menu*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36870 return signal_connect_data(&this, cast(char*)"popup-menu",
36871 cast(GObject2.Callback)cb, data, null, cf);
36874 // The ::property-notify-event signal will be emitted when a property on
36875 // the @widget's window has been changed or deleted.
36876 // To receive this signal, the #GdkWindow associated to the widget needs
36877 // to enable the #GDK_PROPERTY_CHANGE_MASK mask.
36878 // %FALSE to propagate the event further.
36879 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36880 // <event>: the #GdkEventProperty which triggered this signal.
36881 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProperty* event, void* user_data=null) signal_property_notify_event;
36882 ulong signal_connect(string name:"property-notify-event", CB/*:signal_property_notify_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36883 return signal_connect_data(&this, cast(char*)"property-notify-event",
36884 cast(GObject2.Callback)cb, data, null, cf);
36887 // To receive this signal the #GdkWindow associated to the widget needs
36888 // to enable the #GDK_PROXIMITY_IN_MASK mask.
36889 // This signal will be sent to the grab widget if there is one.
36890 // %FALSE to propagate the event further.
36891 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36892 // <event>: the #GdkEventProximity which triggered this signal.
36893 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProximity* event, void* user_data=null) signal_proximity_in_event;
36894 ulong signal_connect(string name:"proximity-in-event", CB/*:signal_proximity_in_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36895 return signal_connect_data(&this, cast(char*)"proximity-in-event",
36896 cast(GObject2.Callback)cb, data, null, cf);
36899 // To receive this signal the #GdkWindow associated to the widget needs
36900 // to enable the #GDK_PROXIMITY_OUT_MASK mask.
36901 // This signal will be sent to the grab widget if there is one.
36902 // %FALSE to propagate the event further.
36903 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36904 // <event>: the #GdkEventProximity which triggered this signal.
36905 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProximity* event, void* user_data=null) signal_proximity_out_event;
36906 ulong signal_connect(string name:"proximity-out-event", CB/*:signal_proximity_out_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36907 return signal_connect_data(&this, cast(char*)"proximity-out-event",
36908 cast(GObject2.Callback)cb, data, null, cf);
36911 // Emitted when #GtkWidget:has-tooltip is %TRUE and the #GtkSettings:gtk-tooltip-timeout
36912 // has expired with the cursor hovering "above" @widget; or emitted when @widget got
36913 // focus in keyboard mode.
36914 // Using the given coordinates, the signal handler should determine
36915 // whether a tooltip should be shown for @widget. If this is the case
36916 // %TRUE should be returned, %FALSE otherwise. Note that if
36917 // should not be used.
36918 // The signal handler is free to manipulate @tooltip with the therefore
36919 // destined function calls.
36920 // RETURNS: %TRUE if @tooltip should be shown right now, %FALSE otherwise.
36921 // <x>: the x coordinate of the cursor position where the request has been emitted, relative to @widget->window
36922 // <y>: the y coordinate of the cursor position where the request has been emitted, relative to @widget->window
36923 // <keyboard_mode>: %TRUE if the tooltip was trigged using the keyboard
36924 // <tooltip>: a #GtkTooltip
36925 extern (C) alias static c_int function (Widget* this_, int x, int y, c_int keyboard_mode, Tooltip* tooltip, void* user_data=null) signal_query_tooltip;
36926 ulong signal_connect(string name:"query-tooltip", CB/*:signal_query_tooltip*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36927 return signal_connect_data(&this, cast(char*)"query-tooltip",
36928 cast(GObject2.Callback)cb, data, null, cf);
36930 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_realize;
36931 ulong signal_connect(string name:"realize", CB/*:signal_realize*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36932 return signal_connect_data(&this, cast(char*)"realize",
36933 cast(GObject2.Callback)cb, data, null, cf);
36936 // The ::screen-changed signal gets emitted when the
36937 // screen of a widget has changed.
36938 // <previous_screen>: the previous screen, or %NULL if the widget was not associated with a screen before
36939 extern (C) alias static void function (Widget* this_, Gdk2.Screen* previous_screen=null, void* user_data=null) signal_screen_changed;
36940 ulong signal_connect(string name:"screen-changed", CB/*:signal_screen_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36941 return signal_connect_data(&this, cast(char*)"screen-changed",
36942 cast(GObject2.Callback)cb, data, null, cf);
36945 // The ::scroll-event signal is emitted when a button in the 4 to 7
36946 // range is pressed. Wheel mice are usually configured to generate
36947 // button press events for buttons 4 and 5 when the wheel is turned.
36948 // To receive this signal, the #GdkWindow associated to the widget needs
36949 // to enable the #GDK_BUTTON_PRESS_MASK mask.
36950 // This signal will be sent to the grab widget if there is one.
36951 // %FALSE to propagate the event further.
36952 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36953 // <event>: the #GdkEventScroll which triggered this signal.
36954 extern (C) alias static c_int function (Widget* this_, Gdk2.EventScroll* event, void* user_data=null) signal_scroll_event;
36955 ulong signal_connect(string name:"scroll-event", CB/*:signal_scroll_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36956 return signal_connect_data(&this, cast(char*)"scroll-event",
36957 cast(GObject2.Callback)cb, data, null, cf);
36960 // The ::selection-clear-event signal will be emitted when the
36961 // the @widget's window has lost ownership of a selection.
36962 // %FALSE to propagate the event further.
36963 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36964 // <event>: the #GdkEventSelection which triggered this signal.
36965 extern (C) alias static c_int function (Widget* this_, Gdk2.EventSelection* event, void* user_data=null) signal_selection_clear_event;
36966 ulong signal_connect(string name:"selection-clear-event", CB/*:signal_selection_clear_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36967 return signal_connect_data(&this, cast(char*)"selection-clear-event",
36968 cast(GObject2.Callback)cb, data, null, cf);
36970 extern (C) alias static void function (Widget* this_, SelectionData* object, c_uint p0, c_uint p1, void* user_data=null) signal_selection_get;
36971 ulong signal_connect(string name:"selection-get", CB/*:signal_selection_get*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36972 return signal_connect_data(&this, cast(char*)"selection-get",
36973 cast(GObject2.Callback)cb, data, null, cf);
36976 // RETURNS: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
36977 // <returns>: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
36978 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* returns, void* user_data=null) signal_selection_notify_event;
36979 ulong signal_connect(string name:"selection-notify-event", CB/*:signal_selection_notify_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36980 return signal_connect_data(&this, cast(char*)"selection-notify-event",
36981 cast(GObject2.Callback)cb, data, null, cf);
36983 extern (C) alias static void function (Widget* this_, SelectionData* object, c_uint p0, void* user_data=null) signal_selection_received;
36984 ulong signal_connect(string name:"selection-received", CB/*:signal_selection_received*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36985 return signal_connect_data(&this, cast(char*)"selection-received",
36986 cast(GObject2.Callback)cb, data, null, cf);
36989 // The ::selection-request-event signal will be emitted when
36990 // another client requests ownership of the selection owned by
36991 // the @widget's window.
36992 // %FALSE to propagate the event further.
36993 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
36994 // <event>: the #GdkEventSelection which triggered this signal.
36995 extern (C) alias static c_int function (Widget* this_, Gdk2.EventSelection* event, void* user_data=null) signal_selection_request_event;
36996 ulong signal_connect(string name:"selection-request-event", CB/*:signal_selection_request_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36997 return signal_connect_data(&this, cast(char*)"selection-request-event",
36998 cast(GObject2.Callback)cb, data, null, cf);
37000 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_show;
37001 ulong signal_connect(string name:"show", CB/*:signal_show*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37002 return signal_connect_data(&this, cast(char*)"show",
37003 cast(GObject2.Callback)cb, data, null, cf);
37005 extern (C) alias static c_int function (Widget* this_, WidgetHelpType* object, void* user_data=null) signal_show_help;
37006 ulong signal_connect(string name:"show-help", CB/*:signal_show_help*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37007 return signal_connect_data(&this, cast(char*)"show-help",
37008 cast(GObject2.Callback)cb, data, null, cf);
37010 extern (C) alias static void function (Widget* this_, Gdk2.Rectangle* object, void* user_data=null) signal_size_allocate;
37011 ulong signal_connect(string name:"size-allocate", CB/*:signal_size_allocate*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37012 return signal_connect_data(&this, cast(char*)"size-allocate",
37013 cast(GObject2.Callback)cb, data, null, cf);
37015 extern (C) alias static void function (Widget* this_, Requisition* object, void* user_data=null) signal_size_request;
37016 ulong signal_connect(string name:"size-request", CB/*:signal_size_request*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37017 return signal_connect_data(&this, cast(char*)"size-request",
37018 cast(GObject2.Callback)cb, data, null, cf);
37021 // The ::state-changed signal is emitted when the widget state changes.
37022 // See gtk_widget_get_state().
37023 // <state>: the previous state
37024 extern (C) alias static void function (Widget* this_, StateType* state, void* user_data=null) signal_state_changed;
37025 ulong signal_connect(string name:"state-changed", CB/*:signal_state_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37026 return signal_connect_data(&this, cast(char*)"state-changed",
37027 cast(GObject2.Callback)cb, data, null, cf);
37030 // The ::style-set signal is emitted when a new style has been set
37031 // on a widget. Note that style-modifying functions like
37032 // gtk_widget_modify_base() also cause this signal to be emitted.
37033 // <previous_style>: the previous style, or %NULL if the widget just got its initial style
37034 extern (C) alias static void function (Widget* this_, Style* previous_style=null, void* user_data=null) signal_style_set;
37035 ulong signal_connect(string name:"style-set", CB/*:signal_style_set*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37036 return signal_connect_data(&this, cast(char*)"style-set",
37037 cast(GObject2.Callback)cb, data, null, cf);
37039 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_unmap;
37040 ulong signal_connect(string name:"unmap", CB/*:signal_unmap*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37041 return signal_connect_data(&this, cast(char*)"unmap",
37042 cast(GObject2.Callback)cb, data, null, cf);
37045 // The ::unmap-event signal will be emitted when the @widget's window is
37046 // unmapped. A window is unmapped when it becomes invisible on the screen.
37047 // To receive this signal, the #GdkWindow associated to the widget needs
37048 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
37049 // automatically for all new windows.
37050 // %FALSE to propagate the event further.
37051 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
37052 // <event>: the #GdkEventAny which triggered this signal
37053 extern (C) alias static c_int function (Widget* this_, Gdk2.EventAny* event, void* user_data=null) signal_unmap_event;
37054 ulong signal_connect(string name:"unmap-event", CB/*:signal_unmap_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37055 return signal_connect_data(&this, cast(char*)"unmap-event",
37056 cast(GObject2.Callback)cb, data, null, cf);
37058 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_unrealize;
37059 ulong signal_connect(string name:"unrealize", CB/*:signal_unrealize*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37060 return signal_connect_data(&this, cast(char*)"unrealize",
37061 cast(GObject2.Callback)cb, data, null, cf);
37064 // The ::visibility-notify-event will be emitted when the @widget's window
37065 // is obscured or unobscured.
37066 // To receive this signal the #GdkWindow associated to the widget needs
37067 // to enable the #GDK_VISIBILITY_NOTIFY_MASK mask.
37068 // %FALSE to propagate the event further.
37069 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
37070 // <event>: the #GdkEventVisibility which triggered this signal.
37071 extern (C) alias static c_int function (Widget* this_, Gdk2.EventVisibility* event, void* user_data=null) signal_visibility_notify_event;
37072 ulong signal_connect(string name:"visibility-notify-event", CB/*:signal_visibility_notify_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37073 return signal_connect_data(&this, cast(char*)"visibility-notify-event",
37074 cast(GObject2.Callback)cb, data, null, cf);
37077 // The ::window-state-event will be emitted when the state of the
37078 // toplevel window associated to the @widget changes.
37079 // To receive this signal the #GdkWindow associated to the widget
37080 // needs to enable the #GDK_STRUCTURE_MASK mask. GDK will enable
37081 // this mask automatically for all new windows.
37082 // event. %FALSE to propagate the event further.
37083 // RETURNS: %TRUE to stop other handlers from being invoked for the
37084 // <event>: the #GdkEventWindowState which triggered this signal.
37085 extern (C) alias static c_int function (Widget* this_, Gdk2.EventWindowState* event, void* user_data=null) signal_window_state_event;
37086 ulong signal_connect(string name:"window-state-event", CB/*:signal_window_state_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37087 return signal_connect_data(&this, cast(char*)"window-state-event",
37088 cast(GObject2.Callback)cb, data, null, cf);
37092 struct WidgetAuxInfo {
37093 int x, y, width, height;
37094 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
37095 uint, "x_set", 1,
37096 uint, "y_set", 1,
37097 uint, "__dummy32A", 30));
37101 // <structfield>activate_signal</structfield>
37102 // The signal to emit when a widget of this class is activated,
37103 // gtk_widget_activate() handles the emission. Implementation of this
37104 // signal is optional.
37105 // <structfield>set_scroll_adjustment_signal</structfield>
37106 // This signal is emitted when a widget of this class is added
37107 // to a scrolling aware parent, gtk_widget_set_scroll_adjustments()
37108 // handles the emission.
37109 // Implementation of this signal is optional.
37110 struct WidgetClass {
37111 ObjectClass parent_class;
37112 uint activate_signal, set_scroll_adjustments_signal;
37113 extern (C) void function (Widget* widget, uint n_pspecs, GObject2.ParamSpec** pspecs) dispatch_child_properties_changed;
37114 extern (C) void function (Widget* widget) show;
37115 extern (C) void function (Widget* widget) show_all;
37116 extern (C) void function (Widget* widget) hide;
37117 extern (C) void function (Widget* widget) hide_all;
37118 extern (C) void function (Widget* widget) map;
37119 extern (C) void function (Widget* widget) unmap;
37120 extern (C) void function (Widget* widget) realize;
37121 extern (C) void function (Widget* widget) unrealize;
37122 // <requisition>: a #GtkRequisition to be filled in
37123 extern (C) void function (Widget* widget, Requisition* requisition) size_request;
37124 // <allocation>: position and size to be allocated to @widget
37125 extern (C) void function (Widget* widget, Allocation* allocation) size_allocate;
37126 extern (C) void function (Widget* widget, StateType previous_state) state_changed;
37127 extern (C) void function (Widget* widget, Widget* previous_parent) parent_set;
37128 extern (C) void function (Widget* widget, Widget* previous_toplevel) hierarchy_changed;
37129 extern (C) void function (Widget* widget, Style* previous_style) style_set;
37130 extern (C) void function (Widget* widget, TextDirection previous_direction) direction_changed;
37131 extern (C) void function (Widget* widget, int was_grabbed) grab_notify;
37132 extern (C) void function (Widget* widget, GObject2.ParamSpec* pspec) child_notify;
37134 // RETURNS: %TRUE if the signal has been handled
37135 // <group_cycling>: %TRUE if there are other widgets with the same mnemonic
37136 extern (C) int function (Widget* widget, int group_cycling) mnemonic_activate;
37137 extern (C) void function (Widget* widget) grab_focus;
37138 extern (C) int function (Widget* widget, DirectionType direction) focus;
37140 // RETURNS: return from the event signal emission (%TRUE if
37141 // <event>: a #GdkEvent
37142 extern (C) int function (Widget* widget, Gdk2.Event* event) event;
37143 extern (C) int function (Widget* widget, Gdk2.EventButton* event) button_press_event;
37144 extern (C) int function (Widget* widget, Gdk2.EventButton* event) button_release_event;
37145 extern (C) int function (Widget* widget, Gdk2.EventScroll* event) scroll_event;
37146 extern (C) int function (Widget* widget, Gdk2.EventMotion* event) motion_notify_event;
37147 extern (C) int function (Widget* widget, Gdk2.EventAny* event) delete_event;
37148 extern (C) int function (Widget* widget, Gdk2.EventAny* event) destroy_event;
37149 extern (C) int function (Widget* widget, Gdk2.EventExpose* event) expose_event;
37150 extern (C) int function (Widget* widget, Gdk2.EventKey* event) key_press_event;
37151 extern (C) int function (Widget* widget, Gdk2.EventKey* event) key_release_event;
37152 extern (C) int function (Widget* widget, Gdk2.EventCrossing* event) enter_notify_event;
37153 extern (C) int function (Widget* widget, Gdk2.EventCrossing* event) leave_notify_event;
37154 extern (C) int function (Widget* widget, Gdk2.EventConfigure* event) configure_event;
37155 extern (C) int function (Widget* widget, Gdk2.EventFocus* event) focus_in_event;
37156 extern (C) int function (Widget* widget, Gdk2.EventFocus* event) focus_out_event;
37157 extern (C) int function (Widget* widget, Gdk2.EventAny* event) map_event;
37158 extern (C) int function (Widget* widget, Gdk2.EventAny* event) unmap_event;
37159 extern (C) int function (Widget* widget, Gdk2.EventProperty* event) property_notify_event;
37160 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) selection_clear_event;
37161 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) selection_request_event;
37162 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) selection_notify_event;
37163 extern (C) int function (Widget* widget, Gdk2.EventProximity* event) proximity_in_event;
37164 extern (C) int function (Widget* widget, Gdk2.EventProximity* event) proximity_out_event;
37165 extern (C) int function (Widget* widget, Gdk2.EventVisibility* event) visibility_notify_event;
37166 extern (C) int function (Widget* widget, Gdk2.EventClient* event) client_event;
37167 extern (C) int function (Widget* widget, Gdk2.EventAny* event) no_expose_event;
37168 extern (C) int function (Widget* widget, Gdk2.EventWindowState* event) window_state_event;
37169 extern (C) void function (Widget* widget, SelectionData* selection_data, uint info, uint time_) selection_get;
37170 extern (C) void function (Widget* widget, SelectionData* selection_data, uint time_) selection_received;
37171 extern (C) void function (Widget* widget, Gdk2.DragContext* context) drag_begin;
37172 extern (C) void function (Widget* widget, Gdk2.DragContext* context) drag_end;
37173 extern (C) void function (Widget* widget, Gdk2.DragContext* context, SelectionData* selection_data, uint info, uint time_) drag_data_get;
37174 extern (C) void function (Widget* widget, Gdk2.DragContext* context) drag_data_delete;
37175 extern (C) void function (Widget* widget, Gdk2.DragContext* context, uint time_) drag_leave;
37176 extern (C) int function (Widget* widget, Gdk2.DragContext* context, int x, int y, uint time_) drag_motion;
37177 extern (C) int function (Widget* widget, Gdk2.DragContext* context, int x, int y, uint time_) drag_drop;
37178 extern (C) void function (Widget* widget, Gdk2.DragContext* context, int x, int y, SelectionData* selection_data, uint info, uint time_) drag_data_received;
37179 extern (C) int function (Widget* widget) popup_menu;
37180 extern (C) int function (Widget* widget, WidgetHelpType help_type) show_help;
37181 // RETURNS: the #AtkObject associated with @widget
37182 extern (C) Atk.Object* function (Widget* widget) get_accessible;
37183 extern (C) void function (Widget* widget, Gdk2.Screen* previous_screen) screen_changed;
37185 // RETURNS: %TRUE if the accelerator can be activated.
37186 // <signal_id>: the ID of a signal installed on @widget
37187 extern (C) int function (Widget* widget, uint signal_id) can_activate_accel;
37188 extern (C) int function (Widget* widget, Gdk2.EventGrabBroken* event) grab_broken_event;
37189 extern (C) void function (Widget* widget) composited_changed;
37190 extern (C) int function (Widget* widget, int x, int y, int keyboard_tooltip, Tooltip* tooltip) query_tooltip;
37191 extern (C) void function () _gtk_reserved5;
37192 extern (C) void function () _gtk_reserved6;
37193 extern (C) void function () _gtk_reserved7;
37196 // Finds a style property of a widget class by name.
37197 // RETURNS: the #GParamSpec of the style property or %NULL if @class has no style property with that name.
37198 // <property_name>: the name of the style property to find
37199 GObject2.ParamSpec* find_style_property(char* property_name) {
37200 return gtk_widget_class_find_style_property(&this, property_name);
37203 // Installs a style property on a widget class. The parser for the
37204 // style property is determined by the value type of @pspec.
37205 // <pspec>: the #GParamSpec for the property
37206 void install_style_property(GObject2.ParamSpec* pspec) {
37207 gtk_widget_class_install_style_property(&this, pspec);
37210 // Unintrospectable method: install_style_property_parser() / gtk_widget_class_install_style_property_parser()
37211 // Installs a style property on a widget class.
37212 // <pspec>: the #GParamSpec for the style property
37213 // <parser>: the parser for the style property
37214 void install_style_property_parser(GObject2.ParamSpec* pspec, RcPropertyParser parser) {
37215 gtk_widget_class_install_style_property_parser(&this, pspec, parser);
37218 // Returns all style properties of a widget class.
37219 // RETURNS: an newly allocated array of #GParamSpec*. The array must be freed with g_free().
37220 // <n_properties>: location to return the number of style properties found
37221 GObject2.ParamSpec** /*new container*/ list_style_properties(/*out*/ uint* n_properties) {
37222 return gtk_widget_class_list_style_properties(&this, n_properties);
37226 // Tells about certain properties of the widget.
37227 enum WidgetFlags {
37228 TOPLEVEL = 16,
37229 NO_WINDOW = 32,
37230 REALIZED = 64,
37231 MAPPED = 128,
37232 VISIBLE = 256,
37233 SENSITIVE = 512,
37234 PARENT_SENSITIVE = 1024,
37235 CAN_FOCUS = 2048,
37236 HAS_FOCUS = 4096,
37237 CAN_DEFAULT = 8192,
37238 HAS_DEFAULT = 16384,
37239 HAS_GRAB = 32768,
37240 RC_STYLE = 65536,
37241 COMPOSITE_CHILD = 131072,
37242 NO_REPARENT = 262144,
37243 APP_PAINTABLE = 524288,
37244 RECEIVES_DEFAULT = 1048576,
37245 DOUBLE_BUFFERED = 2097152,
37246 NO_SHOW_ALL = 4194304
37248 enum WidgetHelpType {
37249 TOOLTIP = 0,
37250 WHATS_THIS = 1
37252 struct WidgetShapeInfo {
37253 short offset_x, offset_y;
37254 Gdk2.Bitmap* shape_mask;
37257 struct Window /* : Bin */ {
37258 alias bin this;
37259 alias bin super_;
37260 Bin bin;
37261 char* title, wmclass_name, wmclass_class, wm_role;
37262 Widget* focus_widget, default_widget;
37263 Window* transient_parent;
37264 WindowGeometryInfo* geometry_info;
37265 Gdk2.Window* frame;
37266 WindowGroup* group;
37267 ushort configure_request_count;
37268 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
37269 uint, "allow_shrink", 1,
37270 uint, "allow_grow", 1,
37271 uint, "configure_notify_received", 1,
37272 uint, "need_default_position", 1,
37273 uint, "need_default_size", 1,
37274 uint, "position", 3,
37275 uint, "type", 4,
37276 uint, "has_user_ref_count", 1,
37277 uint, "has_focus", 1,
37278 uint, "modal", 1,
37279 uint, "destroy_with_parent", 1,
37280 uint, "has_frame", 1,
37281 uint, "iconify_initially", 1,
37282 uint, "stick_initially", 1,
37283 uint, "maximize_initially", 1,
37284 uint, "decorated", 1,
37285 uint, "type_hint", 3,
37286 uint, "gravity", 5,
37287 uint, "is_active", 1,
37288 uint, "has_toplevel_focus", 1,
37289 uint, "__dummy32A", 1));
37290 uint frame_left, frame_top, frame_right, frame_bottom, keys_changed_handler;
37291 Gdk2.ModifierType mnemonic_modifier;
37292 Gdk2.Screen* screen;
37295 // Creates a new #GtkWindow, which is a toplevel window that can
37296 // contain other widgets. Nearly always, the type of the window should
37297 // be #GTK_WINDOW_TOPLEVEL. If you're implementing something like a
37298 // popup menu from scratch (which is a bad idea, just use #GtkMenu),
37299 // you might use #GTK_WINDOW_POPUP. #GTK_WINDOW_POPUP is not for
37300 // dialogs, though in some other toolkits dialogs are called "popups".
37301 // In GTK+, #GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip.
37302 // On X11, popup windows are not controlled by the <link
37303 // linkend="gtk-X11-arch">window manager</link>.
37304 // If you simply want an undecorated window (no window borders), use
37305 // gtk_window_set_decorated(), don't use #GTK_WINDOW_POPUP.
37306 // RETURNS: a new #GtkWindow.
37307 // <type>: type of window
37308 static Window* new_(WindowType type) {
37309 return gtk_window_new(type);
37312 // Gets the value set by gtk_window_set_default_icon_list().
37313 // The list is a copy and should be freed with g_list_free(),
37314 // but the pixbufs in the list have not had their reference count
37315 // incremented.
37316 // RETURNS: copy of default icon list
37317 static GLib2.List* /*new container*/ get_default_icon_list() {
37318 return gtk_window_get_default_icon_list();
37321 // Returns the fallback icon name for windows that has been set
37322 // with gtk_window_set_default_icon_name(). The returned
37323 // string is owned by GTK+ and should not be modified. It
37324 // is only valid until the next call to
37325 // gtk_window_set_default_icon_name().
37326 // RETURNS: the fallback icon name for windows
37327 static char* get_default_icon_name() {
37328 return gtk_window_get_default_icon_name();
37331 // Returns a list of all existing toplevel windows. The widgets
37332 // in the list are not individually referenced. If you want
37333 // to iterate through the list and perform actions involving
37334 // callbacks that might destroy the widgets, you <emphasis>must</emphasis> call
37335 // <literal>g_list_foreach (result, (GFunc)g_object_ref, NULL)</literal> first, and
37336 // then unref all the widgets afterwards.
37337 // RETURNS: list of toplevel widgets
37338 static GLib2.List* /*new container*/ list_toplevels() {
37339 return gtk_window_list_toplevels();
37342 // By default, after showing the first #GtkWindow, GTK+ calls
37343 // gdk_notify_startup_complete(). Call this function to disable
37344 // the automatic startup notification. You might do this if your
37345 // first window is a splash screen, and you want to delay notification
37346 // until after your real main window has been shown, for example.
37347 // In that example, you would disable startup notification
37348 // temporarily, show your splash screen, then re-enable it so that
37349 // showing the main window would automatically result in notification.
37350 // <setting>: %TRUE to automatically do startup notification
37351 static void set_auto_startup_notification(int setting) {
37352 gtk_window_set_auto_startup_notification(setting);
37355 // Sets an icon to be used as fallback for windows that haven't
37356 // had gtk_window_set_icon() called on them from a pixbuf.
37357 // <icon>: the icon
37358 static void set_default_icon(GdkPixbuf2.Pixbuf* icon) {
37359 gtk_window_set_default_icon(icon);
37362 // Sets an icon to be used as fallback for windows that haven't
37363 // had gtk_window_set_icon_list() called on them from a file
37364 // on disk. Warns on failure if @err is %NULL.
37365 // RETURNS: %TRUE if setting the icon succeeded.
37366 // <filename>: location of icon file
37367 static int set_default_icon_from_file(char* filename, GLib2.Error** error=null) {
37368 return gtk_window_set_default_icon_from_file(filename, error);
37371 // Sets an icon list to be used as fallback for windows that haven't
37372 // had gtk_window_set_icon_list() called on them to set up a
37373 // window-specific icon list. This function allows you to set up the
37374 // icon for all windows in your app at once.
37375 // See gtk_window_set_icon_list() for more details.
37376 // <list>: a list of #GdkPixbuf
37377 static void set_default_icon_list(GLib2.List* list) {
37378 gtk_window_set_default_icon_list(list);
37381 // Sets an icon to be used as fallback for windows that haven't
37382 // had gtk_window_set_icon_list() called on them from a named
37383 // themed icon, see gtk_window_set_icon_name().
37384 // <name>: the name of the themed icon
37385 static void set_default_icon_name(char* name) {
37386 gtk_window_set_default_icon_name(name);
37389 // Activates the default widget for the window, unless the current
37390 // focused widget has been configured to receive the default action
37391 // (see gtk_widget_set_receives_default()), in which case the
37392 // focused widget is activated.
37393 // RETURNS: %TRUE if a widget got activated.
37394 int activate_default() {
37395 return gtk_window_activate_default(&this);
37398 // Activates the current focused widget within the window.
37399 // RETURNS: %TRUE if a widget got activated.
37400 int activate_focus() {
37401 return gtk_window_activate_focus(&this);
37404 // Activates mnemonics and accelerators for this #GtkWindow. This is normally
37405 // called by the default ::key_press_event handler for toplevel windows,
37406 // however in some cases it may be useful to call this directly when
37407 // overriding the standard key handling for a toplevel window.
37408 // RETURNS: %TRUE if a mnemonic or accelerator was found and activated.
37409 // <event>: a #GdkEventKey
37410 int activate_key(Gdk2.EventKey* event) {
37411 return gtk_window_activate_key(&this, event);
37414 // Associate @accel_group with @window, such that calling
37415 // gtk_accel_groups_activate() on @window will activate accelerators
37416 // in @accel_group.
37417 // <accel_group>: a #GtkAccelGroup
37418 void add_accel_group(AccelGroup* accel_group) {
37419 gtk_window_add_accel_group(&this, accel_group);
37421 void add_embedded_xid(Gdk2.NativeWindow xid) {
37422 gtk_window_add_embedded_xid(&this, xid);
37425 // Adds a mnemonic to this window.
37426 // <keyval>: the mnemonic
37427 // <target>: the widget that gets activated by the mnemonic
37428 void add_mnemonic(uint keyval, Widget* target) {
37429 gtk_window_add_mnemonic(&this, keyval, target);
37432 // Starts moving a window. This function is used if an application has
37433 // window movement grips. When GDK can support it, the window movement
37434 // will be done using the standard mechanism for the <link
37435 // linkend="gtk-X11-arch">window manager</link> or windowing
37436 // system. Otherwise, GDK will try to emulate window movement,
37437 // potentially not all that well, depending on the windowing system.
37438 // <button>: mouse button that initiated the drag
37439 // <root_x>: X position where the user clicked to initiate the drag, in root window coordinates
37440 // <root_y>: Y position where the user clicked to initiate the drag
37441 // <timestamp>: timestamp from the click event that initiated the drag
37442 void begin_move_drag(int button, int root_x, int root_y, uint timestamp) {
37443 gtk_window_begin_move_drag(&this, button, root_x, root_y, timestamp);
37446 // Starts resizing a window. This function is used if an application
37447 // has window resizing controls. When GDK can support it, the resize
37448 // will be done using the standard mechanism for the <link
37449 // linkend="gtk-X11-arch">window manager</link> or windowing
37450 // system. Otherwise, GDK will try to emulate window resizing,
37451 // potentially not all that well, depending on the windowing system.
37452 // <edge>: position of the resize control
37453 // <button>: mouse button that initiated the drag
37454 // <root_x>: X position where the user clicked to initiate the drag, in root window coordinates
37455 // <root_y>: Y position where the user clicked to initiate the drag
37456 // <timestamp>: timestamp from the click event that initiated the drag
37457 void begin_resize_drag(Gdk2.WindowEdge edge, int button, int root_x, int root_y, uint timestamp) {
37458 gtk_window_begin_resize_drag(&this, edge, button, root_x, root_y, timestamp);
37461 // Asks to deiconify (i.e. unminimize) the specified @window. Note
37462 // that you shouldn't assume the window is definitely deiconified
37463 // afterward, because other entities (e.g. the user or <link
37464 // linkend="gtk-X11-arch">window manager</link>) could iconify it
37465 // again before your code which assumes deiconification gets to run.
37466 // You can track iconification via the "window-state-event" signal
37467 // on #GtkWidget.
37468 void deiconify() {
37469 gtk_window_deiconify(&this);
37472 // Asks to place @window in the fullscreen state. Note that you
37473 // shouldn't assume the window is definitely full screen afterward,
37474 // because other entities (e.g. the user or <link
37475 // linkend="gtk-X11-arch">window manager</link>) could unfullscreen it
37476 // again, and not all window managers honor requests to fullscreen
37477 // windows. But normally the window will end up fullscreen. Just
37478 // don't write code that crashes if not.
37479 // You can track the fullscreen state via the "window-state-event" signal
37480 // on #GtkWidget.
37481 void fullscreen() {
37482 gtk_window_fullscreen(&this);
37485 // Gets the value set by gtk_window_set_accept_focus().
37486 // RETURNS: %TRUE if window should receive the input focus
37487 int get_accept_focus() {
37488 return gtk_window_get_accept_focus(&this);
37491 // Returns whether the window has been set to have decorations
37492 // such as a title bar via gtk_window_set_decorated().
37493 // RETURNS: %TRUE if the window has been set to have decorations
37494 int get_decorated() {
37495 return gtk_window_get_decorated(&this);
37498 // Gets the default size of the window. A value of -1 for the width or
37499 // height indicates that a default size has not been explicitly set
37500 // for that dimension, so the "natural" size of the window will be
37501 // used.
37502 // <width>: location to store the default width, or %NULL
37503 // <height>: location to store the default height, or %NULL
37504 void get_default_size(int* width=null, int* height=null) {
37505 gtk_window_get_default_size(&this, width, height);
37508 // Returns the default widget for @window. See gtk_window_set_default()
37509 // for more details.
37510 // RETURNS: the default widget, or %NULL if there is none.
37511 Widget* get_default_widget() {
37512 return gtk_window_get_default_widget(&this);
37515 // Returns whether the window has been set to have a close button
37516 // via gtk_window_set_deletable().
37517 // RETURNS: %TRUE if the window has been set to have a close button
37518 int get_deletable() {
37519 return gtk_window_get_deletable(&this);
37522 // Returns whether the window will be destroyed with its transient parent. See
37523 // gtk_window_set_destroy_with_parent ().
37524 // RETURNS: %TRUE if the window will be destroyed with its transient parent.
37525 int get_destroy_with_parent() {
37526 return gtk_window_get_destroy_with_parent(&this);
37529 // Retrieves the current focused widget within the window.
37530 // Note that this is the widget that would have the focus
37531 // if the toplevel window focused; if the toplevel window
37532 // is not focused then <literal>gtk_widget_has_focus (widget)</literal> will
37533 // not be %TRUE for the widget.
37534 // RETURNS: the currently focused widget, or %NULL if there is none.
37535 Widget* get_focus() {
37536 return gtk_window_get_focus(&this);
37539 // Gets the value set by gtk_window_set_focus_on_map().
37540 // mapped.
37541 // RETURNS: %TRUE if window should receive the input focus when
37542 int get_focus_on_map() {
37543 return gtk_window_get_focus_on_map(&this);
37546 // (Note: this is a special-purpose function intended for the
37547 // framebuffer port; see gtk_window_set_has_frame(). It will not
37548 // return the size of the window border drawn by the <link
37549 // linkend="gtk-X11-arch">window manager</link>, which is the normal
37550 // case when using a windowing system. See
37551 // gdk_window_get_frame_extents() to get the standard window border
37552 // extents.)
37553 // Retrieves the dimensions of the frame window for this toplevel.
37554 // See gtk_window_set_has_frame(), gtk_window_set_frame_dimensions().
37555 // <left>: location to store the width of the frame at the left, or %NULL
37556 // <top>: location to store the height of the frame at the top, or %NULL
37557 // <right>: location to store the width of the frame at the returns, or %NULL
37558 // <bottom>: location to store the height of the frame at the bottom, or %NULL
37559 void get_frame_dimensions(/*out*/ int* left=null, /*out*/ int* top=null, /*out*/ int* right=null, /*out*/ int* bottom=null) {
37560 gtk_window_get_frame_dimensions(&this, left, top, right, bottom);
37563 // Gets the value set by gtk_window_set_gravity().
37564 // RETURNS: window gravity
37565 Gdk2.Gravity get_gravity() {
37566 return gtk_window_get_gravity(&this);
37569 // Returns the group for @window or the default group, if
37570 // window group.
37571 // RETURNS: the #GtkWindowGroup for a window or the default group
37572 WindowGroup* get_group() {
37573 return gtk_window_get_group(&this);
37576 // Accessor for whether the window has a frame window exterior to
37577 // via gtk_window_set_has_frame().
37578 // RETURNS: %TRUE if a frame has been added to the window
37579 int get_has_frame() {
37580 return gtk_window_get_has_frame(&this);
37583 // Gets the value set by gtk_window_set_icon() (or if you've
37584 // called gtk_window_set_icon_list(), gets the first icon in
37585 // the icon list).
37586 // RETURNS: icon for window
37587 GdkPixbuf2.Pixbuf* get_icon() {
37588 return gtk_window_get_icon(&this);
37591 // Retrieves the list of icons set by gtk_window_set_icon_list().
37592 // The list is copied, but the reference count on each
37593 // member won't be incremented.
37594 // RETURNS: copy of window's icon list
37595 GLib2.List* /*new container*/ get_icon_list() {
37596 return gtk_window_get_icon_list(&this);
37599 // Returns the name of the themed icon for the window,
37600 // see gtk_window_set_icon_name().
37601 // no themed icon
37602 // RETURNS: the icon name or %NULL if the window has
37603 char* get_icon_name() {
37604 return gtk_window_get_icon_name(&this);
37607 // Returns the mnemonic modifier for this window. See
37608 // gtk_window_set_mnemonic_modifier().
37609 // mnemonics on this window.
37610 // RETURNS: the modifier mask used to activate
37611 Gdk2.ModifierType get_mnemonic_modifier() {
37612 return gtk_window_get_mnemonic_modifier(&this);
37614 int get_mnemonics_visible() {
37615 return gtk_window_get_mnemonics_visible(&this);
37618 // Returns whether the window is modal. See gtk_window_set_modal().
37619 // establishes a grab when shown
37620 // RETURNS: %TRUE if the window is set to be modal and
37621 int get_modal() {
37622 return gtk_window_get_modal(&this);
37625 // Fetches the requested opacity for this window. See
37626 // gtk_window_set_opacity().
37627 // RETURNS: the requested opacity for this window.
37628 double get_opacity() {
37629 return gtk_window_get_opacity(&this);
37632 // This function returns the position you need to pass to
37633 // gtk_window_move() to keep @window in its current position. This
37634 // means that the meaning of the returned value varies with window
37635 // gravity. See gtk_window_move() for more details.
37636 // If you haven't changed the window gravity, its gravity will be
37637 // #GDK_GRAVITY_NORTH_WEST. This means that gtk_window_get_position()
37638 // gets the position of the top-left corner of the window manager
37639 // frame for the window. gtk_window_move() sets the position of this
37640 // same top-left corner.
37641 // gtk_window_get_position() is not 100% reliable because the X Window System
37642 // does not specify a way to obtain the geometry of the
37643 // decorations placed on a window by the window manager.
37644 // Thus GTK+ is using a "best guess" that works with most
37645 // window managers.
37646 // Moreover, nearly all window managers are historically broken with
37647 // respect to their handling of window gravity. So moving a window to
37648 // its current position as returned by gtk_window_get_position() tends
37649 // to result in moving the window slightly. Window managers are
37650 // slowly getting better over time.
37651 // If a window has gravity #GDK_GRAVITY_STATIC the window manager
37652 // frame is not relevant, and thus gtk_window_get_position() will
37653 // always produce accurate results. However you can't use static
37654 // gravity to do things like place a window in a corner of the screen,
37655 // because static gravity ignores the window manager decorations.
37656 // If you are saving and restoring your application's window
37657 // positions, you should know that it's impossible for applications to
37658 // do this without getting it somewhat wrong because applications do
37659 // not have sufficient knowledge of window manager state. The Correct
37660 // Mechanism is to support the session management protocol (see the
37661 // "GnomeClient" object in the GNOME libraries for example) and allow
37662 // the window manager to save your window sizes and positions.
37663 // <root_x>: return location for X coordinate of gravity-determined reference point
37664 // <root_y>: return location for Y coordinate of gravity-determined reference point
37665 void get_position(/*out*/ int* root_x=null, /*out*/ int* root_y=null) {
37666 gtk_window_get_position(&this, root_x, root_y);
37669 // Gets the value set by gtk_window_set_resizable().
37670 // RETURNS: %TRUE if the user can resize the window
37671 int get_resizable() {
37672 return gtk_window_get_resizable(&this);
37675 // Returns the role of the window. See gtk_window_set_role() for
37676 // further explanation.
37677 // returned is owned by the widget and must not be modified
37678 // or freed.
37679 // RETURNS: the role of the window if set, or %NULL. The
37680 char* get_role() {
37681 return gtk_window_get_role(&this);
37684 // Returns the #GdkScreen associated with @window.
37685 // RETURNS: a #GdkScreen.
37686 Gdk2.Screen* get_screen() {
37687 return gtk_window_get_screen(&this);
37690 // Obtains the current size of @window. If @window is not onscreen,
37691 // it returns the size GTK+ will suggest to the <link
37692 // linkend="gtk-X11-arch">window manager</link> for the initial window
37693 // size (but this is not reliably the same as the size the window
37694 // manager will actually select). The size obtained by
37695 // gtk_window_get_size() is the last size received in a
37696 // #GdkEventConfigure, that is, GTK+ uses its locally-stored size,
37697 // rather than querying the X server for the size. As a result, if you
37698 // call gtk_window_resize() then immediately call
37699 // gtk_window_get_size(), the size won't have taken effect yet. After
37700 // the window manager processes the resize request, GTK+ receives
37701 // notification that the size has changed via a configure event, and
37702 // the size of the window gets updated.
37703 // because the size of the window may change between the time that you
37704 // get the size and the time that you perform some action assuming
37705 // that size is the current size. To avoid race conditions, connect to
37706 // "configure-event" on the window and adjust your size-dependent
37707 // state to match the size delivered in the #GdkEventConfigure.
37708 // size of the window manager decorations (aka the window frame or
37709 // border). Those are not drawn by GTK+ and GTK+ has no reliable
37710 // method of determining their size.
37711 // the window onscreen, there may be a better way. The preferred
37712 // way is to simply set the window's semantic type with
37713 // gtk_window_set_type_hint(), which allows the window manager to
37714 // e.g. center dialogs. Also, if you set the transient parent of
37715 // dialogs with gtk_window_set_transient_for() window managers
37716 // will often center the dialog over its parent window. It's
37717 // much preferred to let the window manager handle these
37718 // things rather than doing it yourself, because all apps will
37719 // behave consistently and according to user prefs if the window
37720 // manager handles it. Also, the window manager can take the size
37721 // of the window decorations/border into account, while your
37722 // application cannot.
37723 // In any case, if you insist on application-specified window
37724 // positioning, there's <emphasis>still</emphasis> a better way than
37725 // doing it yourself - gtk_window_set_position() will frequently
37726 // handle the details for you.
37727 // <width>: return location for width, or %NULL
37728 // <height>: return location for height, or %NULL
37729 void get_size(/*out*/ int* width=null, /*out*/ int* height=null) {
37730 gtk_window_get_size(&this, width, height);
37733 // Gets the value set by gtk_window_set_skip_pager_hint().
37734 // RETURNS: %TRUE if window shouldn't be in pager
37735 int get_skip_pager_hint() {
37736 return gtk_window_get_skip_pager_hint(&this);
37739 // Gets the value set by gtk_window_set_skip_taskbar_hint()
37740 // RETURNS: %TRUE if window shouldn't be in taskbar
37741 int get_skip_taskbar_hint() {
37742 return gtk_window_get_skip_taskbar_hint(&this);
37745 // Retrieves the title of the window. See gtk_window_set_title().
37746 // been set explicitely. The returned string is owned by the widget
37747 // and must not be modified or freed.
37748 // RETURNS: the title of the window, or %NULL if none has
37749 char* get_title() {
37750 return gtk_window_get_title(&this);
37753 // Fetches the transient parent for this window. See
37754 // gtk_window_set_transient_for().
37755 // if no transient parent has been set.
37756 // RETURNS: the transient parent for this window, or %NULL
37757 Window* get_transient_for() {
37758 return gtk_window_get_transient_for(&this);
37761 // Gets the type hint for this window. See gtk_window_set_type_hint().
37762 // RETURNS: the type hint for @window.
37763 Gdk2.WindowTypeHint get_type_hint() {
37764 return gtk_window_get_type_hint(&this);
37767 // Gets the value set by gtk_window_set_urgency_hint()
37768 // RETURNS: %TRUE if window is urgent
37769 int get_urgency_hint() {
37770 return gtk_window_get_urgency_hint(&this);
37773 // Gets the type of the window. See #GtkWindowType.
37774 // RETURNS: the type of the window
37775 WindowType get_window_type() {
37776 return gtk_window_get_window_type(&this);
37779 // Returns whether @window has an explicit window group.
37780 // Since 2.22
37781 // RETURNS: %TRUE if @window has an explicit window group.
37782 int has_group() {
37783 return gtk_window_has_group(&this);
37786 // Returns whether the input focus is within this GtkWindow.
37787 // For real toplevel windows, this is identical to gtk_window_is_active(),
37788 // but for embedded windows, like #GtkPlug, the results will differ.
37789 // RETURNS: %TRUE if the input focus is within this GtkWindow
37790 int has_toplevel_focus() {
37791 return gtk_window_has_toplevel_focus(&this);
37794 // Asks to iconify (i.e. minimize) the specified @window. Note that
37795 // you shouldn't assume the window is definitely iconified afterward,
37796 // because other entities (e.g. the user or <link
37797 // linkend="gtk-X11-arch">window manager</link>) could deiconify it
37798 // again, or there may not be a window manager in which case
37799 // iconification isn't possible, etc. But normally the window will end
37800 // up iconified. Just don't write code that crashes if not.
37801 // It's permitted to call this function before showing a window,
37802 // in which case the window will be iconified before it ever appears
37803 // onscreen.
37804 // You can track iconification via the "window-state-event" signal
37805 // on #GtkWidget.
37806 void iconify() {
37807 gtk_window_iconify(&this);
37810 // Returns whether the window is part of the current active toplevel.
37811 // (That is, the toplevel window receiving keystrokes.)
37812 // The return value is %TRUE if the window is active toplevel
37813 // itself, but also if it is, say, a #GtkPlug embedded in the active toplevel.
37814 // You might use this function if you wanted to draw a widget
37815 // differently in an active window from a widget in an inactive window.
37816 // See gtk_window_has_toplevel_focus()
37817 // RETURNS: %TRUE if the window part of the current active window.
37818 int is_active() {
37819 return gtk_window_is_active(&this);
37822 // Asks to maximize @window, so that it becomes full-screen. Note that
37823 // you shouldn't assume the window is definitely maximized afterward,
37824 // because other entities (e.g. the user or <link
37825 // linkend="gtk-X11-arch">window manager</link>) could unmaximize it
37826 // again, and not all window managers support maximization. But
37827 // normally the window will end up maximized. Just don't write code
37828 // that crashes if not.
37829 // It's permitted to call this function before showing a window,
37830 // in which case the window will be maximized when it appears onscreen
37831 // initially.
37832 // You can track maximization via the "window-state-event" signal
37833 // on #GtkWidget.
37834 void maximize() {
37835 gtk_window_maximize(&this);
37838 // Activates the targets associated with the mnemonic.
37839 // RETURNS: %TRUE if the activation is done.
37840 // <keyval>: the mnemonic
37841 // <modifier>: the modifiers
37842 int mnemonic_activate(uint keyval, Gdk2.ModifierType modifier) {
37843 return gtk_window_mnemonic_activate(&this, keyval, modifier);
37846 // Asks the <link linkend="gtk-X11-arch">window manager</link> to move
37847 // this; most window managers ignore requests for initial window
37848 // positions (instead using a user-defined placement algorithm) and
37849 // honor requests after the window has already been shown.
37850 // reference point for the window. The gravity determines two things:
37851 // first, the location of the reference point in root window
37852 // coordinates; and second, which point on the window is positioned at
37853 // the reference point.
37854 // By default the gravity is #GDK_GRAVITY_NORTH_WEST, so the reference
37855 // point is simply the @x, @y supplied to gtk_window_move(). The
37856 // top-left corner of the window decorations (aka window frame or
37857 // border) will be placed at @x, @y. Therefore, to position a window
37858 // at the top left of the screen, you want to use the default gravity
37859 // (which is #GDK_GRAVITY_NORTH_WEST) and move the window to 0,0.
37860 // To position a window at the bottom right corner of the screen, you
37861 // would set #GDK_GRAVITY_SOUTH_EAST, which means that the reference
37862 // point is at @x + the window width and @y + the window height, and
37863 // the bottom-right corner of the window border will be placed at that
37864 // reference point. So, to place a window in the bottom right corner
37865 // you would first set gravity to south east, then write:
37866 // <literal>gtk_window_move (window, gdk_screen_width () - window_width,
37867 // gdk_screen_height () - window_height)</literal> (note that this
37868 // example does not take multi-head scenarios into account).
37869 // The Extended Window Manager Hints specification at <ulink
37870 // url="http://www.freedesktop.org/Standards/wm-spec">
37871 // http://www.freedesktop.org/Standards/wm-spec</ulink> has a
37872 // nice table of gravities in the "implementation notes" section.
37873 // The gtk_window_get_position() documentation may also be relevant.
37874 // <x>: X coordinate to move window to
37875 // <y>: Y coordinate to move window to
37876 void move(int x, int y) {
37877 gtk_window_move(&this, x, y);
37880 // Parses a standard X Window System geometry string - see the
37881 // manual page for X (type 'man X') for details on this.
37882 // gtk_window_parse_geometry() does work on all GTK+ ports
37883 // including Win32 but is primarily intended for an X environment.
37884 // If either a size or a position can be extracted from the
37885 // geometry string, gtk_window_parse_geometry() returns %TRUE
37886 // and calls gtk_window_set_default_size() and/or gtk_window_move()
37887 // to resize/move the window.
37888 // If gtk_window_parse_geometry() returns %TRUE, it will also
37889 // set the #GDK_HINT_USER_POS and/or #GDK_HINT_USER_SIZE hints
37890 // indicating to the window manager that the size/position of
37891 // the window was user-specified. This causes most window
37892 // managers to honor the geometry.
37893 // Note that for gtk_window_parse_geometry() to work as expected, it has
37894 // to be called when the window has its "final" size, i.e. after calling
37895 // gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints()
37896 // on the window.
37897 // |[
37898 // #include <gtk/gtk.h>
37899 // static void
37900 // fill_with_content (GtkWidget *vbox)
37901 // {
37902 // /&ast; fill with content... &ast;/
37903 // }
37904 // int
37905 // main (int argc, char *argv[])
37906 // {
37907 // GtkWidget *window, *vbox;
37908 // GdkGeometry size_hints = {
37909 // 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
37910 // };
37911 // gtk_init (&argc, &argv);
37912 // window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
37913 // vbox = gtk_vbox_new (FALSE, 0);
37914 // gtk_container_add (GTK_CONTAINER (window), vbox);
37915 // fill_with_content (vbox);
37916 // gtk_widget_show_all (vbox);
37917 // gtk_window_set_geometry_hints (GTK_WINDOW (window),
37918 // window,
37919 // &size_hints,
37920 // GDK_HINT_MIN_SIZE |
37921 // GDK_HINT_BASE_SIZE |
37922 // GDK_HINT_RESIZE_INC);
37923 // if (argc &gt; 1)
37924 // {
37925 // if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
37926 // fprintf (stderr, "Failed to parse '%s'\n", argv[1]);
37927 // }
37928 // gtk_widget_show_all (window);
37929 // gtk_main ();
37930 // return 0;
37931 // }
37932 // ]|
37933 // RETURNS: %TRUE if string was parsed successfully
37934 // <geometry>: geometry string
37935 int parse_geometry(char* geometry) {
37936 return gtk_window_parse_geometry(&this, geometry);
37939 // Presents a window to the user. This may mean raising the window
37940 // in the stacking order, deiconifying it, moving it to the current
37941 // desktop, and/or giving it the keyboard focus, possibly dependent
37942 // on the user's platform, window manager, and preferences.
37943 // If @window is hidden, this function calls gtk_widget_show()
37944 // as well.
37945 // This function should be used when the user tries to open a window
37946 // that's already open. Say for example the preferences dialog is
37947 // currently open, and the user chooses Preferences from the menu
37948 // a second time; use gtk_window_present() to move the already-open dialog
37949 // where the user can see it.
37950 // If you are calling this function in response to a user interaction,
37951 // it is preferable to use gtk_window_present_with_time().
37952 void present() {
37953 gtk_window_present(&this);
37956 // Presents a window to the user in response to a user interaction.
37957 // If you need to present a window without a timestamp, use
37958 // gtk_window_present(). See gtk_window_present() for details.
37959 // <timestamp>: the timestamp of the user interaction (typically a button or key press event) which triggered this call
37960 void present_with_time(uint timestamp) {
37961 gtk_window_present_with_time(&this, timestamp);
37964 // Propagate a key press or release event to the focus widget and
37965 // up the focus container chain until a widget handles @event.
37966 // This is normally called by the default ::key_press_event and
37967 // ::key_release_event handlers for toplevel windows,
37968 // however in some cases it may be useful to call this directly when
37969 // overriding the standard key handling for a toplevel window.
37970 // RETURNS: %TRUE if a widget in the focus chain handled the event.
37971 // <event>: a #GdkEventKey
37972 int propagate_key_event(Gdk2.EventKey* event) {
37973 return gtk_window_propagate_key_event(&this, event);
37976 // Reverses the effects of gtk_window_add_accel_group().
37977 // <accel_group>: a #GtkAccelGroup
37978 void remove_accel_group(AccelGroup* accel_group) {
37979 gtk_window_remove_accel_group(&this, accel_group);
37981 void remove_embedded_xid(Gdk2.NativeWindow xid) {
37982 gtk_window_remove_embedded_xid(&this, xid);
37985 // Removes a mnemonic from this window.
37986 // <keyval>: the mnemonic
37987 // <target>: the widget that gets activated by the mnemonic
37988 void remove_mnemonic(uint keyval, Widget* target) {
37989 gtk_window_remove_mnemonic(&this, keyval, target);
37992 // Hides @window, then reshows it, resetting the
37993 // default size and position of the window. Used
37994 // by GUI builders only.
37995 void reshow_with_initial_size() {
37996 gtk_window_reshow_with_initial_size(&this);
37999 // Resizes the window as if the user had done so, obeying geometry
38000 // constraints. The default geometry constraint is that windows may
38001 // not be smaller than their size request; to override this
38002 // constraint, call gtk_widget_set_size_request() to set the window's
38003 // request to a smaller value.
38004 // If gtk_window_resize() is called before showing a window for the
38005 // first time, it overrides any default size set with
38006 // gtk_window_set_default_size().
38007 // Windows may not be resized smaller than 1 by 1 pixels.
38008 // <width>: width in pixels to resize the window to
38009 // <height>: height in pixels to resize the window to
38010 void resize(int width, int height) {
38011 gtk_window_resize(&this, width, height);
38014 // Windows may set a hint asking the desktop environment not to receive
38015 // the input focus. This function sets this hint.
38016 // <setting>: %TRUE to let this window receive input focus
38017 void set_accept_focus(int setting) {
38018 gtk_window_set_accept_focus(&this, setting);
38021 // By default, windows are decorated with a title bar, resize
38022 // controls, etc. Some <link linkend="gtk-X11-arch">window
38023 // managers</link> allow GTK+ to disable these decorations, creating a
38024 // borderless window. If you set the decorated property to %FALSE
38025 // using this function, GTK+ will do its best to convince the window
38026 // manager not to decorate the window. Depending on the system, this
38027 // function may not have any effect when called on a window that is
38028 // already visible, so you should call it before calling gtk_window_show().
38029 // On Windows, this function always works, since there's no window manager
38030 // policy involved.
38031 // <setting>: %TRUE to decorate the window
38032 void set_decorated(int setting) {
38033 gtk_window_set_decorated(&this, setting);
38036 // The default widget is the widget that's activated when the user
38037 // presses Enter in a dialog (for example). This function sets or
38038 // unsets the default widget for a #GtkWindow about. When setting
38039 // (rather than unsetting) the default widget it's generally easier to
38040 // call gtk_widget_grab_focus() on the widget. Before making a widget
38041 // the default widget, you must set the #GTK_CAN_DEFAULT flag on the
38042 // widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().
38043 // <default_widget>: widget to be the default, or %NULL to unset the default widget for the toplevel.
38044 void set_default(Widget* default_widget=null) {
38045 gtk_window_set_default(&this, default_widget);
38048 // Sets the default size of a window. If the window's "natural" size
38049 // (its size request) is larger than the default, the default will be
38050 // ignored. More generally, if the default size does not obey the
38051 // geometry hints for the window (gtk_window_set_geometry_hints() can
38052 // be used to set these explicitly), the default size will be clamped
38053 // to the nearest permitted size.
38054 // Unlike gtk_widget_set_size_request(), which sets a size request for
38055 // a widget and thus would keep users from shrinking the window, this
38056 // function only sets the initial size, just as if the user had
38057 // resized the window themselves. Users can still shrink the window
38058 // again as they normally would. Setting a default size of -1 means to
38059 // use the "natural" default size (the size request of the window).
38060 // For more control over a window's initial size and how resizing works,
38061 // investigate gtk_window_set_geometry_hints().
38062 // For some uses, gtk_window_resize() is a more appropriate function.
38063 // gtk_window_resize() changes the current size of the window, rather
38064 // than the size to be used on initial display. gtk_window_resize() always
38065 // affects the window itself, not the geometry widget.
38066 // The default size of a window only affects the first time a window is
38067 // shown; if a window is hidden and re-shown, it will remember the size
38068 // it had prior to hiding, rather than using the default size.
38069 // Windows can't actually be 0x0 in size, they must be at least 1x1, but
38070 // passing 0 for @width and @height is OK, resulting in a 1x1 default size.
38071 // <width>: width in pixels, or -1 to unset the default width
38072 // <height>: height in pixels, or -1 to unset the default height
38073 void set_default_size(int width, int height) {
38074 gtk_window_set_default_size(&this, width, height);
38077 // By default, windows have a close button in the window frame. Some
38078 // <link linkend="gtk-X11-arch">window managers</link> allow GTK+ to
38079 // disable this button. If you set the deletable property to %FALSE
38080 // using this function, GTK+ will do its best to convince the window
38081 // manager not to show a close button. Depending on the system, this
38082 // function may not have any effect when called on a window that is
38083 // already visible, so you should call it before calling gtk_window_show().
38084 // On Windows, this function always works, since there's no window manager
38085 // policy involved.
38086 // <setting>: %TRUE to decorate the window as deletable
38087 void set_deletable(int setting) {
38088 gtk_window_set_deletable(&this, setting);
38091 // If @setting is %TRUE, then destroying the transient parent of @window
38092 // will also destroy @window itself. This is useful for dialogs that
38093 // shouldn't persist beyond the lifetime of the main window they're
38094 // associated with, for example.
38095 // <setting>: whether to destroy @window with its transient parent
38096 void set_destroy_with_parent(int setting) {
38097 gtk_window_set_destroy_with_parent(&this, setting);
38100 // If @focus is not the current focus widget, and is focusable, sets
38101 // it as the focus widget for the window. If @focus is %NULL, unsets
38102 // the focus widget for this window. To set the focus to a particular
38103 // widget in the toplevel, it is usually more convenient to use
38104 // gtk_widget_grab_focus() instead of this function.
38105 // <focus>: widget to be the new focus widget, or %NULL to unset any focus widget for the toplevel window.
38106 void set_focus(Widget* focus=null) {
38107 gtk_window_set_focus(&this, focus);
38110 // Windows may set a hint asking the desktop environment not to receive
38111 // the input focus when the window is mapped. This function sets this
38112 // hint.
38113 // <setting>: %TRUE to let this window receive input focus on map
38114 void set_focus_on_map(int setting) {
38115 gtk_window_set_focus_on_map(&this, setting);
38118 // (Note: this is a special-purpose function intended for the framebuffer
38119 // port; see gtk_window_set_has_frame(). It will have no effect on the
38120 // window border drawn by the window manager, which is the normal
38121 // case when using the X Window system.)
38122 // For windows with frames (see gtk_window_set_has_frame()) this function
38123 // can be used to change the size of the frame border.
38124 // <left>: The width of the left border
38125 // <top>: The height of the top border
38126 // <right>: The width of the right border
38127 // <bottom>: The height of the bottom border
38128 void set_frame_dimensions(int left, int top, int right, int bottom) {
38129 gtk_window_set_frame_dimensions(&this, left, top, right, bottom);
38132 // This function sets up hints about how a window can be resized by
38133 // the user. You can set a minimum and maximum size; allowed resize
38134 // increments (e.g. for xterm, you can only resize by the size of a
38135 // character); aspect ratios; and more. See the #GdkGeometry struct.
38136 // <geometry_widget>: widget the geometry hints will be applied to
38137 // <geometry>: struct containing geometry information
38138 // <geom_mask>: mask indicating which struct fields should be paid attention to
38139 void set_geometry_hints(Widget* geometry_widget, Gdk2.Geometry* geometry, Gdk2.WindowHints geom_mask) {
38140 gtk_window_set_geometry_hints(&this, geometry_widget, geometry, geom_mask);
38143 // Window gravity defines the meaning of coordinates passed to
38144 // gtk_window_move(). See gtk_window_move() and #GdkGravity for
38145 // more details.
38146 // The default window gravity is #GDK_GRAVITY_NORTH_WEST which will
38147 // typically "do what you mean."
38148 // <gravity>: window gravity
38149 void set_gravity(Gdk2.Gravity gravity) {
38150 gtk_window_set_gravity(&this, gravity);
38153 // (Note: this is a special-purpose function for the framebuffer port,
38154 // that causes GTK+ to draw its own window border. For most applications,
38155 // you want gtk_window_set_decorated() instead, which tells the window
38156 // manager whether to draw the window border.)
38157 // If this function is called on a window with setting of %TRUE, before
38158 // it is realized or showed, it will have a "frame" window around
38159 // frame_event you can receive all events targeted at the frame.
38160 // This function is used by the linux-fb port to implement managed
38161 // windows, but it could conceivably be used by X-programs that
38162 // want to do their own window decorations.
38163 // <setting>: a boolean
38164 void set_has_frame(int setting) {
38165 gtk_window_set_has_frame(&this, setting);
38168 // Sets up the icon representing a #GtkWindow. This icon is used when
38169 // the window is minimized (also known as iconified). Some window
38170 // managers or desktop environments may also place it in the window
38171 // frame, or display it in other contexts.
38172 // The icon should be provided in whatever size it was naturally
38173 // drawn; that is, don't scale the image before passing it to
38174 // GTK+. Scaling is postponed until the last minute, when the desired
38175 // final size is known, to allow best quality.
38176 // If you have your icon hand-drawn in multiple sizes, use
38177 // gtk_window_set_icon_list(). Then the best size will be used.
38178 // This function is equivalent to calling gtk_window_set_icon_list()
38179 // with a 1-element list.
38180 // See also gtk_window_set_default_icon_list() to set the icon
38181 // for all windows in your application in one go.
38182 // <icon>: icon image, or %NULL
38183 void set_icon(GdkPixbuf2.Pixbuf* icon=null) {
38184 gtk_window_set_icon(&this, icon);
38187 // Sets the icon for @window.
38188 // Warns on failure if @err is %NULL.
38189 // This function is equivalent to calling gtk_window_set_icon()
38190 // with a pixbuf created by loading the image from @filename.
38191 // RETURNS: %TRUE if setting the icon succeeded.
38192 // <filename>: location of icon file
38193 int set_icon_from_file(char* filename, GLib2.Error** error=null) {
38194 return gtk_window_set_icon_from_file(&this, filename, error);
38197 // Sets up the icon representing a #GtkWindow. The icon is used when
38198 // the window is minimized (also known as iconified). Some window
38199 // managers or desktop environments may also place it in the window
38200 // frame, or display it in other contexts.
38201 // gtk_window_set_icon_list() allows you to pass in the same icon in
38202 // several hand-drawn sizes. The list should contain the natural sizes
38203 // your icon is available in; that is, don't scale the image before
38204 // passing it to GTK+. Scaling is postponed until the last minute,
38205 // when the desired final size is known, to allow best quality.
38206 // By passing several sizes, you may improve the final image quality
38207 // of the icon, by reducing or eliminating automatic image scaling.
38208 // larger images (64x64, 128x128) if you have them.
38209 // See also gtk_window_set_default_icon_list() to set the icon
38210 // for all windows in your application in one go.
38211 // Note that transient windows (those who have been set transient for another
38212 // window using gtk_window_set_transient_for()) will inherit their
38213 // icon from their transient parent. So there's no need to explicitly
38214 // set the icon on transient windows.
38215 // <list>: list of #GdkPixbuf
38216 void set_icon_list(GLib2.List* list) {
38217 gtk_window_set_icon_list(&this, list);
38220 // Sets the icon for the window from a named themed icon. See
38221 // the docs for #GtkIconTheme for more details.
38222 // Note that this has nothing to do with the WM_ICON_NAME
38223 // property which is mentioned in the ICCCM.
38224 // <name>: the name of the themed icon
38225 void set_icon_name(char* name=null) {
38226 gtk_window_set_icon_name(&this, name);
38229 // Asks to keep @window above, so that it stays on top. Note that
38230 // you shouldn't assume the window is definitely above afterward,
38231 // because other entities (e.g. the user or <link
38232 // linkend="gtk-X11-arch">window manager</link>) could not keep it above,
38233 // and not all window managers support keeping windows above. But
38234 // normally the window will end kept above. Just don't write code
38235 // that crashes if not.
38236 // It's permitted to call this function before showing a window,
38237 // in which case the window will be kept above when it appears onscreen
38238 // initially.
38239 // You can track the above state via the "window-state-event" signal
38240 // on #GtkWidget.
38241 // Note that, according to the <ulink
38242 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
38243 // Manager Hints</ulink> specification, the above state is mainly meant
38244 // for user preferences and should not be used by applications e.g. for
38245 // drawing attention to their dialogs.
38246 // <setting>: whether to keep @window above other windows
38247 void set_keep_above(int setting) {
38248 gtk_window_set_keep_above(&this, setting);
38251 // Asks to keep @window below, so that it stays in bottom. Note that
38252 // you shouldn't assume the window is definitely below afterward,
38253 // because other entities (e.g. the user or <link
38254 // linkend="gtk-X11-arch">window manager</link>) could not keep it below,
38255 // and not all window managers support putting windows below. But
38256 // normally the window will be kept below. Just don't write code
38257 // that crashes if not.
38258 // It's permitted to call this function before showing a window,
38259 // in which case the window will be kept below when it appears onscreen
38260 // initially.
38261 // You can track the below state via the "window-state-event" signal
38262 // on #GtkWidget.
38263 // Note that, according to the <ulink
38264 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
38265 // Manager Hints</ulink> specification, the above state is mainly meant
38266 // for user preferences and should not be used by applications e.g. for
38267 // drawing attention to their dialogs.
38268 // <setting>: whether to keep @window below other windows
38269 void set_keep_below(int setting) {
38270 gtk_window_set_keep_below(&this, setting);
38273 // Sets the mnemonic modifier for this window.
38274 // <modifier>: the modifier mask used to activate mnemonics on this window.
38275 void set_mnemonic_modifier(Gdk2.ModifierType modifier) {
38276 gtk_window_set_mnemonic_modifier(&this, modifier);
38279 // Sets the #GtkWindow:mnemonics-visible property.
38280 // <setting>: the new value
38281 void set_mnemonics_visible(int setting) {
38282 gtk_window_set_mnemonics_visible(&this, setting);
38285 // Sets a window modal or non-modal. Modal windows prevent interaction
38286 // with other windows in the same application. To keep modal dialogs
38287 // on top of main application windows, use
38288 // gtk_window_set_transient_for() to make the dialog transient for the
38289 // parent; most <link linkend="gtk-X11-arch">window managers</link>
38290 // will then disallow lowering the dialog below the parent.
38291 // <modal>: whether the window is modal
38292 void set_modal(int modal) {
38293 gtk_window_set_modal(&this, modal);
38296 // Request the windowing system to make @window partially transparent,
38297 // with opacity 0 being fully transparent and 1 fully opaque. (Values
38298 // of the opacity parameter are clamped to the [0,1] range.) On X11
38299 // this has any effect only on X screens with a compositing manager
38300 // running. See gtk_widget_is_composited(). On Windows it should work
38301 // always.
38302 // Note that setting a window's opacity after the window has been
38303 // shown causes it to flicker once on Windows.
38304 // <opacity>: desired opacity, between 0 and 1
38305 void set_opacity(double opacity) {
38306 gtk_window_set_opacity(&this, opacity);
38308 void set_policy(int allow_shrink, int allow_grow, int auto_shrink) {
38309 gtk_window_set_policy(&this, allow_shrink, allow_grow, auto_shrink);
38312 // Sets a position constraint for this window. If the old or new
38313 // constraint is %GTK_WIN_POS_CENTER_ALWAYS, this will also cause
38314 // the window to be repositioned to satisfy the new constraint.
38315 // <position>: a position constraint.
38316 void set_position(WindowPosition position) {
38317 gtk_window_set_position(&this, position);
38320 // Sets whether the user can resize a window. Windows are user resizable
38321 // by default.
38322 // <resizable>: %TRUE if the user can resize this window
38323 void set_resizable(int resizable) {
38324 gtk_window_set_resizable(&this, resizable);
38327 // This function is only useful on X11, not with other GTK+ targets.
38328 // In combination with the window title, the window role allows a
38329 // <link linkend="gtk-X11-arch">window manager</link> to identify "the
38330 // same" window when an application is restarted. So for example you
38331 // might set the "toolbox" role on your app's toolbox window, so that
38332 // when the user restarts their session, the window manager can put
38333 // the toolbox back in the same place.
38334 // If a window already has a unique title, you don't need to set the
38335 // role, since the WM can use the title to identify the window when
38336 // restoring the session.
38337 // <role>: unique identifier for the window to be used when restoring a session
38338 void set_role(char* role) {
38339 gtk_window_set_role(&this, role);
38342 // Sets the #GdkScreen where the @window is displayed; if
38343 // the window is already mapped, it will be unmapped, and
38344 // then remapped on the new screen.
38345 // <screen>: a #GdkScreen.
38346 void set_screen(Gdk2.Screen* screen) {
38347 gtk_window_set_screen(&this, screen);
38350 // Windows may set a hint asking the desktop environment not to display
38351 // the window in the pager. This function sets this hint.
38352 // (A "pager" is any desktop navigation tool such as a workspace
38353 // switcher that displays a thumbnail representation of the windows
38354 // on the screen.)
38355 // <setting>: %TRUE to keep this window from appearing in the pager
38356 void set_skip_pager_hint(int setting) {
38357 gtk_window_set_skip_pager_hint(&this, setting);
38360 // Windows may set a hint asking the desktop environment not to display
38361 // the window in the task bar. This function sets this hint.
38362 // <setting>: %TRUE to keep this window from appearing in the task bar
38363 void set_skip_taskbar_hint(int setting) {
38364 gtk_window_set_skip_taskbar_hint(&this, setting);
38367 // Startup notification identifiers are used by desktop environment to
38368 // track application startup, to provide user feedback and other
38369 // features. This function changes the corresponding property on the
38370 // underlying GdkWindow. Normally, startup identifier is managed
38371 // automatically and you should only use this function in special cases
38372 // like transferring focus from other processes. You should use this
38373 // function before calling gtk_window_present() or any equivalent
38374 // function generating a window map event.
38375 // This function is only useful on X11, not with other GTK+ targets.
38376 // <startup_id>: a string with startup-notification identifier
38377 void set_startup_id(char* startup_id) {
38378 gtk_window_set_startup_id(&this, startup_id);
38381 // Sets the title of the #GtkWindow. The title of a window will be
38382 // displayed in its title bar; on the X Window System, the title bar
38383 // is rendered by the <link linkend="gtk-X11-arch">window
38384 // manager</link>, so exactly how the title appears to users may vary
38385 // according to a user's exact configuration. The title should help a
38386 // user distinguish this window from other windows they may have
38387 // open. A good title might include the application name and current
38388 // document filename, for example.
38389 // <title>: title of the window
38390 void set_title(char* title) {
38391 gtk_window_set_title(&this, title);
38394 // Dialog windows should be set transient for the main application
38395 // window they were spawned from. This allows <link
38396 // linkend="gtk-X11-arch">window managers</link> to e.g. keep the
38397 // dialog on top of the main window, or center the dialog over the
38398 // main window. gtk_dialog_new_with_buttons() and other convenience
38399 // functions in GTK+ will sometimes call
38400 // gtk_window_set_transient_for() on your behalf.
38401 // Passing %NULL for @parent unsets the current transient window.
38402 // On Windows, this function puts the child window on top of the parent,
38403 // much as the window manager would have done on X.
38404 // <parent>: parent window, or %NULL
38405 void set_transient_for(Window* parent=null) {
38406 gtk_window_set_transient_for(&this, parent);
38409 // By setting the type hint for the window, you allow the window
38410 // manager to decorate and handle the window in a way which is
38411 // suitable to the function of the window in your application.
38412 // This function should be called before the window becomes visible.
38413 // gtk_dialog_new_with_buttons() and other convenience functions in GTK+
38414 // will sometimes call gtk_window_set_type_hint() on your behalf.
38415 // <hint>: the window type
38416 void set_type_hint(Gdk2.WindowTypeHint hint) {
38417 gtk_window_set_type_hint(&this, hint);
38420 // Windows may set a hint asking the desktop environment to draw
38421 // the users attention to the window. This function sets this hint.
38422 // <setting>: %TRUE to mark this window as urgent
38423 void set_urgency_hint(int setting) {
38424 gtk_window_set_urgency_hint(&this, setting);
38427 // Don't use this function. It sets the X Window System "class" and
38428 // "name" hints for a window. According to the ICCCM, you should
38429 // always set these to the same value for all windows in an
38430 // application, and GTK+ sets them to that value by default, so calling
38431 // this function is sort of pointless. However, you may want to call
38432 // gtk_window_set_role() on each window in your application, for the
38433 // benefit of the session manager. Setting the role allows the window
38434 // manager to restore window positions when loading a saved session.
38435 // <wmclass_name>: window name hint
38436 // <wmclass_class>: window class hint
38437 void set_wmclass(char* wmclass_name, char* wmclass_class) {
38438 gtk_window_set_wmclass(&this, wmclass_name, wmclass_class);
38441 // Asks to stick @window, which means that it will appear on all user
38442 // desktops. Note that you shouldn't assume the window is definitely
38443 // stuck afterward, because other entities (e.g. the user or <link
38444 // linkend="gtk-X11-arch">window manager</link>) could unstick it
38445 // again, and some window managers do not support sticking
38446 // windows. But normally the window will end up stuck. Just don't
38447 // write code that crashes if not.
38448 // It's permitted to call this function before showing a window.
38449 // You can track stickiness via the "window-state-event" signal
38450 // on #GtkWidget.
38451 void stick() {
38452 gtk_window_stick(&this);
38455 // Asks to toggle off the fullscreen state for @window. Note that you
38456 // shouldn't assume the window is definitely not full screen
38457 // afterward, because other entities (e.g. the user or <link
38458 // linkend="gtk-X11-arch">window manager</link>) could fullscreen it
38459 // again, and not all window managers honor requests to unfullscreen
38460 // windows. But normally the window will end up restored to its normal
38461 // state. Just don't write code that crashes if not.
38462 // You can track the fullscreen state via the "window-state-event" signal
38463 // on #GtkWidget.
38464 void unfullscreen() {
38465 gtk_window_unfullscreen(&this);
38468 // Asks to unmaximize @window. Note that you shouldn't assume the
38469 // window is definitely unmaximized afterward, because other entities
38470 // (e.g. the user or <link linkend="gtk-X11-arch">window
38471 // manager</link>) could maximize it again, and not all window
38472 // managers honor requests to unmaximize. But normally the window will
38473 // end up unmaximized. Just don't write code that crashes if not.
38474 // You can track maximization via the "window-state-event" signal
38475 // on #GtkWidget.
38476 void unmaximize() {
38477 gtk_window_unmaximize(&this);
38480 // Asks to unstick @window, which means that it will appear on only
38481 // one of the user's desktops. Note that you shouldn't assume the
38482 // window is definitely unstuck afterward, because other entities
38483 // (e.g. the user or <link linkend="gtk-X11-arch">window
38484 // manager</link>) could stick it again. But normally the window will
38485 // end up stuck. Just don't write code that crashes if not.
38486 // You can track stickiness via the "window-state-event" signal
38487 // on #GtkWidget.
38488 void unstick() {
38489 gtk_window_unstick(&this);
38492 // The ::activate-default signal is a
38493 // <link linkend="keybinding-signals">keybinding signal</link>
38494 // which gets emitted when the user activates the default widget
38495 // of @window.
38496 extern (C) alias static void function (Window* this_, void* user_data=null) signal_activate_default;
38498 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38499 return super_.signal_connect!name(cb, data, cf);
38502 ulong signal_connect(string name:"activate-default", CB/*:signal_activate_default*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38503 return signal_connect_data(&this, cast(char*)"activate-default",
38504 cast(GObject2.Callback)cb, data, null, cf);
38507 // The ::activate-focus signal is a
38508 // <link linkend="keybinding-signals">keybinding signal</link>
38509 // which gets emitted when the user activates the currently
38510 // focused widget of @window.
38511 extern (C) alias static void function (Window* this_, void* user_data=null) signal_activate_focus;
38512 ulong signal_connect(string name:"activate-focus", CB/*:signal_activate_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38513 return signal_connect_data(&this, cast(char*)"activate-focus",
38514 cast(GObject2.Callback)cb, data, null, cf);
38516 extern (C) alias static c_int function (Window* this_, Gdk2.Event* object, void* user_data=null) signal_frame_event;
38517 ulong signal_connect(string name:"frame-event", CB/*:signal_frame_event*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38518 return signal_connect_data(&this, cast(char*)"frame-event",
38519 cast(GObject2.Callback)cb, data, null, cf);
38522 // The ::keys-changed signal gets emitted when the set of accelerators
38523 // or mnemonics that are associated with @window changes.
38524 extern (C) alias static void function (Window* this_, void* user_data=null) signal_keys_changed;
38525 ulong signal_connect(string name:"keys-changed", CB/*:signal_keys_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38526 return signal_connect_data(&this, cast(char*)"keys-changed",
38527 cast(GObject2.Callback)cb, data, null, cf);
38529 extern (C) alias static void function (Window* this_, Widget* object, void* user_data=null) signal_set_focus;
38530 ulong signal_connect(string name:"set-focus", CB/*:signal_set_focus*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38531 return signal_connect_data(&this, cast(char*)"set-focus",
38532 cast(GObject2.Callback)cb, data, null, cf);
38536 struct WindowClass {
38537 BinClass parent_class;
38538 // <focus>: widget to be the new focus widget, or %NULL to unset any focus widget for the toplevel window.
38539 extern (C) void function (Window* window, Widget* focus=null) set_focus;
38540 extern (C) int function (Window* window, Gdk2.Event* event) frame_event;
38541 extern (C) void function (Window* window) activate_focus;
38542 extern (C) void function (Window* window) activate_default;
38543 extern (C) void function (Window* window, DirectionType direction) move_focus;
38544 extern (C) void function (Window* window) keys_changed;
38545 extern (C) void function () _gtk_reserved1;
38546 extern (C) void function () _gtk_reserved2;
38547 extern (C) void function () _gtk_reserved3;
38548 extern (C) void function () _gtk_reserved4;
38551 struct WindowGeometryInfo {
38554 struct WindowGroup /* : GObject.Object */ {
38555 alias parent_instance this;
38556 alias parent_instance super_;
38557 alias parent_instance object;
38558 GObject2.Object parent_instance;
38559 GLib2.SList* grabs;
38562 // Creates a new #GtkWindowGroup object. Grabs added with
38563 // gtk_grab_add() only affect windows within the same #GtkWindowGroup.
38564 // RETURNS: a new #GtkWindowGroup.
38565 static WindowGroup* /*new*/ new_() {
38566 return gtk_window_group_new();
38569 // Adds a window to a #GtkWindowGroup.
38570 // <window>: the #GtkWindow to add
38571 void add_window(Window* window) {
38572 gtk_window_group_add_window(&this, window);
38574 // Unintrospectable method: get_current_grab() / gtk_window_group_get_current_grab()
38575 Widget* get_current_grab() {
38576 return gtk_window_group_get_current_grab(&this);
38579 // Returns a list of the #GtkWindows that belong to @window_group.
38580 // windows inside the group.
38581 // RETURNS: A newly-allocated list of
38582 GLib2.List* /*new container*/ list_windows() {
38583 return gtk_window_group_list_windows(&this);
38586 // Removes a window from a #GtkWindowGroup.
38587 // <window>: the #GtkWindow to remove
38588 void remove_window(Window* window) {
38589 gtk_window_group_remove_window(&this, window);
38593 struct WindowGroupClass {
38594 GObject2.ObjectClass parent_class;
38595 extern (C) void function () _gtk_reserved1;
38596 extern (C) void function () _gtk_reserved2;
38597 extern (C) void function () _gtk_reserved3;
38598 extern (C) void function () _gtk_reserved4;
38601 extern (C) alias void function (Window* window, uint keyval, Gdk2.ModifierType modifiers, int is_mnemonic, void* data) WindowKeysForeachFunc;
38603 enum WindowPosition {
38604 NONE = 0,
38605 CENTER = 1,
38606 MOUSE = 2,
38607 CENTER_ALWAYS = 3,
38608 CENTER_ON_PARENT = 4
38610 enum WindowType {
38611 TOPLEVEL = 0,
38612 POPUP = 1
38614 enum WrapMode {
38615 NONE = 0,
38616 CHAR = 1,
38617 WORD = 2,
38618 WORD_CHAR = 3
38621 // Finds the first accelerator in any #GtkAccelGroup attached
38622 // to @object that matches @accel_key and @accel_mods, and
38623 // activates that accelerator.
38624 // RETURNS: %TRUE if an accelerator was activated and handled this keypress
38625 // <object>: the #GObject, usually a #GtkWindow, on which to activate the accelerator.
38626 // <accel_key>: accelerator keyval from a key event
38627 // <accel_mods>: keyboard state mask from a key event
38628 static int accel_groups_activate(GObject2.Object* object, uint accel_key, Gdk2.ModifierType accel_mods) {
38629 return gtk_accel_groups_activate(object, accel_key, accel_mods);
38633 // Gets a list of all accel groups which are attached to @object.
38634 // RETURNS: a list of all accel groups which are attached to @object
38635 // <object>: a #GObject, usually a #GtkWindow
38636 static GLib2.SList* accel_groups_from_object(GObject2.Object* object) {
38637 return gtk_accel_groups_from_object(object);
38641 // Gets the value set by gtk_accelerator_set_default_mod_mask().
38642 // RETURNS: the default accelerator modifier mask
38643 static uint accelerator_get_default_mod_mask() {
38644 return gtk_accelerator_get_default_mod_mask();
38648 // Converts an accelerator keyval and modifier mask into a string
38649 // which can be used to represent the accelerator to the user.
38650 // RETURNS: a newly-allocated string representing the accelerator.
38651 // <accelerator_key>: accelerator keyval
38652 // <accelerator_mods>: accelerator modifier mask
38653 static char* /*new*/ accelerator_get_label(uint accelerator_key, Gdk2.ModifierType accelerator_mods) {
38654 return gtk_accelerator_get_label(accelerator_key, accelerator_mods);
38658 // Converts an accelerator keyval and modifier mask
38659 // into a string parseable by gtk_accelerator_parse().
38660 // For example, if you pass in #GDK_q and #GDK_CONTROL_MASK,
38661 // this function returns "&lt;Control&gt;q".
38662 // If you need to display accelerators in the user interface,
38663 // see gtk_accelerator_get_label().
38664 // RETURNS: a newly-allocated accelerator name
38665 // <accelerator_key>: accelerator keyval
38666 // <accelerator_mods>: accelerator modifier mask
38667 static char* /*new*/ accelerator_name(uint accelerator_key, Gdk2.ModifierType accelerator_mods) {
38668 return gtk_accelerator_name(accelerator_key, accelerator_mods);
38672 // Parses a string representing an accelerator. The
38673 // format looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
38674 // "&lt;Release&gt;z" (the last one is for key release).
38675 // The parser is fairly liberal and allows lower or upper case,
38676 // and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
38677 // Key names are parsed using gdk_keyval_from_name(). For character keys the
38678 // name is not the symbol, but the lowercase name, e.g. one would use
38679 // "&lt;Ctrl&gt;minus" instead of "&lt;Ctrl&gt;-".
38680 // If the parse fails, @accelerator_key and @accelerator_mods will
38681 // be set to 0 (zero).
38682 // <accelerator>: string representing an accelerator
38683 // <accelerator_key>: return location for accelerator keyval
38684 // <accelerator_mods>: return location for accelerator modifier mask
38685 static void accelerator_parse(char* accelerator, /*out*/ uint* accelerator_key=null, /*out*/ Gdk2.ModifierType* accelerator_mods=null) {
38686 gtk_accelerator_parse(accelerator, accelerator_key, accelerator_mods);
38690 // Sets the modifiers that will be considered significant for keyboard
38691 // accelerators. The default mod mask is #GDK_CONTROL_MASK |
38692 // #GDK_SHIFT_MASK | #GDK_MOD1_MASK | #GDK_SUPER_MASK |
38693 // #GDK_HYPER_MASK | #GDK_META_MASK, that is, Control, Shift, Alt,
38694 // Super, Hyper and Meta. Other modifiers will by default be ignored
38695 // by #GtkAccelGroup.
38696 // You must include at least the three modifiers Control, Shift
38697 // and Alt in any value you pass to this function.
38698 // The default mod mask should be changed on application startup,
38699 // before using any accelerator groups.
38700 // <default_mod_mask>: accelerator modifier mask
38701 static void accelerator_set_default_mod_mask(Gdk2.ModifierType default_mod_mask) {
38702 gtk_accelerator_set_default_mod_mask(default_mod_mask);
38706 // Determines whether a given keyval and modifier mask constitute
38707 // a valid keyboard accelerator. For example, the #GDK_a keyval
38708 // plus #GDK_CONTROL_MASK is valid - this is a "Ctrl+a" accelerator.
38709 // But, you can't, for instance, use the #GDK_Control_L keyval
38710 // as an accelerator.
38711 // RETURNS: %TRUE if the accelerator is valid
38712 // <keyval>: a GDK keyval
38713 // <modifiers>: modifier mask
38714 static int accelerator_valid(uint keyval, Gdk2.ModifierType modifiers) {
38715 return gtk_accelerator_valid(keyval, modifiers);
38719 // Returns %TRUE if dialogs are expected to use an alternative
38720 // button order on the screen @screen. See
38721 // gtk_dialog_set_alternative_button_order() for more details
38722 // about alternative button order.
38723 // If you need to use this function, you should probably connect
38724 // to the ::notify:gtk-alternative-button-order signal on the
38725 // #GtkSettings object associated to @screen, in order to be
38726 // notified if the button order setting changes.
38727 // RETURNS: Whether the alternative button order should be used
38728 // <screen>: a #GdkScreen, or %NULL to use the default screen
38729 static int alternative_dialog_button_order(Gdk2.Screen* screen=null) {
38730 return gtk_alternative_dialog_button_order(screen);
38734 // Unintrospectable function: binding_entry_add_signal() / gtk_binding_entry_add_signal()
38735 // Override or install a new key binding for @keyval with @modifiers on
38736 // emitted on the target widget, with @n_args @Varargs used as
38737 // arguments.
38738 // <binding_set>: a #GtkBindingSet to install an entry for
38739 // <keyval>: key value of binding to install
38740 // <modifiers>: key modifier of binding to install
38741 // <signal_name>: signal to execute upon activation
38742 // <n_args>: number of arguments to @signal_name
38743 alias gtk_binding_entry_add_signal binding_entry_add_signal; // Variadic
38746 // Override or install a new key binding for @keyval with @modifiers on
38747 // <binding_set>: a #GtkBindingSet to add a signal to
38748 // <keyval>: key value
38749 // <modifiers>: key modifier
38750 // <signal_name>: signal name to be bound
38751 // <binding_args>: list of #GtkBindingArg signal arguments
38752 static void binding_entry_add_signall(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, GLib2.SList* binding_args) {
38753 gtk_binding_entry_add_signall(binding_set, keyval, modifiers, signal_name, binding_args);
38757 // Clears a binding entry.
38758 // <binding_set>: binding set to clear an entry of
38759 // <keyval>: key value of binding to clear
38760 // <modifiers>: key modifier of binding to clear
38761 static void binding_entry_clear(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) {
38762 gtk_binding_entry_clear(binding_set, keyval, modifiers);
38766 // Remove a binding previously installed via
38767 // gtk_binding_entry_add_signal() on @binding_set.
38768 // <binding_set>: a #GtkBindingSet to remove an entry of
38769 // <keyval>: key value of binding to remove
38770 // <modifiers>: key modifier of binding to remove
38771 static void binding_entry_remove(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) {
38772 gtk_binding_entry_remove(binding_set, keyval, modifiers);
38776 // Install a binding on @binding_set which causes key lookups
38777 // to be aborted, to prevent bindings from lower priority sets
38778 // to be activated.
38779 // <binding_set>: a #GtkBindingSet to skip an entry of
38780 // <keyval>: key value of binding to skip
38781 // <modifiers>: key modifier of binding to skip
38782 static void binding_entry_skip(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) {
38783 gtk_binding_entry_skip(binding_set, keyval, modifiers);
38787 // Parse a binding entry from a gtkrc file.
38788 // RETURNS: expected token upon errors, %G_TOKEN_NONE on success.
38789 // <scanner>: GtkRC scanner
38790 static uint binding_parse_binding(GLib2.Scanner* scanner) {
38791 return gtk_binding_parse_binding(scanner);
38795 // Unintrospectable function: binding_set_by_class() / gtk_binding_set_by_class()
38796 // This function returns the binding set named after the type name of
38797 // the passed in class structure. New binding sets are created on
38798 // demand by this function.
38799 // RETURNS: the binding set corresponding to @object_class
38800 // <object_class>: a valid #GtkObject class
38801 static BindingSet* binding_set_by_class(void* object_class) {
38802 return gtk_binding_set_by_class(object_class);
38806 // Find a binding set by its globally unique name. The @set_name can
38807 // either be a name used for gtk_binding_set_new() or the type name of
38808 // a class used in gtk_binding_set_by_class().
38809 // RETURNS: %NULL or the specified binding set
38810 // <set_name>: unique binding set name
38811 static BindingSet* binding_set_find(char* set_name) {
38812 return gtk_binding_set_find(set_name);
38816 // Unintrospectable function: binding_set_new() / gtk_binding_set_new()
38817 // GTK+ maintains a global list of binding sets. Each binding set has
38818 // a unique name which needs to be specified upon creation.
38819 // RETURNS: new binding set
38820 // <set_name>: unique name of this binding set
38821 static BindingSet* binding_set_new(char* set_name) {
38822 return gtk_binding_set_new(set_name);
38826 // Find a key binding matching @keyval and @modifiers and activate the
38827 // binding on @object.
38828 // RETURNS: %TRUE if a binding was found and activated
38829 // <object>: object to activate when binding found
38830 // <keyval>: key value of the binding
38831 // <modifiers>: key modifier of the binding
38832 static int bindings_activate(Object* object, uint keyval, Gdk2.ModifierType modifiers) {
38833 return gtk_bindings_activate(object, keyval, modifiers);
38837 // Looks up key bindings for @object to find one matching
38838 // RETURNS: %TRUE if a matching key binding was found
38839 // <object>: a #GtkObject (generally must be a widget)
38840 // <event>: a #GdkEventKey
38841 static int bindings_activate_event(Object* object, Gdk2.EventKey* event) {
38842 return gtk_bindings_activate_event(object, event);
38845 static GLib2.Quark builder_error_quark() {
38846 return gtk_builder_error_quark();
38850 // Checks that the GTK+ library in use is compatible with the
38851 // given version. Generally you would pass in the constants
38852 // #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION
38853 // as the three arguments to this function; that produces
38854 // a check that the library in use is compatible with
38855 // the version of GTK+ the application or module was compiled
38856 // against.
38857 // of the running library is newer than the version
38858 // the running library must be binary compatible with the
38859 // version @required_major.required_minor.@required_micro
38860 // (same major version.)
38861 // This function is primarily for GTK+ modules; the module
38862 // can call this function to check that it wasn't loaded
38863 // into an incompatible version of GTK+. However, such a
38864 // a check isn't completely reliable, since the module may be
38865 // linked against an old version of GTK+ and calling the
38866 // old version of gtk_check_version(), but still get loaded
38867 // into an application using a newer version of GTK+.
38868 // given version, or a string describing the version mismatch.
38869 // The returned string is owned by GTK+ and should not be modified
38870 // or freed.
38871 // RETURNS: %NULL if the GTK+ library is compatible with the
38872 // <required_major>: the required major version.
38873 // <required_minor>: the required minor version.
38874 // <required_micro>: the required micro version.
38875 static char* check_version(uint required_major, uint required_minor, uint required_micro) {
38876 return gtk_check_version(required_major, required_minor, required_micro);
38879 static Type ctree_node_get_type() {
38880 return gtk_ctree_node_get_type();
38884 // Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and
38885 // gtk_parse_args() from automatically
38886 // calling <literal>setlocale (LC_ALL, "")</literal>. You would
38887 // want to use this function if you wanted to set the locale for
38888 // your program to something other than the user's locale, or if
38889 // you wanted to set different values for different locale categories.
38890 // Most programs should not need to call this function.
38891 static void disable_setlocale() {
38892 gtk_disable_setlocale();
38896 // Initiates a drag on the source side. The function
38897 // only needs to be used when the application is
38898 // starting drags itself, and is not needed when
38899 // gtk_drag_source_set() is used.
38900 // The @event is used to retrieve the timestamp that will be used internally to
38901 // grab the pointer. If @event is #NULL, then GDK_CURRENT_TIME will be used.
38902 // However, you should try to pass a real event in all cases, since that can be
38903 // used by GTK+ to get information about the start position of the drag, for
38904 // example if the @event is a GDK_MOTION_NOTIFY.
38905 // Generally there are three cases when you want to start a drag by hand by calling
38906 // this function:
38907 // 1. During a button-press-event handler, if you want to start a drag immediately
38908 // when the user presses the mouse button. Pass the @event that you have in your
38909 // button-press-event handler.
38910 // 2. During a motion-notify-event handler, if you want to start a drag when the mouse
38911 // moves past a certain threshold distance after a button-press. Pass the @event that you
38912 // have in your motion-notify-event handler.
38913 // 3. During a timeout handler, if you want to start a drag after the mouse
38914 // button is held down for some time. Try to save the last event that you got
38915 // from the mouse, using gdk_event_copy(), and pass it to this function
38916 // (remember to free the event with gdk_event_free() when you are done). If you
38917 // can really not pass a real event, pass #NULL instead.
38918 // RETURNS: the context for this drag.
38919 // <widget>: the source widget.
38920 // <targets>: The targets (data formats) in which the source can provide the data.
38921 // <actions>: A bitmask of the allowed drag actions for this drag.
38922 // <button>: The button the user clicked to start the drag.
38923 // <event>: The event that triggered the start of the drag.
38924 static Gdk2.DragContext* drag_begin(Widget* widget, TargetList* targets, Gdk2.DragAction actions, int button, Gdk2.Event* event) {
38925 return gtk_drag_begin(widget, targets, actions, button, event);
38929 // Checks to see if a mouse drag starting at (@start_x, @start_y) and ending
38930 // at (@current_x, @current_y) has passed the GTK+ drag threshold, and thus
38931 // should trigger the beginning of a drag-and-drop operation.
38932 // RETURNS: %TRUE if the drag threshold has been passed.
38933 // <widget>: a #GtkWidget
38934 // <start_x>: X coordinate of start of drag
38935 // <start_y>: Y coordinate of start of drag
38936 // <current_x>: current X coordinate
38937 // <current_y>: current Y coordinate
38938 static int drag_check_threshold(Widget* widget, int start_x, int start_y, int current_x, int current_y) {
38939 return gtk_drag_check_threshold(widget, start_x, start_y, current_x, current_y);
38943 // Add the image targets supported by #GtkSelection to
38944 // the target list of the drag destination. The targets
38945 // are added with @info = 0. If you need another value,
38946 // use gtk_target_list_add_image_targets() and
38947 // gtk_drag_dest_set_target_list().
38948 // <widget>: a #GtkWidget that's a drag destination
38949 static void drag_dest_add_image_targets(Widget* widget) {
38950 gtk_drag_dest_add_image_targets(widget);
38954 // Add the text targets supported by #GtkSelection to
38955 // the target list of the drag destination. The targets
38956 // are added with @info = 0. If you need another value,
38957 // use gtk_target_list_add_text_targets() and
38958 // gtk_drag_dest_set_target_list().
38959 // <widget>: a #GtkWidget that's a drag destination
38960 static void drag_dest_add_text_targets(Widget* widget) {
38961 gtk_drag_dest_add_text_targets(widget);
38965 // Add the URI targets supported by #GtkSelection to
38966 // the target list of the drag destination. The targets
38967 // are added with @info = 0. If you need another value,
38968 // use gtk_target_list_add_uri_targets() and
38969 // gtk_drag_dest_set_target_list().
38970 // <widget>: a #GtkWidget that's a drag destination
38971 static void drag_dest_add_uri_targets(Widget* widget) {
38972 gtk_drag_dest_add_uri_targets(widget);
38976 // and the dest can accept, or %GDK_NONE
38977 // RETURNS: first target that the source offers
38978 // <widget>: drag destination widget
38979 // <context>: drag context
38980 // <target_list>: list of droppable targets, or %NULL to use gtk_drag_dest_get_target_list (@widget). Looks for a match between the supported targets of @context and the returning %GDK_NONE. @dest_target_list should usually be the return value from gtk_drag_dest_get_target_list(), but some widgets may have different valid targets for different parts of the widget; in that case, they will have to implement a drag_motion handler that passes the correct target list to this function.
38981 static Gdk2.Atom drag_dest_find_target(Widget* widget, Gdk2.DragContext* context, TargetList* target_list=null) {
38982 return gtk_drag_dest_find_target(widget, context, target_list);
38986 // Returns the list of targets this widget can accept from
38987 // drag-and-drop.
38988 // RETURNS: the #GtkTargetList, or %NULL if none
38989 // <widget>: a #GtkWidget
38990 static TargetList* drag_dest_get_target_list(Widget* widget) {
38991 return gtk_drag_dest_get_target_list(widget);
38995 // Returns whether the widget has been configured to always
38996 // emit ::drag-motion signals.
38997 // RETURNS: %TRUE if the widget always emits ::drag-motion events
38998 // <widget>: a #GtkWidget that's a drag destination
38999 static int drag_dest_get_track_motion(Widget* widget) {
39000 return gtk_drag_dest_get_track_motion(widget);
39004 // Sets a widget as a potential drop destination, and adds default behaviors.
39005 // The default behaviors listed in @flags have an effect similar
39006 // to installing default handlers for the widget's drag-and-drop signals
39007 // (#GtkWidget:drag-motion, #GtkWidget:drag-drop, ...). They all exist
39008 // for convenience. When passing #GTK_DEST_DEFAULT_ALL for instance it is
39009 // sufficient to connect to the widget's #GtkWidget::drag-data-received
39010 // signal to get primitive, but consistent drag-and-drop support.
39011 // Things become more complicated when you try to preview the dragged data,
39012 // as described in the documentation for #GtkWidget:drag-motion. The default
39013 // behaviors described by @flags make some assumptions, that can conflict
39014 // with your own signal handlers. For instance #GTK_DEST_DEFAULT_DROP causes
39015 // invokations of gdk_drag_status() in the context of #GtkWidget:drag-motion,
39016 // and invokations of gtk_drag_finish() in #GtkWidget:drag-data-received.
39017 // Especially the later is dramatic, when your own #GtkWidget:drag-motion
39018 // handler calls gtk_drag_get_data() to inspect the dragged data.
39019 // There's no way to set a default action here, you can use the
39020 // #GtkWidget:drag-motion callback for that. Here's an example which selects
39021 // the action to use depending on whether the control key is pressed or not:
39022 // |[
39023 // static void
39024 // drag_motion (GtkWidget *widget,
39025 // GdkDragContext *context,
39026 // gint x,
39027 // gint y,
39028 // guint time)
39029 // {
39030 // GdkModifierType mask;
39031 // gdk_window_get_pointer (gtk_widget_get_window (widget),
39032 // NULL, NULL, &mask);
39033 // if (mask & GDK_CONTROL_MASK)
39034 // gdk_drag_status (context, GDK_ACTION_COPY, time);
39035 // else
39036 // gdk_drag_status (context, GDK_ACTION_MOVE, time);
39037 // }
39038 // ]|
39039 // <widget>: a #GtkWidget
39040 // <flags>: which types of default drag behavior to use
39041 // <targets>: a pointer to an array of #GtkTargetEntry<!-- -->s indicating the drop types that this @widget will accept, or %NULL. Later you can access the list with gtk_drag_dest_get_target_list() and gtk_drag_dest_find_target().
39042 // <n_targets>: the number of entries in @targets
39043 // <actions>: a bitmask of possible actions for a drop onto this @widget.
39044 static void drag_dest_set(Widget* widget, DestDefaults flags, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
39045 gtk_drag_dest_set(widget, flags, targets, n_targets, actions);
39048 static void drag_dest_set_proxy(Widget* widget, Gdk2.Window* proxy_window, Gdk2.DragProtocol protocol, int use_coordinates) {
39049 gtk_drag_dest_set_proxy(widget, proxy_window, protocol, use_coordinates);
39053 // Sets the target types that this widget can accept from drag-and-drop.
39054 // The widget must first be made into a drag destination with
39055 // gtk_drag_dest_set().
39056 // <widget>: a #GtkWidget that's a drag destination
39057 // <target_list>: list of droppable targets, or %NULL for none
39058 static void drag_dest_set_target_list(Widget* widget, TargetList* target_list=null) {
39059 gtk_drag_dest_set_target_list(widget, target_list);
39063 // Tells the widget to emit ::drag-motion and ::drag-leave
39064 // events regardless of the targets and the %GTK_DEST_DEFAULT_MOTION
39065 // flag.
39066 // This may be used when a widget wants to do generic
39067 // actions regardless of the targets that the source offers.
39068 // <widget>: a #GtkWidget that's a drag destination
39069 // <track_motion>: whether to accept all targets
39070 static void drag_dest_set_track_motion(Widget* widget, int track_motion) {
39071 gtk_drag_dest_set_track_motion(widget, track_motion);
39074 static void drag_dest_unset(Widget* widget) {
39075 gtk_drag_dest_unset(widget);
39078 static void drag_finish(Gdk2.DragContext* context, int success, int del, uint time_) {
39079 gtk_drag_finish(context, success, del, time_);
39082 static void drag_get_data(Widget* widget, Gdk2.DragContext* context, Gdk2.Atom target, uint time_) {
39083 gtk_drag_get_data(widget, context, target, time_);
39087 // Determines the source widget for a drag.
39088 // within a single application, a pointer to the source widget.
39089 // Otherwise, %NULL.
39090 // RETURNS: if the drag is occurring
39091 // <context>: a (destination side) drag context
39092 static Widget* drag_get_source_widget(Gdk2.DragContext* context) {
39093 return gtk_drag_get_source_widget(context);
39096 static void drag_highlight(Widget* widget) {
39097 gtk_drag_highlight(widget);
39101 // Changes the default drag icon. GTK+ retains references for the
39102 // arguments, and will release them when they are no longer needed.
39103 // changing the stock pixbuf for #GTK_STOCK_DND instead.
39104 // <colormap>: the colormap of the icon
39105 // <pixmap>: the image data for the icon
39106 // <mask>: the transparency mask for an image, or %NULL
39107 // <hot_x>: The X offset within @widget of the hotspot.
39108 // <hot_y>: The Y offset within @widget of the hotspot.
39109 static void drag_set_default_icon(Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y) {
39110 gtk_drag_set_default_icon(colormap, pixmap, mask, hot_x, hot_y);
39114 // Sets the icon for a particular drag to the default
39115 // icon.
39116 // <context>: the context for a drag. (This must be called
39117 static void drag_set_icon_default(Gdk2.DragContext* context) {
39118 gtk_drag_set_icon_default(context);
39122 // Sets the icon for a given drag from a named themed icon. See
39123 // the docs for #GtkIconTheme for more details. Note that the
39124 // size of the icon depends on the icon theme (the icon is
39125 // loaded at the symbolic size #GTK_ICON_SIZE_DND), thus
39126 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
39127 // <icon_name>: name of icon to use
39128 // <hot_x>: the X offset of the hotspot within the icon
39129 // <hot_y>: the Y offset of the hotspot within the icon
39130 static void drag_set_icon_name(Gdk2.DragContext* context, char* icon_name, int hot_x, int hot_y) {
39131 gtk_drag_set_icon_name(context, icon_name, hot_x, hot_y);
39135 // Sets @pixbuf as the icon for a given drag.
39136 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
39137 // <pixbuf>: the #GdkPixbuf to use as the drag icon.
39138 // <hot_x>: the X offset within @widget of the hotspot.
39139 // <hot_y>: the Y offset within @widget of the hotspot.
39140 static void drag_set_icon_pixbuf(Gdk2.DragContext* context, GdkPixbuf2.Pixbuf* pixbuf, int hot_x, int hot_y) {
39141 gtk_drag_set_icon_pixbuf(context, pixbuf, hot_x, hot_y);
39145 // Sets @pixmap as the icon for a given drag. GTK+ retains
39146 // references for the arguments, and will release them when
39147 // they are no longer needed. In general, gtk_drag_set_icon_pixbuf()
39148 // will be more convenient to use.
39149 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
39150 // <colormap>: the colormap of the icon
39151 // <pixmap>: the image data for the icon
39152 // <mask>: the transparency mask for the icon or %NULL for none.
39153 // <hot_x>: the X offset within @pixmap of the hotspot.
39154 // <hot_y>: the Y offset within @pixmap of the hotspot.
39155 static void drag_set_icon_pixmap(Gdk2.DragContext* context, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y) {
39156 gtk_drag_set_icon_pixmap(context, colormap, pixmap, mask, hot_x, hot_y);
39160 // Sets the icon for a given drag from a stock ID.
39161 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
39162 // <stock_id>: the ID of the stock icon to use for the drag.
39163 // <hot_x>: the X offset within the icon of the hotspot.
39164 // <hot_y>: the Y offset within the icon of the hotspot.
39165 static void drag_set_icon_stock(Gdk2.DragContext* context, char* stock_id, int hot_x, int hot_y) {
39166 gtk_drag_set_icon_stock(context, stock_id, hot_x, hot_y);
39170 // Changes the icon for a widget to a given widget. GTK+
39171 // will not destroy the icon, so if you don't want
39172 // it to persist, you should connect to the "drag-end"
39173 // signal and destroy it yourself.
39174 // <context>: the context for a drag. (This must be called
39175 // <widget>: a toplevel window to use as an icon.
39176 // <hot_x>: the X offset within @widget of the hotspot.
39177 // <hot_y>: the Y offset within @widget of the hotspot.
39178 static void drag_set_icon_widget(Gdk2.DragContext* context, Widget* widget, int hot_x, int hot_y) {
39179 gtk_drag_set_icon_widget(context, widget, hot_x, hot_y);
39183 // Add the writable image targets supported by #GtkSelection to
39184 // the target list of the drag source. The targets
39185 // are added with @info = 0. If you need another value,
39186 // use gtk_target_list_add_image_targets() and
39187 // gtk_drag_source_set_target_list().
39188 // <widget>: a #GtkWidget that's is a drag source
39189 static void drag_source_add_image_targets(Widget* widget) {
39190 gtk_drag_source_add_image_targets(widget);
39194 // Add the text targets supported by #GtkSelection to
39195 // the target list of the drag source. The targets
39196 // are added with @info = 0. If you need another value,
39197 // use gtk_target_list_add_text_targets() and
39198 // gtk_drag_source_set_target_list().
39199 // <widget>: a #GtkWidget that's is a drag source
39200 static void drag_source_add_text_targets(Widget* widget) {
39201 gtk_drag_source_add_text_targets(widget);
39205 // Add the URI targets supported by #GtkSelection to
39206 // the target list of the drag source. The targets
39207 // are added with @info = 0. If you need another value,
39208 // use gtk_target_list_add_uri_targets() and
39209 // gtk_drag_source_set_target_list().
39210 // <widget>: a #GtkWidget that's is a drag source
39211 static void drag_source_add_uri_targets(Widget* widget) {
39212 gtk_drag_source_add_uri_targets(widget);
39216 // Gets the list of targets this widget can provide for
39217 // drag-and-drop.
39218 // RETURNS: the #GtkTargetList, or %NULL if none
39219 // <widget>: a #GtkWidget
39220 static TargetList* drag_source_get_target_list(Widget* widget) {
39221 return gtk_drag_source_get_target_list(widget);
39225 // Sets up a widget so that GTK+ will start a drag operation when the user
39226 // clicks and drags on the widget. The widget must have a window.
39227 // <widget>: a #GtkWidget
39228 // <start_button_mask>: the bitmask of buttons that can start the drag
39229 // <targets>: the table of targets that the drag will support, may be %NULL
39230 // <n_targets>: the number of items in @targets
39231 // <actions>: the bitmask of possible actions for a drag from this widget
39232 static void drag_source_set(Widget* widget, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
39233 gtk_drag_source_set(widget, start_button_mask, targets, n_targets, actions);
39237 // Sets the icon that will be used for drags from a particular widget
39238 // from a pixmap/mask. GTK+ retains references for the arguments, and
39239 // will release them when they are no longer needed.
39240 // Use gtk_drag_source_set_icon_pixbuf() instead.
39241 // <widget>: a #GtkWidget
39242 // <colormap>: the colormap of the icon
39243 // <pixmap>: the image data for the icon
39244 // <mask>: the transparency mask for an image.
39245 static void drag_source_set_icon(Widget* widget, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
39246 gtk_drag_source_set_icon(widget, colormap, pixmap, mask);
39250 // Sets the icon that will be used for drags from a particular source
39251 // to a themed icon. See the docs for #GtkIconTheme for more details.
39252 // <widget>: a #GtkWidget
39253 // <icon_name>: name of icon to use
39254 static void drag_source_set_icon_name(Widget* widget, char* icon_name) {
39255 gtk_drag_source_set_icon_name(widget, icon_name);
39259 // Sets the icon that will be used for drags from a particular widget
39260 // from a #GdkPixbuf. GTK+ retains a reference for @pixbuf and will
39261 // release it when it is no longer needed.
39262 // <widget>: a #GtkWidget
39263 // <pixbuf>: the #GdkPixbuf for the drag icon
39264 static void drag_source_set_icon_pixbuf(Widget* widget, GdkPixbuf2.Pixbuf* pixbuf) {
39265 gtk_drag_source_set_icon_pixbuf(widget, pixbuf);
39269 // Sets the icon that will be used for drags from a particular source
39270 // to a stock icon.
39271 // <widget>: a #GtkWidget
39272 // <stock_id>: the ID of the stock icon to use
39273 static void drag_source_set_icon_stock(Widget* widget, char* stock_id) {
39274 gtk_drag_source_set_icon_stock(widget, stock_id);
39278 // Changes the target types that this widget offers for drag-and-drop.
39279 // The widget must first be made into a drag source with
39280 // gtk_drag_source_set().
39281 // <widget>: a #GtkWidget that's a drag source
39282 // <target_list>: list of draggable targets, or %NULL for none
39283 static void drag_source_set_target_list(Widget* widget, TargetList* target_list=null) {
39284 gtk_drag_source_set_target_list(widget, target_list);
39287 static void drag_source_unset(Widget* widget) {
39288 gtk_drag_source_unset(widget);
39291 static void drag_unhighlight(Widget* widget) {
39292 gtk_drag_unhighlight(widget);
39296 // Draws an arrow in the given rectangle on @window using the given
39297 // parameters. @arrow_type determines the direction of the arrow.
39298 // <style>: a #GtkStyle
39299 // <window>: a #GdkWindow
39300 // <state_type>: a state
39301 // <shadow_type>: the type of shadow to draw
39302 // <arrow_type>: the type of arrow to draw
39303 // <fill>: %TRUE if the arrow tip should be filled
39304 // <x>: x origin of the rectangle to draw the arrow in
39305 // <y>: y origin of the rectangle to draw the arrow in
39306 // <width>: width of the rectangle to draw the arrow in
39307 // <height>: height of the rectangle to draw the arrow in
39308 static void draw_arrow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, ArrowType arrow_type, int fill, int x, int y, int width, int height) {
39309 gtk_draw_arrow(style, window, state_type, shadow_type, arrow_type, fill, x, y, width, height);
39313 // Draws a box on @window with the given parameters.
39314 // <style>: a #GtkStyle
39315 // <window>: a #GdkWindow
39316 // <state_type>: a state
39317 // <shadow_type>: the type of shadow to draw
39318 // <x>: x origin of the box
39319 // <y>: y origin of the box
39320 // <width>: the width of the box
39321 // <height>: the height of the box
39322 static void draw_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39323 gtk_draw_box(style, window, state_type, shadow_type, x, y, width, height);
39327 // Draws a box in @window using the given style and state and shadow type,
39328 // leaving a gap in one side.
39329 // <style>: a #GtkStyle
39330 // <window>: a #GdkWindow
39331 // <state_type>: a state
39332 // <shadow_type>: type of shadow to draw
39333 // <x>: x origin of the rectangle
39334 // <y>: y origin of the rectangle
39335 // <width>: width of the rectangle
39336 // <height>: width of the rectangle
39337 // <gap_side>: side in which to leave the gap
39338 // <gap_x>: starting position of the gap
39339 // <gap_width>: width of the gap
39340 static void draw_box_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
39341 gtk_draw_box_gap(style, window, state_type, shadow_type, x, y, width, height, gap_side, gap_x, gap_width);
39345 // Draws a check button indicator in the given rectangle on @window with
39346 // the given parameters.
39347 // <style>: a #GtkStyle
39348 // <window>: a #GdkWindow
39349 // <state_type>: a state
39350 // <shadow_type>: the type of shadow to draw
39351 // <x>: x origin of the rectangle to draw the check in
39352 // <y>: y origin of the rectangle to draw the check in
39353 // <width>: the width of the rectangle to draw the check in
39354 // <height>: the height of the rectangle to draw the check in
39355 static void draw_check(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39356 gtk_draw_check(style, window, state_type, shadow_type, x, y, width, height);
39360 // Draws a diamond in the given rectangle on @window using the given
39361 // parameters.
39362 // <style>: a #GtkStyle
39363 // <window>: a #GdkWindow
39364 // <state_type>: a state
39365 // <shadow_type>: the type of shadow to draw
39366 // <x>: x origin of the rectangle to draw the diamond in
39367 // <y>: y origin of the rectangle to draw the diamond in
39368 // <width>: width of the rectangle to draw the diamond in
39369 // <height>: height of the rectangle to draw the diamond in
39370 static void draw_diamond(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39371 gtk_draw_diamond(style, window, state_type, shadow_type, x, y, width, height);
39375 // Draws an expander as used in #GtkTreeView.
39376 // <style>: a #GtkStyle
39377 // <window>: a #GdkWindow
39378 // <state_type>: a state
39379 // <x>: the x position to draw the expander at
39380 // <y>: the y position to draw the expander at
39381 // <expander_style>: the style to draw the expander in
39382 static void draw_expander(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, ExpanderStyle expander_style) {
39383 gtk_draw_expander(style, window, state_type, x, y, expander_style);
39387 // Draws an extension, i.e. a notebook tab.
39388 // <style>: a #GtkStyle
39389 // <window>: a #GdkWindow
39390 // <state_type>: a state
39391 // <shadow_type>: type of shadow to draw
39392 // <x>: x origin of the extension
39393 // <y>: y origin of the extension
39394 // <width>: width of the extension
39395 // <height>: width of the extension
39396 // <gap_side>: the side on to which the extension is attached
39397 static void draw_extension(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side) {
39398 gtk_draw_extension(style, window, state_type, shadow_type, x, y, width, height, gap_side);
39402 // Draws a flat box on @window with the given parameters.
39403 // <style>: a #GtkStyle
39404 // <window>: a #GdkWindow
39405 // <state_type>: a state
39406 // <shadow_type>: the type of shadow to draw
39407 // <x>: x origin of the box
39408 // <y>: y origin of the box
39409 // <width>: the width of the box
39410 // <height>: the height of the box
39411 static void draw_flat_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39412 gtk_draw_flat_box(style, window, state_type, shadow_type, x, y, width, height);
39416 // Draws a focus indicator around the given rectangle on @window using the
39417 // given style.
39418 // <style>: a #GtkStyle
39419 // <window>: a #GdkWindow
39420 // <x>: the x origin of the rectangle around which to draw a focus indicator
39421 // <y>: the y origin of the rectangle around which to draw a focus indicator
39422 // <width>: the width of the rectangle around which to draw a focus indicator
39423 // <height>: the height of the rectangle around which to draw a focus indicator
39424 static void draw_focus(Style* style, Gdk2.Window* window, int x, int y, int width, int height) {
39425 gtk_draw_focus(style, window, x, y, width, height);
39429 // Draws a handle as used in #GtkHandleBox and #GtkPaned.
39430 // <style>: a #GtkStyle
39431 // <window>: a #GdkWindow
39432 // <state_type>: a state
39433 // <shadow_type>: type of shadow to draw
39434 // <x>: x origin of the handle
39435 // <y>: y origin of the handle
39436 // <width>: with of the handle
39437 // <height>: height of the handle
39438 // <orientation>: the orientation of the handle
39439 static void draw_handle(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation) {
39440 gtk_draw_handle(style, window, state_type, shadow_type, x, y, width, height, orientation);
39444 // Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
39445 // using the given style and state.
39446 // <style>: a #GtkStyle
39447 // <window>: a #GdkWindow
39448 // <state_type>: a state
39449 // <x1>: the starting x coordinate
39450 // <x2>: the ending x coordinate
39451 // <y>: the y coordinate
39452 static void draw_hline(Style* style, Gdk2.Window* window, StateType state_type, int x1, int x2, int y) {
39453 gtk_draw_hline(style, window, state_type, x1, x2, y);
39457 // Draws a text caret on @drawable at @location. This is not a style function
39458 // but merely a convenience function for drawing the standard cursor shape.
39459 // <widget>: a #GtkWidget
39460 // <drawable>: a #GdkDrawable
39461 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
39462 // <location>: location where to draw the cursor (@location->width is ignored)
39463 // <is_primary>: if the cursor should be the primary cursor color.
39464 // <direction>: whether the cursor is left-to-right or right-to-left. Should never be #GTK_TEXT_DIR_NONE
39465 // <draw_arrow>: %TRUE to draw a directional arrow on the cursor. Should be %FALSE unless the cursor is split.
39466 static void draw_insertion_cursor(Widget* widget, Gdk2.Drawable* drawable, Gdk2.Rectangle* area, Gdk2.Rectangle* location, int is_primary, TextDirection direction, int draw_arrow) {
39467 gtk_draw_insertion_cursor(widget, drawable, area, location, is_primary, direction, draw_arrow);
39471 // Draws a layout on @window using the given parameters.
39472 // <style>: a #GtkStyle
39473 // <window>: a #GdkWindow
39474 // <state_type>: a state
39475 // <use_text>: whether to use the text or foreground graphics context of @style
39476 // <x>: x origin
39477 // <y>: y origin
39478 // <layout>: the layout to draw
39479 static void draw_layout(Style* style, Gdk2.Window* window, StateType state_type, int use_text, int x, int y, Pango.Layout* layout) {
39480 gtk_draw_layout(style, window, state_type, use_text, x, y, layout);
39484 // Draws a radio button indicator in the given rectangle on @window with
39485 // the given parameters.
39486 // <style>: a #GtkStyle
39487 // <window>: a #GdkWindow
39488 // <state_type>: a state
39489 // <shadow_type>: the type of shadow to draw
39490 // <x>: x origin of the rectangle to draw the option in
39491 // <y>: y origin of the rectangle to draw the option in
39492 // <width>: the width of the rectangle to draw the option in
39493 // <height>: the height of the rectangle to draw the option in
39494 static void draw_option(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39495 gtk_draw_option(style, window, state_type, shadow_type, x, y, width, height);
39499 // Draws a polygon on @window with the given parameters.
39500 // <style>: a #GtkStyle
39501 // <window>: a #GdkWindow
39502 // <state_type>: a state
39503 // <shadow_type>: type of shadow to draw
39504 // <points>: an array of #GdkPoint<!-- -->s
39505 // <npoints>: length of @points
39506 // <fill>: %TRUE if the polygon should be filled
39507 static void draw_polygon(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Point* points, int npoints, int fill) {
39508 gtk_draw_polygon(style, window, state_type, shadow_type, points, npoints, fill);
39512 // Draws a resize grip in the given rectangle on @window using the given
39513 // parameters.
39514 // <style>: a #GtkStyle
39515 // <window>: a #GdkWindow
39516 // <state_type>: a state
39517 // <edge>: the edge in which to draw the resize grip
39518 // <x>: the x origin of the rectangle in which to draw the resize grip
39519 // <y>: the y origin of the rectangle in which to draw the resize grip
39520 // <width>: the width of the rectangle in which to draw the resize grip
39521 // <height>: the height of the rectangle in which to draw the resize grip
39522 static void draw_resize_grip(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.WindowEdge edge, int x, int y, int width, int height) {
39523 gtk_draw_resize_grip(style, window, state_type, edge, x, y, width, height);
39527 // Draws a shadow around the given rectangle in @window
39528 // using the given style and state and shadow type.
39529 // <style>: a #GtkStyle
39530 // <window>: a #GdkWindow
39531 // <state_type>: a state
39532 // <shadow_type>: type of shadow to draw
39533 // <x>: x origin of the rectangle
39534 // <y>: y origin of the rectangle
39535 // <width>: width of the rectangle
39536 // <height>: width of the rectangle
39537 static void draw_shadow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39538 gtk_draw_shadow(style, window, state_type, shadow_type, x, y, width, height);
39542 // Draws a shadow around the given rectangle in @window
39543 // using the given style and state and shadow type, leaving a
39544 // gap in one side.
39545 // <style>: a #GtkStyle
39546 // <window>: a #GdkWindow
39547 // <state_type>: a state
39548 // <shadow_type>: type of shadow to draw
39549 // <x>: x origin of the rectangle
39550 // <y>: y origin of the rectangle
39551 // <width>: width of the rectangle
39552 // <height>: width of the rectangle
39553 // <gap_side>: side in which to leave the gap
39554 // <gap_x>: starting position of the gap
39555 // <gap_width>: width of the gap
39556 static void draw_shadow_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
39557 gtk_draw_shadow_gap(style, window, state_type, shadow_type, x, y, width, height, gap_side, gap_x, gap_width);
39561 // Draws a slider in the given rectangle on @window using the
39562 // given style and orientation.
39563 // <style>: a #GtkStyle
39564 // <state_type>: a state
39565 // <shadow_type>: a shadow
39566 // <x>: the x origin of the rectangle in which to draw a slider
39567 // <y>: the y origin of the rectangle in which to draw a slider
39568 // <width>: the width of the rectangle in which to draw a slider
39569 // <height>: the height of the rectangle in which to draw a slider
39570 // <orientation>: the orientation to be used
39571 static void draw_slider(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation) {
39572 gtk_draw_slider(style, window, state_type, shadow_type, x, y, width, height, orientation);
39576 // Draws a text string on @window with the given parameters.
39577 // <style>: a #GtkStyle
39578 // <window>: a #GdkWindow
39579 // <state_type>: a state
39580 // <x>: x origin
39581 // <y>: y origin
39582 // <string>: the string to draw
39583 static void draw_string(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, char* string_) {
39584 gtk_draw_string(style, window, state_type, x, y, string_);
39588 // Draws an option menu tab (i.e. the up and down pointing arrows)
39589 // in the given rectangle on @window using the given parameters.
39590 // <style>: a #GtkStyle
39591 // <window>: a #GdkWindow
39592 // <state_type>: a state
39593 // <shadow_type>: the type of shadow to draw
39594 // <x>: x origin of the rectangle to draw the tab in
39595 // <y>: y origin of the rectangle to draw the tab in
39596 // <width>: the width of the rectangle to draw the tab in
39597 // <height>: the height of the rectangle to draw the tab in
39598 static void draw_tab(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
39599 gtk_draw_tab(style, window, state_type, shadow_type, x, y, width, height);
39603 // Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
39604 // using the given style and state.
39605 // <style>: a #GtkStyle
39606 // <window>: a #GdkWindow
39607 // <state_type>: a state
39608 // <y1_>: the starting y coordinate
39609 // <y2_>: the ending y coordinate
39610 // <x>: the x coordinate
39611 static void draw_vline(Style* style, Gdk2.Window* window, StateType state_type, int y1_, int y2_, int x) {
39612 gtk_draw_vline(style, window, state_type, y1_, y2_, x);
39615 static int events_pending() {
39616 return gtk_events_pending();
39619 static void exit(int error_code) {
39620 gtk_exit(error_code);
39623 static int false_() {
39624 return gtk_false();
39628 // Registers an error quark for #GtkFileChooser if necessary.
39629 // RETURNS: The error quark used for #GtkFileChooser errors.
39630 static GLib2.Quark file_chooser_error_quark() {
39631 return gtk_file_chooser_error_quark();
39634 // Unintrospectable function: gc_get() / gtk_gc_get()
39635 static Gdk2.GC* gc_get(int depth, Gdk2.Colormap* colormap, Gdk2.GCValues* values, Gdk2.GCValuesMask values_mask) {
39636 return gtk_gc_get(depth, colormap, values, values_mask);
39639 static void gc_release(Gdk2.GC* gc) {
39640 gtk_gc_release(gc);
39644 // Obtains a copy of the event currently being processed by GTK+. For
39645 // example, if you get a "clicked" signal from #GtkButton, the current
39646 // event will be the #GdkEventButton that triggered the "clicked"
39647 // signal. The returned event must be freed with gdk_event_free().
39648 // If there is no current event, the function returns %NULL.
39649 // current event.
39650 // RETURNS: a copy of the current event, or %NULL if no
39651 static Gdk2.Event* /*new*/ get_current_event() {
39652 return gtk_get_current_event();
39656 // If there is a current event and it has a state field, place
39657 // that state field in @state and return %TRUE, otherwise return
39658 // %FALSE.
39659 // RETURNS: %TRUE if there was a current event and it had a state field
39660 // <state>: a location to store the state of the current event
39661 static int get_current_event_state(/*out*/ Gdk2.ModifierType* state) {
39662 return gtk_get_current_event_state(state);
39666 // If there is a current event and it has a timestamp, return that
39667 // timestamp, otherwise return %GDK_CURRENT_TIME.
39668 // RETURNS: the timestamp from the current event, or %GDK_CURRENT_TIME.
39669 static uint get_current_event_time() {
39670 return gtk_get_current_event_time();
39674 // Returns the #PangoLanguage for the default language currently in
39675 // effect. (Note that this can change over the life of an
39676 // application.) The default language is derived from the current
39677 // locale. It determines, for example, whether GTK+ uses the
39678 // right-to-left or left-to-right text direction.
39679 // This function is equivalent to pango_language_get_default(). See
39680 // that function for details.
39681 // freed
39682 // RETURNS: the default language as a #PangoLanguage, must not be
39683 static Pango.Language* /*new*/ get_default_language() {
39684 return gtk_get_default_language();
39688 // If @event is %NULL or the event was not associated with any widget,
39689 // returns %NULL, otherwise returns the widget that received the event
39690 // originally.
39691 // received @event, or %NULL
39692 // RETURNS: the widget that originally
39693 // <event>: a #GdkEvent
39694 static Widget* get_event_widget(Gdk2.Event* event) {
39695 return gtk_get_event_widget(event);
39699 // Unintrospectable function: get_option_group() / gtk_get_option_group()
39700 // Returns a #GOptionGroup for the commandline arguments recognized
39701 // by GTK+ and GDK. You should add this group to your #GOptionContext
39702 // with g_option_context_add_group(), if you are using
39703 // g_option_context_parse() to parse your commandline arguments.
39704 // by GTK+
39705 // RETURNS: a #GOptionGroup for the commandline arguments recognized
39706 // <open_default_display>: whether to open the default display when parsing the commandline arguments
39707 static GLib2.OptionGroup* get_option_group(int open_default_display) {
39708 return gtk_get_option_group(open_default_display);
39711 static void grab_add(Widget* widget) {
39712 gtk_grab_add(widget);
39716 // Queries the current grab of the default window group.
39717 // has the grab or %NULL if no grab is active
39718 // RETURNS: The widget which currently
39719 static Widget* grab_get_current() {
39720 return gtk_grab_get_current();
39723 static void grab_remove(Widget* widget) {
39724 gtk_grab_remove(widget);
39728 // Looks up the icon size associated with @name.
39729 // RETURNS: the icon size
39730 // <name>: the name to look up.
39731 static int icon_size_from_name(char* name) {
39732 return gtk_icon_size_from_name(name);
39736 // Gets the canonical name of the given icon size. The returned string
39737 // is statically allocated and should not be freed.
39738 // RETURNS: the name of the given icon size.
39739 // <size>: a #GtkIconSize.
39740 static char* icon_size_get_name(int size) {
39741 return gtk_icon_size_get_name(size);
39745 // Obtains the pixel size of a semantic icon size, possibly
39746 // modified by user preferences for the default #GtkSettings.
39747 // (See gtk_icon_size_lookup_for_settings().)
39748 // Normally @size would be
39749 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function
39750 // isn't normally needed, gtk_widget_render_icon() is the usual
39751 // way to get an icon for rendering, then just look at the size of
39752 // the rendered pixbuf. The rendered pixbuf may not even correspond to
39753 // the width/height returned by gtk_icon_size_lookup(), because themes
39754 // are free to render the pixbuf however they like, including changing
39755 // the usual size.
39756 // RETURNS: %TRUE if @size was a valid size
39757 // <size>: an icon size
39758 // <width>: location to store icon width
39759 // <height>: location to store icon height
39760 static int icon_size_lookup(int size, /*out*/ int* width, /*out*/ int* height) {
39761 return gtk_icon_size_lookup(size, width, height);
39765 // Obtains the pixel size of a semantic icon size, possibly
39766 // modified by user preferences for a particular
39767 // #GtkSettings. Normally @size would be
39768 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function
39769 // isn't normally needed, gtk_widget_render_icon() is the usual
39770 // way to get an icon for rendering, then just look at the size of
39771 // the rendered pixbuf. The rendered pixbuf may not even correspond to
39772 // the width/height returned by gtk_icon_size_lookup(), because themes
39773 // are free to render the pixbuf however they like, including changing
39774 // the usual size.
39775 // RETURNS: %TRUE if @size was a valid size
39776 // <settings>: a #GtkSettings object, used to determine which set of user preferences to used.
39777 // <size>: an icon size
39778 // <width>: location to store icon width
39779 // <height>: location to store icon height
39780 static int icon_size_lookup_for_settings(Settings* settings, int size, /*out*/ int* width, /*out*/ int* height) {
39781 return gtk_icon_size_lookup_for_settings(settings, size, width, height);
39785 // Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU,
39786 // etc. Returns the integer value for the size.
39787 // RETURNS: integer value representing the size
39788 // <name>: name of the icon size
39789 // <width>: the icon width
39790 // <height>: the icon height
39791 static int icon_size_register(char* name, int width, int height) {
39792 return gtk_icon_size_register(name, width, height);
39796 // Registers @alias as another name for @target.
39797 // So calling gtk_icon_size_from_name() with @alias as argument
39798 // will return @target.
39799 // <alias>: an alias for @target
39800 // <target>: an existing icon size
39801 static void icon_size_register_alias(char* alias_, int target) {
39802 gtk_icon_size_register_alias(alias_, target);
39805 static GLib2.Quark icon_theme_error_quark() {
39806 return gtk_icon_theme_error_quark();
39809 static Type identifier_get_type() {
39810 return gtk_identifier_get_type();
39813 // Unintrospectable function: idle_add() / gtk_idle_add()
39814 static uint idle_add(Function function_, void* data) {
39815 return gtk_idle_add(function_, data);
39818 // Unintrospectable function: idle_add_full() / gtk_idle_add_full()
39819 static uint idle_add_full(int priority, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
39820 return gtk_idle_add_full(priority, function_, marshal, data, destroy);
39823 // Unintrospectable function: idle_add_priority() / gtk_idle_add_priority()
39824 static uint idle_add_priority(int priority, Function function_, void* data) {
39825 return gtk_idle_add_priority(priority, function_, data);
39828 static void idle_remove(uint idle_handler_id) {
39829 gtk_idle_remove(idle_handler_id);
39832 static void idle_remove_by_data(void* data) {
39833 gtk_idle_remove_by_data(data);
39837 // Call this function before using any other GTK+ functions in your GUI
39838 // applications. It will initialize everything needed to operate the
39839 // toolkit and parses some standard command line options.
39840 // never see those standard arguments.
39841 // Note that there are some alternative ways to initialize GTK+:
39842 // if you are calling gtk_parse_args(), gtk_init_check(),
39843 // gtk_init_with_args() or g_option_context_parse() with
39844 // the option group returned by gtk_get_option_group(),
39845 // you <emphasis>don't</emphasis> have to call gtk_init().
39846 // <note><para>
39847 // This function will terminate your program if it was unable to
39848 // initialize the windowing system for some reason. If you want
39849 // your program to fall back to a textual interface you want to
39850 // call gtk_init_check() instead.
39851 // </para></note>
39852 // <note><para>
39853 // Since 2.18, GTK+ calls <literal>signal (SIGPIPE, SIG_IGN)</literal>
39854 // during initialization, to ignore SIGPIPE signals, since these are
39855 // almost never wanted in graphical applications. If you do need to
39856 // handle SIGPIPE for some reason, reset the handler after gtk_init(),
39857 // but notice that other libraries (e.g. libdbus or gvfs) might do
39858 // similar things.
39859 // </para></note>
39860 // <argc>: Address of the <parameter>argc</parameter> parameter of your main() function. Changed if any arguments were handled
39861 // <argv>: Address of the <parameter>argv</parameter> parameter of main(). Any options understood by GTK+ are stripped before return.
39862 static void init(/*inout*/ int* argc, /*inout*/ char*** argv=null) {
39863 gtk_init(argc, argv);
39866 // Unintrospectable function: init_add() / gtk_init_add()
39867 static void init_add(Function function_, void* data) {
39868 gtk_init_add(function_, data);
39872 // This function does the same work as gtk_init() with only
39873 // initialized. Instead it returns %FALSE on failure.
39874 // This way the application can fall back to some other means of communication
39875 // with the user - for example a curses or command line interface.
39876 // %FALSE otherwise.
39877 // RETURNS: %TRUE if the GUI has been successfully initialized,
39878 // <argc>: Address of the <parameter>argc</parameter> parameter of your main() function. Changed if any arguments were handled.
39879 // <argv>: Address of the <parameter>argv</parameter> parameter of main(). Any parameters understood by gtk_init() are stripped before return.
39880 static int init_check(/*inout*/ int* argc, /*inout*/ char*** argv=null) {
39881 return gtk_init_check(argc, argv);
39885 // This function does the same work as gtk_init_check().
39886 // Additionally, it allows you to add your own commandline options,
39887 // and it automatically generates nicely formatted
39888 // <option>--help</option> output. Note that your program will
39889 // be terminated after writing out the help output.
39890 // %FALSE otherwise.
39891 // RETURNS: %TRUE if the GUI has been successfully initialized,
39892 // <argc>: a pointer to the number of command line arguments.
39893 // <argv>: a pointer to the array of command line arguments.
39894 // <parameter_string>: a string which is displayed in the first line of <option>--help</option> output, after <literal><replaceable>programname</replaceable> [OPTION...]</literal>
39895 // <entries>: a %NULL-terminated array of #GOptionEntry<!-- -->s describing the options of your program
39896 // <translation_domain>: a translation domain to use for translating the <option>--help</option> output for the options in @entries with gettext(), or %NULL
39897 static int init_with_args(/*inout*/ int* argc, /*inout*/ char*** argv, char* parameter_string, GLib2.OptionEntry* entries, char* translation_domain, GLib2.Error** error=null) {
39898 return gtk_init_with_args(argc, argv, parameter_string, entries, translation_domain, error);
39901 // Unintrospectable function: input_add_full() / gtk_input_add_full()
39902 static uint input_add_full(int source, Gdk2.InputCondition condition, Gdk2.InputFunction function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
39903 return gtk_input_add_full(source, condition, function_, marshal, data, destroy);
39906 static void input_remove(uint input_handler_id) {
39907 gtk_input_remove(input_handler_id);
39910 // Unintrospectable function: key_snooper_install() / gtk_key_snooper_install()
39911 static uint key_snooper_install(KeySnoopFunc snooper, void* func_data) {
39912 return gtk_key_snooper_install(snooper, func_data);
39915 static void key_snooper_remove(uint snooper_handler_id) {
39916 gtk_key_snooper_remove(snooper_handler_id);
39919 static void main_() {
39920 gtk_main();
39923 static void main_do_event(Gdk2.Event* event) {
39924 gtk_main_do_event(event);
39927 static int main_iteration() {
39928 return gtk_main_iteration();
39931 static int main_iteration_do(int blocking) {
39932 return gtk_main_iteration_do(blocking);
39935 static uint main_level() {
39936 return gtk_main_level();
39939 static void main_quit() {
39940 gtk_main_quit();
39943 static void marshal_BOOLEAN__POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39944 gtk_marshal_BOOLEAN__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39947 static void marshal_BOOLEAN__POINTER_INT_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39948 gtk_marshal_BOOLEAN__POINTER_INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39951 static void marshal_BOOLEAN__POINTER_INT_INT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39952 gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39955 static void marshal_BOOLEAN__POINTER_POINTER_INT_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39956 gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39959 static void marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39960 gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39963 static void marshal_BOOLEAN__VOID(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39964 gtk_marshal_BOOLEAN__VOID(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39967 static void marshal_ENUM__ENUM(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39968 gtk_marshal_ENUM__ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39971 static void marshal_INT__POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39972 gtk_marshal_INT__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39975 static void marshal_INT__POINTER_CHAR_CHAR(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39976 gtk_marshal_INT__POINTER_CHAR_CHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39979 static void marshal_VOID__ENUM_FLOAT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39980 gtk_marshal_VOID__ENUM_FLOAT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39983 static void marshal_VOID__ENUM_FLOAT_BOOLEAN(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39984 gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39987 static void marshal_VOID__INT_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39988 gtk_marshal_VOID__INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39991 static void marshal_VOID__INT_INT_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39992 gtk_marshal_VOID__INT_INT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39995 static void marshal_VOID__POINTER_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
39996 gtk_marshal_VOID__POINTER_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
39999 static void marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40000 gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40003 static void marshal_VOID__POINTER_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40004 gtk_marshal_VOID__POINTER_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40007 static void marshal_VOID__POINTER_POINTER_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40008 gtk_marshal_VOID__POINTER_POINTER_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40011 static void marshal_VOID__POINTER_POINTER_UINT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40012 gtk_marshal_VOID__POINTER_POINTER_UINT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40015 static void marshal_VOID__POINTER_STRING_STRING(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40016 gtk_marshal_VOID__POINTER_STRING_STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40019 static void marshal_VOID__POINTER_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40020 gtk_marshal_VOID__POINTER_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40023 static void marshal_VOID__POINTER_UINT_ENUM(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40024 gtk_marshal_VOID__POINTER_UINT_ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40027 static void marshal_VOID__POINTER_UINT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40028 gtk_marshal_VOID__POINTER_UINT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40031 static void marshal_VOID__STRING_INT_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40032 gtk_marshal_VOID__STRING_INT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40035 static void marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40036 gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40039 static void marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40040 gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40043 static void marshal_VOID__UINT_STRING(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
40044 gtk_marshal_VOID__UINT_STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
40048 // Draws an arrow in the given rectangle on @window using the given
40049 // parameters. @arrow_type determines the direction of the arrow.
40050 // <style>: a #GtkStyle
40051 // <window>: a #GdkWindow
40052 // <state_type>: a state
40053 // <shadow_type>: the type of shadow to draw
40054 // <area>: clip rectangle, or %NULL if the output should not be clipped
40055 // <widget>: the widget
40056 // <detail>: a style detail
40057 // <arrow_type>: the type of arrow to draw
40058 // <fill>: %TRUE if the arrow tip should be filled
40059 // <x>: x origin of the rectangle to draw the arrow in
40060 // <y>: y origin of the rectangle to draw the arrow in
40061 // <width>: width of the rectangle to draw the arrow in
40062 // <height>: height of the rectangle to draw the arrow in
40063 static void paint_arrow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, ArrowType arrow_type, int fill, int x, int y, int width, int height) {
40064 gtk_paint_arrow(style, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height);
40068 // Draws a box on @window with the given parameters.
40069 // <style>: a #GtkStyle
40070 // <window>: a #GdkWindow
40071 // <state_type>: a state
40072 // <shadow_type>: the type of shadow to draw
40073 // <area>: clip rectangle, or %NULL if the output should not be clipped
40074 // <widget>: the widget
40075 // <detail>: a style detail
40076 // <x>: x origin of the box
40077 // <y>: y origin of the box
40078 // <width>: the width of the box
40079 // <height>: the height of the box
40080 static void paint_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40081 gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40085 // Draws a box in @window using the given style and state and shadow type,
40086 // leaving a gap in one side.
40087 // <style>: a #GtkStyle
40088 // <window>: a #GdkWindow
40089 // <state_type>: a state
40090 // <shadow_type>: type of shadow to draw
40091 // <area>: clip rectangle, or %NULL if the output should not be clipped
40092 // <widget>: the widget
40093 // <detail>: a style detail
40094 // <x>: x origin of the rectangle
40095 // <y>: y origin of the rectangle
40096 // <width>: width of the rectangle
40097 // <height>: width of the rectangle
40098 // <gap_side>: side in which to leave the gap
40099 // <gap_x>: starting position of the gap
40100 // <gap_width>: width of the gap
40101 static void paint_box_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
40102 gtk_paint_box_gap(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
40106 // Draws a check button indicator in the given rectangle on @window with
40107 // the given parameters.
40108 // <style>: a #GtkStyle
40109 // <window>: a #GdkWindow
40110 // <state_type>: a state
40111 // <shadow_type>: the type of shadow to draw
40112 // <area>: clip rectangle, or %NULL if the output should not be clipped
40113 // <widget>: the widget
40114 // <detail>: a style detail
40115 // <x>: x origin of the rectangle to draw the check in
40116 // <y>: y origin of the rectangle to draw the check in
40117 // <width>: the width of the rectangle to draw the check in
40118 // <height>: the height of the rectangle to draw the check in
40119 static void paint_check(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40120 gtk_paint_check(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40124 // Draws a diamond in the given rectangle on @window using the given
40125 // parameters.
40126 // <style>: a #GtkStyle
40127 // <window>: a #GdkWindow
40128 // <state_type>: a state
40129 // <shadow_type>: the type of shadow to draw
40130 // <area>: clip rectangle, or %NULL if the output should not be clipped
40131 // <widget>: the widget
40132 // <detail>: a style detail
40133 // <x>: x origin of the rectangle to draw the diamond in
40134 // <y>: y origin of the rectangle to draw the diamond in
40135 // <width>: width of the rectangle to draw the diamond in
40136 // <height>: height of the rectangle to draw the diamond in
40137 static void paint_diamond(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40138 gtk_paint_diamond(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40142 // Draws an expander as used in #GtkTreeView. @x and @y specify the
40143 // center the expander. The size of the expander is determined by the
40144 // "expander-size" style property of @widget. (If widget is not
40145 // specified or doesn't have an "expander-size" property, an
40146 // unspecified default size will be used, since the caller doesn't
40147 // have sufficient information to position the expander, this is
40148 // likely not useful.) The expander is expander_size pixels tall
40149 // in the collapsed position and expander_size pixels wide in the
40150 // expanded position.
40151 // <style>: a #GtkStyle
40152 // <window>: a #GdkWindow
40153 // <state_type>: a state
40154 // <area>: clip rectangle, or %NULL if the output should not be clipped
40155 // <widget>: the widget
40156 // <detail>: a style detail
40157 // <x>: the x position to draw the expander at
40158 // <y>: the y position to draw the expander at
40159 // <expander_style>: the style to draw the expander in; determines whether the expander is collapsed, expanded, or in an intermediate state.
40160 static void paint_expander(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, ExpanderStyle expander_style) {
40161 gtk_paint_expander(style, window, state_type, area, widget, detail, x, y, expander_style);
40165 // Draws an extension, i.e. a notebook tab.
40166 // <style>: a #GtkStyle
40167 // <window>: a #GdkWindow
40168 // <state_type>: a state
40169 // <shadow_type>: type of shadow to draw
40170 // <area>: clip rectangle, or %NULL if the output should not be clipped
40171 // <widget>: the widget
40172 // <detail>: a style detail
40173 // <x>: x origin of the extension
40174 // <y>: y origin of the extension
40175 // <width>: width of the extension
40176 // <height>: width of the extension
40177 // <gap_side>: the side on to which the extension is attached
40178 static void paint_extension(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side) {
40179 gtk_paint_extension(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side);
40183 // Draws a flat box on @window with the given parameters.
40184 // <style>: a #GtkStyle
40185 // <window>: a #GdkWindow
40186 // <state_type>: a state
40187 // <shadow_type>: the type of shadow to draw
40188 // <area>: clip rectangle, or %NULL if the output should not be clipped
40189 // <widget>: the widget
40190 // <detail>: a style detail
40191 // <x>: x origin of the box
40192 // <y>: y origin of the box
40193 // <width>: the width of the box
40194 // <height>: the height of the box
40195 static void paint_flat_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40196 gtk_paint_flat_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40200 // Draws a focus indicator around the given rectangle on @window using the
40201 // given style.
40202 // <style>: a #GtkStyle
40203 // <window>: a #GdkWindow
40204 // <state_type>: a state
40205 // <area>: clip rectangle, or %NULL if the output should not be clipped
40206 // <widget>: the widget
40207 // <detail>: a style detail
40208 // <x>: the x origin of the rectangle around which to draw a focus indicator
40209 // <y>: the y origin of the rectangle around which to draw a focus indicator
40210 // <width>: the width of the rectangle around which to draw a focus indicator
40211 // <height>: the height of the rectangle around which to draw a focus indicator
40212 static void paint_focus(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40213 gtk_paint_focus(style, window, state_type, area, widget, detail, x, y, width, height);
40217 // Draws a handle as used in #GtkHandleBox and #GtkPaned.
40218 // <style>: a #GtkStyle
40219 // <window>: a #GdkWindow
40220 // <state_type>: a state
40221 // <shadow_type>: type of shadow to draw
40222 // <area>: clip rectangle, or %NULL if the output should not be clipped
40223 // <widget>: the widget
40224 // <detail>: a style detail
40225 // <x>: x origin of the handle
40226 // <y>: y origin of the handle
40227 // <width>: with of the handle
40228 // <height>: height of the handle
40229 // <orientation>: the orientation of the handle
40230 static void paint_handle(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) {
40231 gtk_paint_handle(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
40235 // Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
40236 // using the given style and state.
40237 // <style>: a #GtkStyle
40238 // <window>: a #GdkWindow
40239 // <state_type>: a state
40240 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
40241 // <widget>: the widget
40242 // <detail>: a style detail
40243 // <x1>: the starting x coordinate
40244 // <x2>: the ending x coordinate
40245 // <y>: the y coordinate
40246 static void paint_hline(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x1, int x2, int y) {
40247 gtk_paint_hline(style, window, state_type, area, widget, detail, x1, x2, y);
40251 // Draws a layout on @window using the given parameters.
40252 // <style>: a #GtkStyle
40253 // <window>: a #GdkWindow
40254 // <state_type>: a state
40255 // <use_text>: whether to use the text or foreground graphics context of @style
40256 // <area>: clip rectangle, or %NULL if the output should not be clipped
40257 // <widget>: the widget
40258 // <detail>: a style detail
40259 // <x>: x origin
40260 // <y>: y origin
40261 // <layout>: the layout to draw
40262 static void paint_layout(Style* style, Gdk2.Window* window, StateType state_type, int use_text, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, Pango.Layout* layout) {
40263 gtk_paint_layout(style, window, state_type, use_text, area, widget, detail, x, y, layout);
40267 // Draws a radio button indicator in the given rectangle on @window with
40268 // the given parameters.
40269 // <style>: a #GtkStyle
40270 // <window>: a #GdkWindow
40271 // <state_type>: a state
40272 // <shadow_type>: the type of shadow to draw
40273 // <area>: clip rectangle, or %NULL if the output should not be clipped
40274 // <widget>: the widget
40275 // <detail>: a style detail
40276 // <x>: x origin of the rectangle to draw the option in
40277 // <y>: y origin of the rectangle to draw the option in
40278 // <width>: the width of the rectangle to draw the option in
40279 // <height>: the height of the rectangle to draw the option in
40280 static void paint_option(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40281 gtk_paint_option(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40285 // Draws a polygon on @window with the given parameters.
40286 // <style>: a #GtkStyle
40287 // <window>: a #GdkWindow
40288 // <state_type>: a state
40289 // <shadow_type>: type of shadow to draw
40290 // <area>: clip rectangle, or %NULL if the output should not be clipped
40291 // <widget>: the widget
40292 // <detail>: a style detail
40293 // <points>: an array of #GdkPoint<!-- -->s
40294 // <n_points>: length of @points
40295 // <fill>: %TRUE if the polygon should be filled
40296 static void paint_polygon(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.Point* points, int n_points, int fill) {
40297 gtk_paint_polygon(style, window, state_type, shadow_type, area, widget, detail, points, n_points, fill);
40301 // Draws a resize grip in the given rectangle on @window using the given
40302 // parameters.
40303 // <style>: a #GtkStyle
40304 // <window>: a #GdkWindow
40305 // <state_type>: a state
40306 // <area>: clip rectangle, or %NULL if the output should not be clipped
40307 // <widget>: the widget
40308 // <detail>: a style detail
40309 // <edge>: the edge in which to draw the resize grip
40310 // <x>: the x origin of the rectangle in which to draw the resize grip
40311 // <y>: the y origin of the rectangle in which to draw the resize grip
40312 // <width>: the width of the rectangle in which to draw the resize grip
40313 // <height>: the height of the rectangle in which to draw the resize grip
40314 static void paint_resize_grip(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.WindowEdge edge, int x, int y, int width, int height) {
40315 gtk_paint_resize_grip(style, window, state_type, area, widget, detail, edge, x, y, width, height);
40319 // Draws a shadow around the given rectangle in @window
40320 // using the given style and state and shadow type.
40321 // <style>: a #GtkStyle
40322 // <window>: a #GdkWindow
40323 // <state_type>: a state
40324 // <shadow_type>: type of shadow to draw
40325 // <area>: clip rectangle or %NULL if the output should not be clipped
40326 // <widget>: the widget
40327 // <detail>: a style detail
40328 // <x>: x origin of the rectangle
40329 // <y>: y origin of the rectangle
40330 // <width>: width of the rectangle
40331 // <height>: width of the rectangle
40332 static void paint_shadow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40333 gtk_paint_shadow(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40337 // Draws a shadow around the given rectangle in @window
40338 // using the given style and state and shadow type, leaving a
40339 // gap in one side.
40340 // <style>: a #GtkStyle
40341 // <window>: a #GdkWindow
40342 // <state_type>: a state
40343 // <shadow_type>: type of shadow to draw
40344 // <area>: clip rectangle, or %NULL if the output should not be clipped
40345 // <widget>: the widget
40346 // <detail>: a style detail
40347 // <x>: x origin of the rectangle
40348 // <y>: y origin of the rectangle
40349 // <width>: width of the rectangle
40350 // <height>: width of the rectangle
40351 // <gap_side>: side in which to leave the gap
40352 // <gap_x>: starting position of the gap
40353 // <gap_width>: width of the gap
40354 static void paint_shadow_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
40355 gtk_paint_shadow_gap(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
40359 // Draws a slider in the given rectangle on @window using the
40360 // given style and orientation.
40361 // <style>: a #GtkStyle
40362 // <window>: a #GdkWindow
40363 // <state_type>: a state
40364 // <shadow_type>: a shadow
40365 // <area>: clip rectangle, or %NULL if the output should not be clipped
40366 // <widget>: the widget
40367 // <detail>: a style detail
40368 // <x>: the x origin of the rectangle in which to draw a slider
40369 // <y>: the y origin of the rectangle in which to draw a slider
40370 // <width>: the width of the rectangle in which to draw a slider
40371 // <height>: the height of the rectangle in which to draw a slider
40372 // <orientation>: the orientation to be used
40373 static void paint_slider(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) {
40374 gtk_paint_slider(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
40378 // Draws a spinner on @window using the given parameters.
40379 // <style>: a #GtkStyle
40380 // <window>: a #GdkWindow
40381 // <state_type>: a state
40382 // <area>: clip rectangle, or %NULL if the output should not be clipped
40383 // <widget>: the widget (may be %NULL)
40384 // <detail>: a style detail (may be %NULL)
40385 // <step>: the nth step, a value between 0 and #GtkSpinner:num-steps
40386 // <x>: the x origin of the rectangle in which to draw the spinner
40387 // <y>: the y origin of the rectangle in which to draw the spinner
40388 // <width>: the width of the rectangle in which to draw the spinner
40389 // <height>: the height of the rectangle in which to draw the spinner
40390 static void paint_spinner(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, uint step, int x, int y, int width, int height) {
40391 gtk_paint_spinner(style, window, state_type, area, widget, detail, step, x, y, width, height);
40395 // Draws a text string on @window with the given parameters.
40396 // <style>: a #GtkStyle
40397 // <window>: a #GdkWindow
40398 // <state_type>: a state
40399 // <area>: clip rectangle, or %NULL if the output should not be clipped
40400 // <widget>: the widget
40401 // <detail>: a style detail
40402 // <x>: x origin
40403 // <y>: y origin
40404 // <string>: the string to draw
40405 static void paint_string(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, char* string_) {
40406 gtk_paint_string(style, window, state_type, area, widget, detail, x, y, string_);
40410 // Draws an option menu tab (i.e. the up and down pointing arrows)
40411 // in the given rectangle on @window using the given parameters.
40412 // <style>: a #GtkStyle
40413 // <window>: a #GdkWindow
40414 // <state_type>: a state
40415 // <shadow_type>: the type of shadow to draw
40416 // <area>: clip rectangle, or %NULL if the output should not be clipped
40417 // <widget>: the widget
40418 // <detail>: a style detail
40419 // <x>: x origin of the rectangle to draw the tab in
40420 // <y>: y origin of the rectangle to draw the tab in
40421 // <width>: the width of the rectangle to draw the tab in
40422 // <height>: the height of the rectangle to draw the tab in
40423 static void paint_tab(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
40424 gtk_paint_tab(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
40428 // Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
40429 // using the given style and state.
40430 // <style>: a #GtkStyle
40431 // <window>: a #GdkWindow
40432 // <state_type>: a state
40433 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
40434 // <widget>: the widget
40435 // <detail>: a style detail
40436 // <y1_>: the starting y coordinate
40437 // <y2_>: the ending y coordinate
40438 // <x>: the x coordinate
40439 static void paint_vline(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int y1_, int y2_, int x) {
40440 gtk_paint_vline(style, window, state_type, area, widget, detail, y1_, y2_, x);
40444 // Returns the name of the default paper size, which
40445 // depends on the current locale.
40446 // is owned by GTK+ and should not be modified.
40447 // RETURNS: the name of the default paper size. The string
40448 static char* paper_size_get_default() {
40449 return gtk_paper_size_get_default();
40453 // Creates a list of known paper sizes.
40454 // allocated #GtkPaperSize objects
40455 // RETURNS: a newly allocated list of newly
40456 // <include_custom>: whether to include custom paper sizes as defined in the page setup dialog
40457 static GLib2.List* /*new*/ paper_size_get_paper_sizes(int include_custom) {
40458 return gtk_paper_size_get_paper_sizes(include_custom);
40462 // Parses command line arguments, and initializes global
40463 // attributes of GTK+, but does not actually open a connection
40464 // to a display. (See gdk_display_open(), gdk_get_display_arg_name())
40465 // Any arguments used by GTK+ or GDK are removed from the array and
40466 // There is no need to call this function explicitely if you are using
40467 // gtk_init(), or gtk_init_check().
40468 // RETURNS: %TRUE if initialization succeeded, otherwise %FALSE.
40469 // <argc>: a pointer to the number of command line arguments
40470 // <argv>: a pointer to the array of command line arguments
40471 static int parse_args(/*inout*/ int* argc, /*inout*/ char*** argv) {
40472 return gtk_parse_args(argc, argv);
40476 // Registers an error quark for #GtkPrintOperation if necessary.
40477 // RETURNS: The error quark used for #GtkPrintOperation errors.
40478 static GLib2.Quark print_error_quark() {
40479 return gtk_print_error_quark();
40483 // Runs a page setup dialog, letting the user modify the values from
40484 // is identical to the passed in @page_setup, otherwise it contains the
40485 // modifications done in the dialog.
40486 // Note that this function may use a recursive mainloop to show the page
40487 // setup dialog. See gtk_print_run_page_setup_dialog_async() if this is
40488 // a problem.
40489 // RETURNS: a new #GtkPageSetup
40490 // <parent>: transient parent
40491 // <page_setup>: an existing #GtkPageSetup
40492 // <settings>: a #GtkPrintSettings
40493 static PageSetup* /*new*/ print_run_page_setup_dialog(Window* parent, PageSetup* page_setup, PrintSettings* settings) {
40494 return gtk_print_run_page_setup_dialog(parent, page_setup, settings);
40498 // Unintrospectable function: print_run_page_setup_dialog_async() / gtk_print_run_page_setup_dialog_async()
40499 // Runs a page setup dialog, letting the user modify the values from @page_setup.
40500 // In contrast to gtk_print_run_page_setup_dialog(), this function returns after
40501 // showing the page setup dialog on platforms that support this, and calls @done_cb
40502 // from a signal handler for the ::response signal of the dialog.
40503 // <parent>: transient parent, or %NULL
40504 // <page_setup>: an existing #GtkPageSetup, or %NULL
40505 // <settings>: a #GtkPrintSettings
40506 // <done_cb>: a function to call when the user saves the modified page setup
40507 // <data>: user data to pass to @done_cb
40508 static void print_run_page_setup_dialog_async(Window* parent, PageSetup* page_setup, PrintSettings* settings, PageSetupDoneFunc done_cb, void* data) {
40509 gtk_print_run_page_setup_dialog_async(parent, page_setup, settings, done_cb, data);
40513 // Sends an event to a widget, propagating the event to parent widgets
40514 // if the event remains unhandled. Events received by GTK+ from GDK
40515 // normally begin in gtk_main_do_event(). Depending on the type of
40516 // event, existence of modal dialogs, grabs, etc., the event may be
40517 // propagated; if so, this function is used. gtk_propagate_event()
40518 // calls gtk_widget_event() on each widget it decides to send the
40519 // event to. So gtk_widget_event() is the lowest-level function; it
40520 // simply emits the "event" and possibly an event-specific signal on a
40521 // widget. gtk_propagate_event() is a bit higher-level, and
40522 // gtk_main_do_event() is the highest level.
40523 // All that said, you most likely don't want to use any of these
40524 // functions; synthesizing events is rarely needed. Consider asking on
40525 // the mailing list for better ways to achieve your goals. For
40526 // example, use gdk_window_invalidate_rect() or
40527 // gtk_widget_queue_draw() instead of making up expose events.
40528 // <widget>: a #GtkWidget
40529 // <event>: an event
40530 static void propagate_event(Widget* widget, Gdk2.Event* event) {
40531 gtk_propagate_event(widget, event);
40534 // Unintrospectable function: quit_add() / gtk_quit_add()
40535 static uint quit_add(uint main_level, Function function_, void* data) {
40536 return gtk_quit_add(main_level, function_, data);
40539 static void quit_add_destroy(uint main_level, Object* object) {
40540 gtk_quit_add_destroy(main_level, object);
40543 // Unintrospectable function: quit_add_full() / gtk_quit_add_full()
40544 static uint quit_add_full(uint main_level, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
40545 return gtk_quit_add_full(main_level, function_, marshal, data, destroy);
40548 static void quit_remove(uint quit_handler_id) {
40549 gtk_quit_remove(quit_handler_id);
40552 static void quit_remove_by_data(void* data) {
40553 gtk_quit_remove_by_data(data);
40556 static void rc_add_class_style(RcStyle* rc_style, char* pattern) {
40557 gtk_rc_add_class_style(rc_style, pattern);
40561 // Adds a file to the list of files to be parsed at the
40562 // end of gtk_init().
40563 // <filename>: the pathname to the file. If @filename is not absolute, it is searched in the current directory.
40564 static void rc_add_default_file(char* filename) {
40565 gtk_rc_add_default_file(filename);
40568 static void rc_add_widget_class_style(RcStyle* rc_style, char* pattern) {
40569 gtk_rc_add_widget_class_style(rc_style, pattern);
40572 static void rc_add_widget_name_style(RcStyle* rc_style, char* pattern) {
40573 gtk_rc_add_widget_name_style(rc_style, pattern);
40577 // Searches for a theme engine in the GTK+ search path. This function
40578 // is not useful for applications and should not be used.
40579 // otherwise %NULL.
40580 // RETURNS: The filename, if found (must be freed with g_free()),
40581 // <module_file>: name of a theme engine
40582 static char* /*new*/ rc_find_module_in_path(char* module_file) {
40583 return gtk_rc_find_module_in_path(module_file);
40587 // Looks up a file in pixmap path for the specified #GtkSettings.
40588 // If the file is not found, it outputs a warning message using
40589 // g_warning() and returns %NULL.
40590 // RETURNS: the filename.
40591 // <settings>: a #GtkSettings
40592 // <scanner>: Scanner used to get line number information for the warning message, or %NULL
40593 // <pixmap_file>: name of the pixmap file to locate.
40594 static char* /*new*/ rc_find_pixmap_in_path(Settings* settings, GLib2.Scanner* scanner, char* pixmap_file) {
40595 return gtk_rc_find_pixmap_in_path(settings, scanner, pixmap_file);
40599 // Retrieves the current list of RC files that will be parsed
40600 // at the end of gtk_init().
40601 // A %NULL-terminated array of filenames.
40602 // This memory is owned by GTK+ and must not be freed by the application.
40603 // If you want to store this information, you should make a copy.
40604 static char** rc_get_default_files() {
40605 return gtk_rc_get_default_files();
40609 // Obtains the path to the IM modules file. See the documentation
40610 // of the <link linkend="im-module-file"><envar>GTK_IM_MODULE_FILE</envar></link>
40611 // environment variable for more details.
40612 // RETURNS: a newly-allocated string containing the name of the file listing the IM modules available for loading
40613 static char* /*new*/ rc_get_im_module_file() {
40614 return gtk_rc_get_im_module_file();
40618 // Obtains the path in which to look for IM modules. See the documentation
40619 // of the <link linkend="im-module-path"><envar>GTK_PATH</envar></link>
40620 // environment variable for more details about looking up modules. This
40621 // function is useful solely for utilities supplied with GTK+ and should
40622 // not be used by applications under normal circumstances.
40623 // RETURNS: a newly-allocated string containing the path in which to look for IM modules.
40624 static char* /*new*/ rc_get_im_module_path() {
40625 return gtk_rc_get_im_module_path();
40629 // Returns a directory in which GTK+ looks for theme engines.
40630 // For full information about the search for theme engines,
40631 // see the docs for <envar>GTK_PATH</envar> in
40632 // <xref linkend="gtk-running"/>.
40633 // RETURNS: the directory. (Must be freed with g_free())
40634 static char* /*new*/ rc_get_module_dir() {
40635 return gtk_rc_get_module_dir();
40639 // Finds all matching RC styles for a given widget,
40640 // composites them together, and then creates a
40641 // #GtkStyle representing the composite appearance.
40642 // (GTK+ actually keeps a cache of previously
40643 // created styles, so a new style may not be
40644 // created.)
40645 // to the returned style, so if you want to save this
40646 // style around, you should add a reference yourself.
40647 // RETURNS: the resulting style. No refcount is added
40648 // <widget>: a #GtkWidget
40649 static Style* rc_get_style(Widget* widget) {
40650 return gtk_rc_get_style(widget);
40654 // Creates up a #GtkStyle from styles defined in a RC file by providing
40655 // the raw components used in matching. This function may be useful
40656 // when creating pseudo-widgets that should be themed like widgets but
40657 // don't actually have corresponding GTK+ widgets. An example of this
40658 // would be items inside a GNOME canvas widget.
40659 // The action of gtk_rc_get_style() is similar to:
40660 // |[
40661 // gtk_widget_path (widget, NULL, &path, NULL);
40662 // gtk_widget_class_path (widget, NULL, &class_path, NULL);
40663 // gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget),
40664 // path, class_path,
40665 // G_OBJECT_TYPE (widget));
40666 // ]|
40667 // supplied paths, or %NULL if nothing matching was specified and the
40668 // default style should be used. The returned value is owned by GTK+
40669 // as part of an internal cache, so you must call g_object_ref() on
40670 // the returned value if you want to keep a reference to it.
40671 // RETURNS: A style created by matching with the
40672 // <settings>: a #GtkSettings object
40673 // <widget_path>: the widget path to use when looking up the style, or %NULL if no matching against the widget path should be done
40674 // <class_path>: the class path to use when looking up the style, or %NULL if no matching against the class path should be done.
40675 // <type>: a type that will be used along with parent types of this type when matching against class styles, or #G_TYPE_NONE
40676 static Style* rc_get_style_by_paths(Settings* settings, char* widget_path, char* class_path, Type type) {
40677 return gtk_rc_get_style_by_paths(settings, widget_path, class_path, type);
40680 static char* /*new*/ rc_get_theme_dir() {
40681 return gtk_rc_get_theme_dir();
40684 static void rc_parse(char* filename) {
40685 gtk_rc_parse(filename);
40689 // Parses a color in the <link linkend="color=format">format</link> expected
40690 // in a RC file.
40691 // Note that theme engines should use gtk_rc_parse_color_full() in
40692 // order to support symbolic colors.
40693 // that was expected but not found
40694 // RETURNS: %G_TOKEN_NONE if parsing succeeded, otherwise the token
40695 // <scanner>: a #GScanner
40696 // <color>: a pointer to a #GdkColor structure in which to store the result
40697 static uint rc_parse_color(GLib2.Scanner* scanner, /*out*/ Gdk2.Color* color) {
40698 return gtk_rc_parse_color(scanner, color);
40702 // Parses a color in the <link linkend="color=format">format</link> expected
40703 // in a RC file. If @style is not %NULL, it will be consulted to resolve
40704 // references to symbolic colors.
40705 // that was expected but not found
40706 // RETURNS: %G_TOKEN_NONE if parsing succeeded, otherwise the token
40707 // <scanner>: a #GScanner
40708 // <style>: a #GtkRcStyle, or %NULL
40709 // <color>: a pointer to a #GdkColor structure in which to store the result
40710 static uint rc_parse_color_full(GLib2.Scanner* scanner, RcStyle* style, /*out*/ Gdk2.Color* color) {
40711 return gtk_rc_parse_color_full(scanner, style, color);
40714 static uint rc_parse_priority(GLib2.Scanner* scanner, PathPriorityType* priority) {
40715 return gtk_rc_parse_priority(scanner, priority);
40718 static uint rc_parse_state(GLib2.Scanner* scanner, StateType* state) {
40719 return gtk_rc_parse_state(scanner, state);
40722 static void rc_parse_string(char* rc_string) {
40723 gtk_rc_parse_string(rc_string);
40727 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
40728 // or gtk_widget_class_install_style_property_parser() which parses
40729 // borders in the form
40730 // <literal>"{ left, right, top, bottom }"</literal> for integers
40731 // %left, %right, %top and %bottom.
40732 // has been set to the resulting #GtkBorder.
40733 // RETURNS: %TRUE if @gstring could be parsed and @property_value
40734 // <pspec>: a #GParamSpec
40735 // <gstring>: the #GString to be parsed
40736 // <property_value>: a #GValue which must hold boxed values.
40737 static int rc_property_parse_border(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
40738 return gtk_rc_property_parse_border(pspec, gstring, property_value);
40742 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
40743 // or gtk_widget_class_install_style_property_parser() which parses a
40744 // color given either by its name or in the form
40745 // <literal>{ red, green, blue }</literal> where %red, %green and
40746 // %blue are integers between 0 and 65535 or floating-point numbers
40747 // between 0 and 1.
40748 // has been set to the resulting #GdkColor.
40749 // RETURNS: %TRUE if @gstring could be parsed and @property_value
40750 // <pspec>: a #GParamSpec
40751 // <gstring>: the #GString to be parsed
40752 // <property_value>: a #GValue which must hold #GdkColor values.
40753 static int rc_property_parse_color(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
40754 return gtk_rc_property_parse_color(pspec, gstring, property_value);
40758 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
40759 // or gtk_widget_class_install_style_property_parser() which parses a single
40760 // enumeration value.
40761 // The enumeration value can be specified by its name, its nickname or
40762 // its numeric value. For consistency with flags parsing, the value
40763 // may be surrounded by parentheses.
40764 // has been set to the resulting #GEnumValue.
40765 // RETURNS: %TRUE if @gstring could be parsed and @property_value
40766 // <pspec>: a #GParamSpec
40767 // <gstring>: the #GString to be parsed
40768 // <property_value>: a #GValue which must hold enum values.
40769 static int rc_property_parse_enum(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
40770 return gtk_rc_property_parse_enum(pspec, gstring, property_value);
40774 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
40775 // or gtk_widget_class_install_style_property_parser() which parses flags.
40776 // Flags can be specified by their name, their nickname or
40777 // numerically. Multiple flags can be specified in the form
40778 // <literal>"( flag1 | flag2 | ... )"</literal>.
40779 // has been set to the resulting flags value.
40780 // RETURNS: %TRUE if @gstring could be parsed and @property_value
40781 // <pspec>: a #GParamSpec
40782 // <gstring>: the #GString to be parsed
40783 // <property_value>: a #GValue which must hold flags values.
40784 static int rc_property_parse_flags(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
40785 return gtk_rc_property_parse_flags(pspec, gstring, property_value);
40789 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
40790 // or gtk_widget_class_install_style_property_parser() which parses a
40791 // requisition in the form
40792 // <literal>"{ width, height }"</literal> for integers %width and %height.
40793 // has been set to the resulting #GtkRequisition.
40794 // RETURNS: %TRUE if @gstring could be parsed and @property_value
40795 // <pspec>: a #GParamSpec
40796 // <gstring>: the #GString to be parsed
40797 // <property_value>: a #GValue which must hold boxed values.
40798 static int rc_property_parse_requisition(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
40799 return gtk_rc_property_parse_requisition(pspec, gstring, property_value);
40803 // If the modification time on any previously read file for the
40804 // default #GtkSettings has changed, discard all style information
40805 // and then reread all previously read RC files.
40806 // RETURNS: %TRUE if the files were reread.
40807 static int rc_reparse_all() {
40808 return gtk_rc_reparse_all();
40812 // If the modification time on any previously read file
40813 // for the given #GtkSettings has changed, discard all style information
40814 // and then reread all previously read RC files.
40815 // RETURNS: %TRUE if the files were reread.
40816 // <settings>: a #GtkSettings
40817 // <force_load>: load whether or not anything changed
40818 static int rc_reparse_all_for_settings(Settings* settings, int force_load) {
40819 return gtk_rc_reparse_all_for_settings(settings, force_load);
40823 // This function recomputes the styles for all widgets that use a
40824 // particular #GtkSettings object. (There is one #GtkSettings object
40825 // per #GdkScreen, see gtk_settings_get_for_screen()); It is useful
40826 // when some global parameter has changed that affects the appearance
40827 // of all widgets, because when a widget gets a new style, it will
40828 // both redraw and recompute any cached information about its
40829 // appearance. As an example, it is used when the default font size
40830 // set by the operating system changes. Note that this function
40831 // doesn't affect widgets that have a style set explicitely on them
40832 // with gtk_widget_set_style().
40833 // <settings>: a #GtkSettings
40834 static void rc_reset_styles(Settings* settings) {
40835 gtk_rc_reset_styles(settings);
40838 // Unintrospectable function: rc_scanner_new() / gtk_rc_scanner_new()
40839 static GLib2.Scanner* rc_scanner_new() {
40840 return gtk_rc_scanner_new();
40844 // Sets the list of files that GTK+ will read at the
40845 // end of gtk_init().
40846 // <filenames>: A %NULL-terminated list of filenames.
40847 static void rc_set_default_files(char** filenames) {
40848 gtk_rc_set_default_files(filenames);
40851 static GLib2.Quark recent_chooser_error_quark() {
40852 return gtk_recent_chooser_error_quark();
40855 static GLib2.Quark recent_manager_error_quark() {
40856 return gtk_recent_manager_error_quark();
40860 // Converts a color from RGB space to HSV.
40861 // Input values must be in the [0.0, 1.0] range;
40862 // output values will be in the same range.
40863 // <r>: Red
40864 // <g>: Green
40865 // <b>: Blue
40866 // <h>: Return value for the hue component
40867 // <s>: Return value for the saturation component
40868 // <v>: Return value for the value component
40869 static void rgb_to_hsv(double r, double g, double b, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v) {
40870 gtk_rgb_to_hsv(r, g, b, h, s, v);
40874 // Appends a specified target to the list of supported targets for a
40875 // given widget and selection.
40876 // <widget>: a #GtkTarget
40877 // <selection>: the selection
40878 // <target>: target to add.
40879 // <info>: A unsigned integer which will be passed back to the application.
40880 static void selection_add_target(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint info) {
40881 gtk_selection_add_target(widget, selection, target, info);
40885 // Prepends a table of targets to the list of supported targets
40886 // for a given widget and selection.
40887 // <widget>: a #GtkWidget
40888 // <selection>: the selection
40889 // <targets>: a table of targets to add
40890 // <ntargets>: number of entries in @targets
40891 static void selection_add_targets(Widget* widget, Gdk2.Atom selection, TargetEntry* targets, uint ntargets) {
40892 gtk_selection_add_targets(widget, selection, targets, ntargets);
40896 // The default handler for the #GtkWidget::selection-clear-event
40897 // signal.
40898 // your selection-clear-event handler. Calling this function
40899 // from any other context is illegal.
40900 // RETURNS: %TRUE if the event was handled, otherwise false
40901 // <widget>: a #GtkWidget
40902 // <event>: the event
40903 static int selection_clear(Widget* widget, Gdk2.EventSelection* event) {
40904 return gtk_selection_clear(widget, event);
40908 // Remove all targets registered for the given selection for the
40909 // widget.
40910 // <widget>: a #GtkWidget
40911 // <selection>: an atom representing a selection
40912 static void selection_clear_targets(Widget* widget, Gdk2.Atom selection) {
40913 gtk_selection_clear_targets(widget, selection);
40917 // Requests the contents of a selection. When received,
40918 // a "selection-received" signal will be generated.
40919 // request. (e.g., there was already a request in process for
40920 // this widget).
40921 // RETURNS: %TRUE if requested succeeded. %FALSE if we could not process
40922 // <widget>: The widget which acts as requestor
40923 // <selection>: Which selection to get
40924 // <target>: Form of information desired (e.g., STRING)
40925 // <time_>: Time of request (usually of triggering event)
40926 static int selection_convert(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint time_) {
40927 return gtk_selection_convert(widget, selection, target, time_);
40931 // Claims ownership of a given selection for a particular widget,
40932 // or, if @widget is %NULL, release ownership of the selection.
40933 // RETURNS: %TRUE if the operation succeeded
40934 // <widget>: a #GtkWidget, or %NULL.
40935 // <selection>: an interned atom representing the selection to claim
40936 // <time_>: timestamp with which to claim the selection
40937 static int selection_owner_set(Widget* widget, Gdk2.Atom selection, uint time_) {
40938 return gtk_selection_owner_set(widget, selection, time_);
40942 // Claim ownership of a given selection for a particular widget, or,
40943 // if @widget is %NULL, release ownership of the selection.
40944 // RETURNS: TRUE if the operation succeeded
40945 // <display>: the #Gdkdisplay where the selection is set
40946 // <widget>: new selection owner (a #GdkWidget), or %NULL.
40947 // <selection>: an interned atom representing the selection to claim.
40948 // <time_>: timestamp with which to claim the selection
40949 static int selection_owner_set_for_display(Gdk2.Display* display, Widget* widget, Gdk2.Atom selection, uint time_) {
40950 return gtk_selection_owner_set_for_display(display, widget, selection, time_);
40954 // Removes all handlers and unsets ownership of all
40955 // selections for a widget. Called when widget is being
40956 // destroyed. This function will not generally be
40957 // called by applications.
40958 // <widget>: a #GtkWidget
40959 static void selection_remove_all(Widget* widget) {
40960 gtk_selection_remove_all(widget);
40964 // Initializes internationalization support for GTK+. gtk_init()
40965 // automatically does this, so there is typically no point
40966 // in calling this function.
40967 // If you are calling this function because you changed the locale
40968 // after GTK+ is was initialized, then calling this function
40969 // may help a bit. (Note, however, that changing the locale
40970 // after GTK+ is initialized may produce inconsistent results and
40971 // is not really supported.)
40972 // In detail - sets the current locale according to the
40973 // program environment. This is the same as calling the C library function
40974 // <literal>setlocale (LC_ALL, "")</literal> but also takes care of the
40975 // locale specific setup of the windowing system used by GDK.
40976 // form lang_COUNTRY, where lang is an ISO-639 language code, and
40977 // COUNTRY is an ISO-3166 country code. On Unix, this form matches the
40978 // result of the setlocale(); it is also used on other machines, such as
40979 // Windows, where the C library returns a different result. The string is
40980 // owned by GTK+ and should not be modified or freed.
40981 // RETURNS: a string corresponding to the locale set, typically in the
40982 static char* /*new*/ set_locale() {
40983 return gtk_set_locale();
40987 // Unintrospectable function: show_about_dialog() / gtk_show_about_dialog()
40988 // This is a convenience function for showing an application's about box.
40989 // The constructed dialog is associated with the parent window and
40990 // reused for future invocations of this function.
40991 // <parent>: transient parent, or %NULL for none
40992 // <first_property_name>: the name of the first property
40993 alias gtk_show_about_dialog show_about_dialog; // Variadic
40996 // This is a convenience function for launching the default application
40997 // to show the uri. The uri must be of a form understood by GIO (i.e. you
40998 // need to install gvfs to get support for uri schemes such as http://
40999 // or ftp://, as only local files are handled by GIO itself).
41000 // Typical examples are
41001 // <simplelist>
41002 // <member><filename>file:///home/gnome/pict.jpg</filename></member>
41003 // <member><filename>http://www.gnome.org</filename></member>
41004 // <member><filename>mailto:me&commat;gnome.org</filename></member>
41005 // </simplelist>
41006 // Ideally the timestamp is taken from the event triggering
41007 // the gtk_show_uri() call. If timestamp is not known you can take
41008 // %GDK_CURRENT_TIME.
41009 // This function can be used as a replacement for gnome_vfs_url_show()
41010 // and gnome_url_show().
41011 // RETURNS: %TRUE on success, %FALSE on error.
41012 // <screen>: screen to show the uri on or %NULL for the default screen
41013 // <uri>: the uri to show
41014 // <timestamp>: a timestamp to prevent focus stealing.
41015 static int show_uri(Gdk2.Screen* screen, char* uri, uint timestamp, GLib2.Error** error=null) {
41016 return gtk_show_uri(screen, uri, timestamp, error);
41019 // Unintrospectable function: signal_compat_matched() / gtk_signal_compat_matched()
41020 static void signal_compat_matched(Object* object, GObject2.Callback func, void* data, GObject2.SignalMatchType match, uint action) {
41021 gtk_signal_compat_matched(object, func, data, match, action);
41024 // Unintrospectable function: signal_connect_full() / gtk_signal_connect_full()
41025 static c_ulong signal_connect_full(Object* object, char* name, GObject2.Callback func, CallbackMarshal unsupported, void* data, GLib2.DestroyNotify destroy_func, int object_signal, int after) {
41026 return gtk_signal_connect_full(object, name, func, unsupported, data, destroy_func, object_signal, after);
41029 // Unintrospectable function: signal_connect_object_while_alive() / gtk_signal_connect_object_while_alive()
41030 static void signal_connect_object_while_alive(Object* object, char* name, GObject2.Callback func, Object* alive_object) {
41031 gtk_signal_connect_object_while_alive(object, name, func, alive_object);
41034 // Unintrospectable function: signal_connect_while_alive() / gtk_signal_connect_while_alive()
41035 static void signal_connect_while_alive(Object* object, char* name, GObject2.Callback func, void* func_data, Object* alive_object) {
41036 gtk_signal_connect_while_alive(object, name, func, func_data, alive_object);
41039 // Unintrospectable function: signal_emit() / gtk_signal_emit()
41040 alias gtk_signal_emit signal_emit; // Variadic
41042 // Unintrospectable function: signal_emit_by_name() / gtk_signal_emit_by_name()
41043 alias gtk_signal_emit_by_name signal_emit_by_name; // Variadic
41045 static void signal_emit_stop_by_name(Object* object, char* name) {
41046 gtk_signal_emit_stop_by_name(object, name);
41049 static void signal_emitv(Object* object, uint signal_id, Arg* args) {
41050 gtk_signal_emitv(object, signal_id, args);
41053 static void signal_emitv_by_name(Object* object, char* name, Arg* args) {
41054 gtk_signal_emitv_by_name(object, name, args);
41057 // Unintrospectable function: signal_new() / gtk_signal_new()
41058 alias gtk_signal_new signal_new; // Variadic
41060 static uint signal_newv(char* name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, Type* args) {
41061 return gtk_signal_newv(name, signal_flags, object_type, function_offset, marshaller, return_val, n_args, args);
41065 // Registers each of the stock items in @items. If an item already
41066 // exists with the same stock ID as one of the @items, the old item
41067 // gets replaced. The stock items are copied, so GTK+ does not hold
41068 // any pointer into @items and @items can be freed. Use
41069 // gtk_stock_add_static() if @items is persistent and GTK+ need not
41070 // copy the array.
41071 // <items>: a #GtkStockItem or array of items
41072 // <n_items>: number of #GtkStockItem in @items
41073 static void stock_add(StockItem* items, uint n_items) {
41074 gtk_stock_add(items, n_items);
41078 // Same as gtk_stock_add(), but doesn't copy @items, so
41079 // <items>: a #GtkStockItem or array of #GtkStockItem
41080 // <n_items>: number of items
41081 static void stock_add_static(StockItem* items, uint n_items) {
41082 gtk_stock_add_static(items, n_items);
41086 // Retrieves a list of all known stock IDs added to a #GtkIconFactory
41087 // or registered with gtk_stock_add(). The list must be freed with g_slist_free(),
41088 // and each string in the list must be freed with g_free().
41089 // RETURNS: a list of known stock IDs
41090 static GLib2.SList* /*new*/ stock_list_ids() {
41091 return gtk_stock_list_ids();
41095 // Fills @item with the registered values for @stock_id, returning %TRUE
41096 // if @stock_id was known.
41097 // RETURNS: %TRUE if @item was initialized
41098 // <stock_id>: a stock item name
41099 // <item>: stock item to initialize with values
41100 static int stock_lookup(char* stock_id, /*out*/ StockItem* item) {
41101 return gtk_stock_lookup(stock_id, item);
41105 // Sets a function to be used for translating the @label of
41106 // a stock item.
41107 // If no function is registered for a translation domain,
41108 // g_dgettext() is used.
41109 // The function is used for all stock items whose
41110 // to use strings different from the actual gettext translation domain
41111 // of your application for this, as long as your #GtkTranslateFunc uses
41112 // the correct domain when calling dgettext(). This can be useful, e.g.
41113 // when dealing with message contexts:
41114 // |[
41115 // GtkStockItem items[] = {
41116 // { MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" },
41117 // { MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" },
41118 // };
41119 // gchar *
41120 // my_translate_func (const gchar *msgid,
41121 // gpointer data)
41122 // {
41123 // gchar *msgctxt = data;
41124 // return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid);
41125 // }
41126 // /&ast; ... &ast;/
41127 // gtk_stock_add (items, G_N_ELEMENTS (items));
41128 // gtk_stock_set_translate_func ("odd-item-domain", my_translate_func, "odd items");
41129 // gtk_stock_set_translate_func ("even-item-domain", my_translate_func, "even items");
41130 // ]|
41131 // <domain>: the translation domain for which @func shall be used
41132 // <func>: a #GtkTranslateFunc
41133 // <data>: data to pass to @func
41134 // <notify>: a #GDestroyNotify that is called when @data is no longer needed
41135 static void stock_set_translate_func(char* domain, TranslateFunc func, void* data, GLib2.DestroyNotify notify) {
41136 gtk_stock_set_translate_func(domain, func, data, notify);
41140 // This function frees a target table as returned by
41141 // gtk_target_table_new_from_list()
41142 // <targets>: a #GtkTargetEntry array
41143 // <n_targets>: the number of entries in the array
41144 static void target_table_free(TargetEntry* targets, int n_targets) {
41145 gtk_target_table_free(targets, n_targets);
41149 // This function creates an #GtkTargetEntry array that contains the
41150 // same targets as the passed %list. The returned table is newly
41151 // allocated and should be freed using gtk_target_table_free() when no
41152 // longer needed.
41153 // RETURNS: the new table.
41154 // <list>: a #GtkTargetList
41155 // <n_targets>: return location for the number ot targets in the table
41156 static TargetEntry* /*new*/ target_table_new_from_list(TargetList* list, /*out*/ int* n_targets) {
41157 return gtk_target_table_new_from_list(list, n_targets);
41161 // Determines if any of the targets in @targets can be used to
41162 // provide a #GdkPixbuf.
41163 // otherwise %FALSE.
41164 // RETURNS: %TRUE if @targets include a suitable target for images,
41165 // <targets>: an array of #GdkAtom<!-- -->s
41166 // <n_targets>: the length of @targets
41167 // <writable>: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
41168 static int targets_include_image(Gdk2.Atom* targets, int n_targets, int writable) {
41169 return gtk_targets_include_image(targets, n_targets, writable);
41173 // Determines if any of the targets in @targets can be used to
41174 // provide rich text.
41175 // otherwise %FALSE.
41176 // RETURNS: %TRUE if @targets include a suitable target for rich text,
41177 // <targets>: an array of #GdkAtom<!-- -->s
41178 // <n_targets>: the length of @targets
41179 // <buffer>: a #GtkTextBuffer
41180 static int targets_include_rich_text(Gdk2.Atom* targets, int n_targets, TextBuffer* buffer) {
41181 return gtk_targets_include_rich_text(targets, n_targets, buffer);
41185 // Determines if any of the targets in @targets can be used to
41186 // provide text.
41187 // otherwise %FALSE.
41188 // RETURNS: %TRUE if @targets include a suitable target for text,
41189 // <targets>: an array of #GdkAtom<!-- -->s
41190 // <n_targets>: the length of @targets
41191 static int targets_include_text(Gdk2.Atom* targets, int n_targets) {
41192 return gtk_targets_include_text(targets, n_targets);
41196 // Determines if any of the targets in @targets can be used to
41197 // provide an uri list.
41198 // otherwise %FALSE.
41199 // RETURNS: %TRUE if @targets include a suitable target for uri lists,
41200 // <targets>: an array of #GdkAtom<!-- -->s
41201 // <n_targets>: the length of @targets
41202 static int targets_include_uri(Gdk2.Atom* targets, int n_targets) {
41203 return gtk_targets_include_uri(targets, n_targets);
41207 // Create a simple window with window title @window_title and
41208 // text contents @dialog_text.
41209 // The window will quit any running gtk_main()-loop when destroyed, and it
41210 // will automatically be destroyed upon test function teardown.
41211 // RETURNS: a widget pointer to the newly created GtkWindow.
41212 // <window_title>: Title of the window to be displayed.
41213 // <dialog_text>: Text inside the window to be displayed.
41214 static Widget* test_create_simple_window(char* window_title, char* dialog_text) {
41215 return gtk_test_create_simple_window(window_title, dialog_text);
41219 // Unintrospectable function: test_create_widget() / gtk_test_create_widget()
41220 // This function wraps g_object_new() for widget types.
41221 // It'll automatically show all created non window widgets, also
41222 // g_object_ref_sink() them (to keep them alive across a running test)
41223 // and set them up for destruction during the next test teardown phase.
41224 // RETURNS: a newly created widget.
41225 // <widget_type>: a valid widget type.
41226 // <first_property_name>: Name of first property to set or %NULL
41227 alias gtk_test_create_widget test_create_widget; // Variadic
41230 // Unintrospectable function: test_display_button_window() / gtk_test_display_button_window()
41231 // Create a window with window title @window_title, text contents @dialog_text,
41232 // and a number of buttons, according to the paired argument list given
41233 // as @... parameters.
41234 // Each button is created with a @label and a ::clicked signal handler that
41235 // incremrents the integer stored in @nump.
41236 // The window will be automatically shown with gtk_widget_show_now() after
41237 // creation, so when this function returns it has already been mapped,
41238 // resized and positioned on screen.
41239 // The window will quit any running gtk_main()-loop when destroyed, and it
41240 // will automatically be destroyed upon test function teardown.
41241 // RETURNS: a widget pointer to the newly created GtkWindow.
41242 // <window_title>: Title of the window to be displayed.
41243 // <dialog_text>: Text inside the window to be displayed.
41244 alias gtk_test_display_button_window test_display_button_window; // Variadic
41247 // This function will search @widget and all its descendants for a GtkLabel
41248 // widget with a text string matching @label_pattern.
41249 // The @label_pattern may contain asterisks '*' and question marks '?' as
41250 // placeholders, g_pattern_match() is used for the matching.
41251 // Note that locales other than "C" tend to alter (translate" label strings,
41252 // so this function is genrally only useful in test programs with
41253 // predetermined locales, see gtk_test_init() for more details.
41254 // RETURNS: a GtkLabel widget if any is found.
41255 // <widget>: Valid label or container widget.
41256 // <label_pattern>: Shell-glob pattern to match a label string.
41257 static Widget* test_find_label(Widget* widget, char* label_pattern) {
41258 return gtk_test_find_label(widget, label_pattern);
41262 // This function will search siblings of @base_widget and siblings of its
41263 // ancestors for all widgets matching @widget_type.
41264 // Of the matching widgets, the one that is geometrically closest to
41265 // The general purpose of this function is to find the most likely "action"
41266 // widget, relative to another labeling widget. Such as finding a
41267 // button or text entry widget, given it's corresponding label widget.
41268 // RETURNS: a widget of type @widget_type if any is found.
41269 // <base_widget>: Valid widget, part of a widget hierarchy
41270 // <widget_type>: Type of a aearched for sibling widget
41271 static Widget* test_find_sibling(Widget* base_widget, Type widget_type) {
41272 return gtk_test_find_sibling(base_widget, widget_type);
41276 // This function will search the descendants of @widget for a widget
41277 // of type @widget_type that has a label matching @label_pattern next
41278 // to it. This is most useful for automated GUI testing, e.g. to find
41279 // the "OK" button in a dialog and synthesize clicks on it.
41280 // However see gtk_test_find_label(), gtk_test_find_sibling() and
41281 // gtk_test_widget_click() for possible caveats involving the search of
41282 // such widgets and synthesizing widget events.
41283 // RETURNS: a valid widget if any is found or %NULL.
41284 // <widget>: Container widget, usually a GtkWindow.
41285 // <label_pattern>: Shell-glob pattern to match a label string.
41286 // <widget_type>: Type of a aearched for label sibling widget.
41287 static Widget* test_find_widget(Widget* widget, char* label_pattern, Type widget_type) {
41288 return gtk_test_find_widget(widget, label_pattern, widget_type);
41292 // Unintrospectable function: test_init() / gtk_test_init()
41293 // This function is used to initialize a GTK+ test program.
41294 // It will in turn call g_test_init() and gtk_init() to properly
41295 // initialize the testing framework and graphical toolkit. It'll
41296 // also set the program's locale to "C" and prevent loading of rc
41297 // files and Gtk+ modules. This is done to make tets program
41298 // environments as deterministic as possible.
41299 // Like gtk_init() and g_test_init(), any known arguments will be
41300 // processed and stripped from @argc and @argv.
41301 // <argcp>: Address of the <parameter>argc</parameter> parameter of the main() function. Changed if any arguments were handled.
41302 // <argvp>: Address of the <parameter>argv</parameter> parameter of main(). Any parameters understood by g_test_init() or gtk_init() are stripped before return.
41303 alias gtk_test_init test_init; // Variadic
41306 // Return the type ids that have been registered after
41307 // calling gtk_test_register_all_types().
41308 // RETURNS: 0-terminated array of type ids
41309 // <n_types>: location to store number of types
41310 static Type* test_list_all_types(/*out*/ uint* n_types) {
41311 return gtk_test_list_all_types(n_types);
41315 // Force registration of all core Gtk+ and Gdk object types.
41316 // This allowes to refer to any of those object types via
41317 // g_type_from_name() after calling this function.
41318 static void test_register_all_types() {
41319 gtk_test_register_all_types();
41323 // Retrive the literal adjustment value for GtkRange based
41324 // widgets and spin buttons. Note that the value returned by
41325 // this function is anything between the lower and upper bounds
41326 // of the adjustment belonging to @widget, and is not a percentage
41327 // as passed in to gtk_test_slider_set_perc().
41328 // RETURNS: adjustment->value for an adjustment belonging to @widget.
41329 // <widget>: valid widget pointer.
41330 static double test_slider_get_value(Widget* widget) {
41331 return gtk_test_slider_get_value(widget);
41335 // This function will adjust the slider position of all GtkRange
41336 // based widgets, such as scrollbars or scales, it'll also adjust
41337 // spin buttons. The adjustment value of these widgets is set to
41338 // a value between the lower and upper limits, according to the
41339 // <widget>: valid widget pointer.
41340 // <percentage>: value between 0 and 100.
41341 static void test_slider_set_perc(Widget* widget, double percentage) {
41342 gtk_test_slider_set_perc(widget, percentage);
41346 // This function will generate a @button click in the upwards or downwards
41347 // spin button arrow areas, usually leading to an increase or decrease of
41348 // spin button's value.
41349 // RETURNS: wether all actions neccessary for the button click simulation were carried out successfully.
41350 // <spinner>: valid GtkSpinButton widget.
41351 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
41352 // <upwards>: %TRUE for upwards arrow click, %FALSE for downwards arrow click.
41353 static int test_spin_button_click(SpinButton* spinner, uint button, int upwards) {
41354 return gtk_test_spin_button_click(spinner, button, upwards);
41358 // Retrive the text string of @widget if it is a GtkLabel,
41359 // GtkEditable (entry and text widgets) or GtkTextView.
41360 // RETURNS: new 0-terminated C string, needs to be released with g_free().
41361 // <widget>: valid widget pointer.
41362 static char* /*new*/ test_text_get(Widget* widget) {
41363 return gtk_test_text_get(widget);
41367 // Set the text string of @widget to @string if it is a GtkLabel,
41368 // GtkEditable (entry and text widgets) or GtkTextView.
41369 // <widget>: valid widget pointer.
41370 // <string>: a 0-terminated C string
41371 static void test_text_set(Widget* widget, char* string_) {
41372 gtk_test_text_set(widget, string_);
41376 // This function will generate a @button click (button press and button
41377 // release event) in the middle of the first GdkWindow found that belongs
41378 // to @widget.
41379 // For %GTK_NO_WINDOW widgets like GtkButton, this will often be an
41380 // input-only event window. For other widgets, this is usually widget->window.
41381 // Certain caveats should be considered when using this function, in
41382 // particular because the mouse pointer is warped to the button click
41383 // location, see gdk_test_simulate_button() for details.
41384 // RETURNS: wether all actions neccessary for the button click simulation were carried out successfully.
41385 // <widget>: Widget to generate a button click on.
41386 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
41387 // <modifiers>: Keyboard modifiers the event is setup with.
41388 static int test_widget_click(Widget* widget, uint button, Gdk2.ModifierType modifiers) {
41389 return gtk_test_widget_click(widget, button, modifiers);
41393 // This function will generate keyboard press and release events in
41394 // the middle of the first GdkWindow found that belongs to @widget.
41395 // For %GTK_NO_WINDOW widgets like GtkButton, this will often be an
41396 // input-only event window. For other widgets, this is usually widget->window.
41397 // Certain caveats should be considered when using this function, in
41398 // particular because the mouse pointer is warped to the key press
41399 // location, see gdk_test_simulate_key() for details.
41400 // RETURNS: wether all actions neccessary for the key event simulation were carried out successfully.
41401 // <widget>: Widget to generate a key press and release on.
41402 // <keyval>: A Gdk keyboard value.
41403 // <modifiers>: Keyboard modifiers the event is setup with.
41404 static int test_widget_send_key(Widget* widget, uint keyval, Gdk2.ModifierType modifiers) {
41405 return gtk_test_widget_send_key(widget, keyval, modifiers);
41408 static void text_anchored_child_set_layout(Widget* child, TextLayout* layout) {
41409 gtk_text_anchored_child_set_layout(child, layout);
41412 // Unintrospectable function: timeout_add() / gtk_timeout_add()
41413 static uint timeout_add(uint interval, Function function_, void* data) {
41414 return gtk_timeout_add(interval, function_, data);
41417 // Unintrospectable function: timeout_add_full() / gtk_timeout_add_full()
41418 static uint timeout_add_full(uint interval, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
41419 return gtk_timeout_add_full(interval, function_, marshal, data, destroy);
41422 static void timeout_remove(uint timeout_handler_id) {
41423 gtk_timeout_remove(timeout_handler_id);
41426 // Unintrospectable function: tooltips_data_get() / gtk_tooltips_data_get()
41427 static TooltipsData* tooltips_data_get(Widget* widget) {
41428 return gtk_tooltips_data_get(widget);
41432 // Obtains a @tree_model and @path from selection data of target type
41433 // %GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler.
41434 // This function can only be used if @selection_data originates from the same
41435 // process that's calling this function, because a pointer to the tree model
41436 // is being passed around. If you aren't in the same process, then you'll
41437 // get memory corruption. In the #GtkTreeDragDest drag_data_received handler,
41438 // you can assume that selection data of type %GTK_TREE_MODEL_ROW is
41439 // in from the current process. The returned path must be freed with
41440 // gtk_tree_path_free().
41441 // is otherwise valid
41442 // RETURNS: %TRUE if @selection_data had target type %GTK_TREE_MODEL_ROW and
41443 // <selection_data>: a #GtkSelectionData
41444 // <tree_model>: a #GtkTreeModel
41445 // <path>: row in @tree_model
41446 static int tree_get_row_drag_data(SelectionData* selection_data, /*out*/ TreeModel** tree_model, /*out*/ TreePath** path) {
41447 return gtk_tree_get_row_drag_data(selection_data, tree_model, path);
41451 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
41452 // know that the model emitted the "row_deleted" signal.
41453 // <proxy>: A #GObject
41454 // <path>: The path position that was deleted
41455 static void tree_row_reference_deleted(GObject2.Object* proxy, TreePath* path) {
41456 gtk_tree_row_reference_deleted(proxy, path);
41460 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
41461 // know that the model emitted the "row_inserted" signal.
41462 // <proxy>: A #GObject
41463 // <path>: The row position that was inserted
41464 static void tree_row_reference_inserted(GObject2.Object* proxy, TreePath* path) {
41465 gtk_tree_row_reference_inserted(proxy, path);
41469 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
41470 // know that the model emitted the "rows_reordered" signal.
41471 // <proxy>: A #GObject
41472 // <path>: The parent path of the reordered signal
41473 // <iter>: The iter pointing to the parent of the reordered
41474 // <new_order>: The new order of rows
41475 static void tree_row_reference_reordered(GObject2.Object* proxy, TreePath* path, TreeIter* iter, int* new_order) {
41476 gtk_tree_row_reference_reordered(proxy, path, iter, new_order);
41480 // Sets selection data of target type %GTK_TREE_MODEL_ROW. Normally used
41481 // in a drag_data_get handler.
41482 // RETURNS: %TRUE if the #GtkSelectionData had the proper target type to allow us to set a tree row
41483 // <selection_data>: some #GtkSelectionData
41484 // <tree_model>: a #GtkTreeModel
41485 // <path>: a row in @tree_model
41486 static int tree_set_row_drag_data(SelectionData* selection_data, TreeModel* tree_model, TreePath* path) {
41487 return gtk_tree_set_row_drag_data(selection_data, tree_model, path);
41490 static int true_() {
41491 return gtk_true();
41495 // Unintrospectable function: type_class() / gtk_type_class()
41496 // Returns a pointer pointing to the class of @type or %NULL if there
41497 // was any trouble identifying @type. Initializes the class if
41498 // necessary.
41499 // RETURNS: pointer to the class.
41500 // <type>: a #GtkType.
41501 static void* type_class(Type type) {
41502 return gtk_type_class(type);
41505 // Unintrospectable function: type_enum_find_value() / gtk_type_enum_find_value()
41506 static EnumValue* type_enum_find_value(Type enum_type, char* value_name) {
41507 return gtk_type_enum_find_value(enum_type, value_name);
41510 // Unintrospectable function: type_enum_get_values() / gtk_type_enum_get_values()
41511 static EnumValue* type_enum_get_values(Type enum_type) {
41512 return gtk_type_enum_get_values(enum_type);
41515 // Unintrospectable function: type_flags_find_value() / gtk_type_flags_find_value()
41516 static FlagValue* type_flags_find_value(Type flags_type, char* value_name) {
41517 return gtk_type_flags_find_value(flags_type, value_name);
41520 // Unintrospectable function: type_flags_get_values() / gtk_type_flags_get_values()
41521 static FlagValue* type_flags_get_values(Type flags_type) {
41522 return gtk_type_flags_get_values(flags_type);
41525 static void type_init(GObject2.TypeDebugFlags debug_flags) {
41526 gtk_type_init(debug_flags);
41529 // Unintrospectable function: type_new() / gtk_type_new()
41530 static void* type_new(Type type) {
41531 return gtk_type_new(type);
41534 static Type type_unique(Type parent_type, TypeInfo* gtkinfo) {
41535 return gtk_type_unique(parent_type, gtkinfo);
41539 // --- mixin/Gtk2__MODULE.d --->
41541 void _dumpObj(T)(T o, bool deep=0) {
41542 import std.stdio;
41543 auto ts = o.tupleof;
41544 write(typeid(o), " {");
41546 static if (is(typeof(*T)==union)) {
41547 write(*o, "}\n");
41548 return;
41550 else
41551 writeln();
41553 foreach (i, t; ts) {
41554 write(" (", typeid(t), ") ", t);
41555 if (deep)
41556 static if (is(typeof(*t)))
41557 if (ts[i])
41558 write(" {", *ts[i], "}");
41559 write(i!=ts.length-1 ? "\n" : "\n}\n");
41564 // An overload of gtk.init() that works with D strings.
41565 // Unlike the original, it does not need to modify the inputs.
41566 // Returns a new string array (that can be assigned to the argv
41567 // array in the caller).
41569 string[] init(string argv[]) {
41570 int argc = argv.length;
41571 auto c_argv = argvToC(argv);
41572 init(&argc, &c_argv);
41573 return argvFromC(argc, c_argv);
41577 // <--- mixin/Gtk2__MODULE.d ---
41579 // C prototypes:
41581 extern (C) {
41582 AboutDialog* gtk_about_dialog_new();
41583 AboutDialogActivateLinkFunc gtk_about_dialog_set_email_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy);
41584 AboutDialogActivateLinkFunc gtk_about_dialog_set_url_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy);
41585 char** gtk_about_dialog_get_artists(AboutDialog* this_);
41586 char** gtk_about_dialog_get_authors(AboutDialog* this_);
41587 char* gtk_about_dialog_get_comments(AboutDialog* this_);
41588 char* gtk_about_dialog_get_copyright(AboutDialog* this_);
41589 char** gtk_about_dialog_get_documenters(AboutDialog* this_);
41590 char* gtk_about_dialog_get_license(AboutDialog* this_);
41591 GdkPixbuf2.Pixbuf* gtk_about_dialog_get_logo(AboutDialog* this_);
41592 char* gtk_about_dialog_get_logo_icon_name(AboutDialog* this_);
41593 char* gtk_about_dialog_get_name(AboutDialog* this_);
41594 char* gtk_about_dialog_get_program_name(AboutDialog* this_);
41595 char* gtk_about_dialog_get_translator_credits(AboutDialog* this_);
41596 char* gtk_about_dialog_get_version(AboutDialog* this_);
41597 char* gtk_about_dialog_get_website(AboutDialog* this_);
41598 char* gtk_about_dialog_get_website_label(AboutDialog* this_);
41599 int gtk_about_dialog_get_wrap_license(AboutDialog* this_);
41600 void gtk_about_dialog_set_artists(AboutDialog* this_, char** artists);
41601 void gtk_about_dialog_set_authors(AboutDialog* this_, char** authors);
41602 void gtk_about_dialog_set_comments(AboutDialog* this_, char* comments=null);
41603 void gtk_about_dialog_set_copyright(AboutDialog* this_, char* copyright);
41604 void gtk_about_dialog_set_documenters(AboutDialog* this_, char** documenters);
41605 void gtk_about_dialog_set_license(AboutDialog* this_, char* license=null);
41606 void gtk_about_dialog_set_logo(AboutDialog* this_, GdkPixbuf2.Pixbuf* logo=null);
41607 void gtk_about_dialog_set_logo_icon_name(AboutDialog* this_, char* icon_name=null);
41608 void gtk_about_dialog_set_name(AboutDialog* this_, char* name=null);
41609 void gtk_about_dialog_set_program_name(AboutDialog* this_, char* name);
41610 void gtk_about_dialog_set_translator_credits(AboutDialog* this_, char* translator_credits=null);
41611 void gtk_about_dialog_set_version(AboutDialog* this_, char* version_=null);
41612 void gtk_about_dialog_set_website(AboutDialog* this_, char* website=null);
41613 void gtk_about_dialog_set_website_label(AboutDialog* this_, char* website_label);
41614 void gtk_about_dialog_set_wrap_license(AboutDialog* this_, int wrap_license);
41615 AccelGroup* /*new*/ gtk_accel_group_new();
41616 AccelGroup* gtk_accel_group_from_accel_closure(GObject2.Closure* closure);
41617 int gtk_accel_group_activate(AccelGroup* this_, GLib2.Quark accel_quark, GObject2.Object* acceleratable, uint accel_key, Gdk2.ModifierType accel_mods);
41618 void gtk_accel_group_connect(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags, GObject2.Closure* closure);
41619 void gtk_accel_group_connect_by_path(AccelGroup* this_, char* accel_path, GObject2.Closure* closure);
41620 int gtk_accel_group_disconnect(AccelGroup* this_, GObject2.Closure* closure=null);
41621 int gtk_accel_group_disconnect_key(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods);
41622 AccelKey* gtk_accel_group_find(AccelGroup* this_, AccelGroupFindFunc find_func, void* data);
41623 int gtk_accel_group_get_is_locked(AccelGroup* this_);
41624 Gdk2.ModifierType gtk_accel_group_get_modifier_mask(AccelGroup* this_);
41625 void gtk_accel_group_lock(AccelGroup* this_);
41626 AccelGroupEntry* gtk_accel_group_query(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods, uint* n_entries=null);
41627 void gtk_accel_group_unlock(AccelGroup* this_);
41628 AccelLabel* gtk_accel_label_new(char* string_);
41629 Widget* gtk_accel_label_get_accel_widget(AccelLabel* this_);
41630 uint gtk_accel_label_get_accel_width(AccelLabel* this_);
41631 int gtk_accel_label_refetch(AccelLabel* this_);
41632 void gtk_accel_label_set_accel_closure(AccelLabel* this_, GObject2.Closure* accel_closure);
41633 void gtk_accel_label_set_accel_widget(AccelLabel* this_, Widget* accel_widget);
41634 void gtk_accel_map_add_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods);
41635 void gtk_accel_map_add_filter(char* filter_pattern);
41636 int gtk_accel_map_change_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int replace);
41637 void gtk_accel_map_foreach(void* data, AccelMapForeach foreach_func);
41638 void gtk_accel_map_foreach_unfiltered(void* data, AccelMapForeach foreach_func);
41639 AccelMap* gtk_accel_map_get();
41640 void gtk_accel_map_load(char* file_name);
41641 void gtk_accel_map_load_fd(int fd);
41642 void gtk_accel_map_load_scanner(GLib2.Scanner* scanner);
41643 void gtk_accel_map_lock_path(char* accel_path);
41644 int gtk_accel_map_lookup_entry(char* accel_path, AccelKey* key);
41645 void gtk_accel_map_save(char* file_name);
41646 void gtk_accel_map_save_fd(int fd);
41647 void gtk_accel_map_unlock_path(char* accel_path);
41648 void gtk_accessible_connect_widget_destroyed(Accessible* this_);
41649 Widget* gtk_accessible_get_widget(Accessible* this_);
41650 void gtk_accessible_set_widget(Accessible* this_, Widget* widget);
41651 Action* /*new*/ gtk_action_new(char* name, char* label, char* tooltip, char* stock_id);
41652 void gtk_action_activate(Action* this_);
41653 void gtk_action_block_activate(Action* this_);
41654 void gtk_action_block_activate_from(Action* this_, Widget* proxy);
41655 void gtk_action_connect_accelerator(Action* this_);
41656 void gtk_action_connect_proxy(Action* this_, Widget* proxy);
41657 Widget* gtk_action_create_icon(Action* this_, int icon_size);
41658 Widget* gtk_action_create_menu(Action* this_);
41659 Widget* gtk_action_create_menu_item(Action* this_);
41660 Widget* gtk_action_create_tool_item(Action* this_);
41661 void gtk_action_disconnect_accelerator(Action* this_);
41662 void gtk_action_disconnect_proxy(Action* this_, Widget* proxy);
41663 GObject2.Closure* gtk_action_get_accel_closure(Action* this_);
41664 char* gtk_action_get_accel_path(Action* this_);
41665 int gtk_action_get_always_show_image(Action* this_);
41666 Gio2.Icon* gtk_action_get_gicon(Action* this_);
41667 char* gtk_action_get_icon_name(Action* this_);
41668 int gtk_action_get_is_important(Action* this_);
41669 char* gtk_action_get_label(Action* this_);
41670 char* gtk_action_get_name(Action* this_);
41671 GLib2.SList* gtk_action_get_proxies(Action* this_);
41672 int gtk_action_get_sensitive(Action* this_);
41673 char* gtk_action_get_short_label(Action* this_);
41674 char* gtk_action_get_stock_id(Action* this_);
41675 char* gtk_action_get_tooltip(Action* this_);
41676 int gtk_action_get_visible(Action* this_);
41677 int gtk_action_get_visible_horizontal(Action* this_);
41678 int gtk_action_get_visible_vertical(Action* this_);
41679 int gtk_action_is_sensitive(Action* this_);
41680 int gtk_action_is_visible(Action* this_);
41681 void gtk_action_set_accel_group(Action* this_, AccelGroup* accel_group=null);
41682 void gtk_action_set_accel_path(Action* this_, char* accel_path);
41683 void gtk_action_set_always_show_image(Action* this_, int always_show);
41684 void gtk_action_set_gicon(Action* this_, Gio2.Icon* icon);
41685 void gtk_action_set_icon_name(Action* this_, char* icon_name);
41686 void gtk_action_set_is_important(Action* this_, int is_important);
41687 void gtk_action_set_label(Action* this_, char* label);
41688 void gtk_action_set_sensitive(Action* this_, int sensitive);
41689 void gtk_action_set_short_label(Action* this_, char* short_label);
41690 void gtk_action_set_stock_id(Action* this_, char* stock_id);
41691 void gtk_action_set_tooltip(Action* this_, char* tooltip);
41692 void gtk_action_set_visible(Action* this_, int visible);
41693 void gtk_action_set_visible_horizontal(Action* this_, int visible_horizontal);
41694 void gtk_action_set_visible_vertical(Action* this_, int visible_vertical);
41695 void gtk_action_unblock_activate(Action* this_);
41696 void gtk_action_unblock_activate_from(Action* this_, Widget* proxy);
41697 ActionGroup* /*new*/ gtk_action_group_new(char* name);
41698 void gtk_action_group_add_action(ActionGroup* this_, Action* action);
41699 void gtk_action_group_add_action_with_accel(ActionGroup* this_, Action* action, char* accelerator=null);
41700 void gtk_action_group_add_actions(ActionGroup* this_, ActionEntry* entries, uint n_entries, void* user_data);
41701 void gtk_action_group_add_actions_full(ActionGroup* this_, ActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy);
41702 void gtk_action_group_add_radio_actions(ActionGroup* this_, RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data);
41703 void gtk_action_group_add_radio_actions_full(ActionGroup* this_, RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data, GLib2.DestroyNotify destroy);
41704 void gtk_action_group_add_toggle_actions(ActionGroup* this_, ToggleActionEntry* entries, uint n_entries, void* user_data);
41705 void gtk_action_group_add_toggle_actions_full(ActionGroup* this_, ToggleActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy);
41706 Action* gtk_action_group_get_action(ActionGroup* this_, char* action_name);
41707 char* gtk_action_group_get_name(ActionGroup* this_);
41708 int gtk_action_group_get_sensitive(ActionGroup* this_);
41709 int gtk_action_group_get_visible(ActionGroup* this_);
41710 GLib2.List* /*new container*/ gtk_action_group_list_actions(ActionGroup* this_);
41711 void gtk_action_group_remove_action(ActionGroup* this_, Action* action);
41712 void gtk_action_group_set_sensitive(ActionGroup* this_, int sensitive);
41713 void gtk_action_group_set_translate_func(ActionGroup* this_, TranslateFunc func, void* data, GLib2.DestroyNotify notify);
41714 void gtk_action_group_set_translation_domain(ActionGroup* this_, char* domain);
41715 void gtk_action_group_set_visible(ActionGroup* this_, int visible);
41716 char* gtk_action_group_translate_string(ActionGroup* this_, char* string_);
41717 void gtk_activatable_do_set_related_action(Activatable* this_, Action* action);
41718 Action* gtk_activatable_get_related_action(Activatable* this_);
41719 int gtk_activatable_get_use_action_appearance(Activatable* this_);
41720 void gtk_activatable_set_related_action(Activatable* this_, Action* action);
41721 void gtk_activatable_set_use_action_appearance(Activatable* this_, int use_appearance);
41722 void gtk_activatable_sync_action_properties(Activatable* this_, Action* action=null);
41723 Adjustment* gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size);
41724 void gtk_adjustment_changed(Adjustment* this_);
41725 void gtk_adjustment_clamp_page(Adjustment* this_, double lower, double upper);
41726 void gtk_adjustment_configure(Adjustment* this_, double value, double lower, double upper, double step_increment, double page_increment, double page_size);
41727 double gtk_adjustment_get_lower(Adjustment* this_);
41728 double gtk_adjustment_get_page_increment(Adjustment* this_);
41729 double gtk_adjustment_get_page_size(Adjustment* this_);
41730 double gtk_adjustment_get_step_increment(Adjustment* this_);
41731 double gtk_adjustment_get_upper(Adjustment* this_);
41732 double gtk_adjustment_get_value(Adjustment* this_);
41733 void gtk_adjustment_set_lower(Adjustment* this_, double lower);
41734 void gtk_adjustment_set_page_increment(Adjustment* this_, double page_increment);
41735 void gtk_adjustment_set_page_size(Adjustment* this_, double page_size);
41736 void gtk_adjustment_set_step_increment(Adjustment* this_, double step_increment);
41737 void gtk_adjustment_set_upper(Adjustment* this_, double upper);
41738 void gtk_adjustment_set_value(Adjustment* this_, double value);
41739 void gtk_adjustment_value_changed(Adjustment* this_);
41740 Alignment* gtk_alignment_new(float xalign, float yalign, float xscale, float yscale);
41741 void gtk_alignment_get_padding(Alignment* this_, /*out*/ uint* padding_top=null, /*out*/ uint* padding_bottom=null, /*out*/ uint* padding_left=null, /*out*/ uint* padding_right=null);
41742 void gtk_alignment_set(Alignment* this_, float xalign, float yalign, float xscale, float yscale);
41743 void gtk_alignment_set_padding(Alignment* this_, uint padding_top, uint padding_bottom, uint padding_left, uint padding_right);
41744 Arrow* gtk_arrow_new(ArrowType arrow_type, ShadowType shadow_type);
41745 void gtk_arrow_set(Arrow* this_, ArrowType arrow_type, ShadowType shadow_type);
41746 AspectFrame* gtk_aspect_frame_new(char* label, float xalign, float yalign, float ratio, int obey_child);
41747 void gtk_aspect_frame_set(AspectFrame* this_, float xalign, float yalign, float ratio, int obey_child);
41748 Assistant* gtk_assistant_new();
41749 void gtk_assistant_add_action_widget(Assistant* this_, Widget* child);
41750 int gtk_assistant_append_page(Assistant* this_, Widget* page);
41751 void gtk_assistant_commit(Assistant* this_);
41752 int gtk_assistant_get_current_page(Assistant* this_);
41753 int gtk_assistant_get_n_pages(Assistant* this_);
41754 Widget* gtk_assistant_get_nth_page(Assistant* this_, int page_num);
41755 int gtk_assistant_get_page_complete(Assistant* this_, Widget* page);
41756 GdkPixbuf2.Pixbuf* gtk_assistant_get_page_header_image(Assistant* this_, Widget* page);
41757 GdkPixbuf2.Pixbuf* gtk_assistant_get_page_side_image(Assistant* this_, Widget* page);
41758 char* gtk_assistant_get_page_title(Assistant* this_, Widget* page);
41759 AssistantPageType gtk_assistant_get_page_type(Assistant* this_, Widget* page);
41760 int gtk_assistant_insert_page(Assistant* this_, Widget* page, int position);
41761 int gtk_assistant_prepend_page(Assistant* this_, Widget* page);
41762 void gtk_assistant_remove_action_widget(Assistant* this_, Widget* child);
41763 void gtk_assistant_set_current_page(Assistant* this_, int page_num);
41764 void gtk_assistant_set_forward_page_func(Assistant* this_, AssistantPageFunc page_func, void* data, GLib2.DestroyNotify destroy);
41765 void gtk_assistant_set_page_complete(Assistant* this_, Widget* page, int complete);
41766 void gtk_assistant_set_page_header_image(Assistant* this_, Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null);
41767 void gtk_assistant_set_page_side_image(Assistant* this_, Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null);
41768 void gtk_assistant_set_page_title(Assistant* this_, Widget* page, char* title);
41769 void gtk_assistant_set_page_type(Assistant* this_, Widget* page, AssistantPageType type);
41770 void gtk_assistant_update_buttons_state(Assistant* this_);
41771 Widget* gtk_bin_get_child(Bin* this_);
41772 int gtk_binding_set_activate(BindingSet* this_, uint keyval, Gdk2.ModifierType modifiers, Object* object);
41773 void gtk_binding_set_add_path(BindingSet* this_, PathType path_type, char* path_pattern, PathPriorityType priority);
41774 Border* /*new*/ gtk_border_new();
41775 Border* /*new*/ gtk_border_copy(Border* this_);
41776 void gtk_border_free(Border* this_);
41777 int gtk_box_get_homogeneous(Box* this_);
41778 int gtk_box_get_spacing(Box* this_);
41779 void gtk_box_pack_end(Box* this_, Widget* child, int expand, int fill, uint padding);
41780 void gtk_box_pack_end_defaults(Box* this_, Widget* widget);
41781 void gtk_box_pack_start(Box* this_, Widget* child, int expand, int fill, uint padding);
41782 void gtk_box_pack_start_defaults(Box* this_, Widget* widget);
41783 void gtk_box_query_child_packing(Box* this_, Widget* child, int* expand, int* fill, uint* padding, PackType* pack_type);
41784 void gtk_box_reorder_child(Box* this_, Widget* child, int position);
41785 void gtk_box_set_child_packing(Box* this_, Widget* child, int expand, int fill, uint padding, PackType pack_type);
41786 void gtk_box_set_homogeneous(Box* this_, int homogeneous);
41787 void gtk_box_set_spacing(Box* this_, int spacing);
41788 void gtk_buildable_add_child(Buildable* this_, Builder* builder, GObject2.Object* child, char* type=null);
41789 GObject2.Object* /*new*/ gtk_buildable_construct_child(Buildable* this_, Builder* builder, char* name);
41790 void gtk_buildable_custom_finished(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, void* data);
41791 void gtk_buildable_custom_tag_end(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, void* data);
41792 int gtk_buildable_custom_tag_start(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data);
41793 GObject2.Object* gtk_buildable_get_internal_child(Buildable* this_, Builder* builder, char* childname);
41794 char* gtk_buildable_get_name(Buildable* this_);
41795 void gtk_buildable_parser_finished(Buildable* this_, Builder* builder);
41796 void gtk_buildable_set_buildable_property(Buildable* this_, Builder* builder, char* name, GObject2.Value* value);
41797 void gtk_buildable_set_name(Buildable* this_, char* name);
41798 Builder* /*new*/ gtk_builder_new();
41799 uint gtk_builder_add_from_file(Builder* this_, char* filename, GLib2.Error** error);
41800 uint gtk_builder_add_from_string(Builder* this_, char* buffer, size_t length, GLib2.Error** error);
41801 uint gtk_builder_add_objects_from_file(Builder* this_, char* filename, char** object_ids, GLib2.Error** error);
41802 uint gtk_builder_add_objects_from_string(Builder* this_, char* buffer, size_t length, char** object_ids, GLib2.Error** error);
41803 void gtk_builder_connect_signals(Builder* this_, void* user_data);
41804 void gtk_builder_connect_signals_full(Builder* this_, BuilderConnectFunc func, void* user_data);
41805 GObject2.Object* gtk_builder_get_object(Builder* this_, char* name);
41806 GLib2.SList* /*new container*/ gtk_builder_get_objects(Builder* this_);
41807 char* gtk_builder_get_translation_domain(Builder* this_);
41808 Type gtk_builder_get_type_from_name(Builder* this_, char* type_name);
41809 void gtk_builder_set_translation_domain(Builder* this_, char* domain=null);
41810 int gtk_builder_value_from_string(Builder* this_, GObject2.ParamSpec* pspec, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error);
41811 int gtk_builder_value_from_string_type(Builder* this_, Type type, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error);
41812 Button* gtk_button_new();
41813 Button* gtk_button_new_from_stock(char* stock_id);
41814 Button* gtk_button_new_with_label(char* label);
41815 Button* gtk_button_new_with_mnemonic(char* label);
41816 void gtk_button_clicked(Button* this_);
41817 void gtk_button_enter(Button* this_);
41818 void gtk_button_get_alignment(Button* this_, /*out*/ float* xalign, /*out*/ float* yalign);
41819 Gdk2.Window* gtk_button_get_event_window(Button* this_);
41820 int gtk_button_get_focus_on_click(Button* this_);
41821 Widget* gtk_button_get_image(Button* this_);
41822 PositionType gtk_button_get_image_position(Button* this_);
41823 char* gtk_button_get_label(Button* this_);
41824 ReliefStyle gtk_button_get_relief(Button* this_);
41825 int gtk_button_get_use_stock(Button* this_);
41826 int gtk_button_get_use_underline(Button* this_);
41827 void gtk_button_leave(Button* this_);
41828 void gtk_button_pressed(Button* this_);
41829 void gtk_button_released(Button* this_);
41830 void gtk_button_set_alignment(Button* this_, float xalign, float yalign);
41831 void gtk_button_set_focus_on_click(Button* this_, int focus_on_click);
41832 void gtk_button_set_image(Button* this_, Widget* image);
41833 void gtk_button_set_image_position(Button* this_, PositionType position);
41834 void gtk_button_set_label(Button* this_, char* label);
41835 void gtk_button_set_relief(Button* this_, ReliefStyle newstyle);
41836 void gtk_button_set_use_stock(Button* this_, int use_stock);
41837 void gtk_button_set_use_underline(Button* this_, int use_underline);
41838 void gtk_button_box_get_child_ipadding(ButtonBox* this_, int* ipad_x, int* ipad_y);
41839 int gtk_button_box_get_child_secondary(ButtonBox* this_, Widget* child);
41840 void gtk_button_box_get_child_size(ButtonBox* this_, int* min_width, int* min_height);
41841 ButtonBoxStyle gtk_button_box_get_layout(ButtonBox* this_);
41842 void gtk_button_box_set_child_ipadding(ButtonBox* this_, int ipad_x, int ipad_y);
41843 void gtk_button_box_set_child_secondary(ButtonBox* this_, Widget* child, int is_secondary);
41844 void gtk_button_box_set_child_size(ButtonBox* this_, int min_width, int min_height);
41845 void gtk_button_box_set_layout(ButtonBox* this_, ButtonBoxStyle layout_style);
41846 CList* gtk_clist_new(int columns);
41847 CList* gtk_clist_new_with_titles(int columns, char* titles);
41848 int gtk_clist_append(CList* this_, char* text);
41849 void gtk_clist_clear(CList* this_);
41850 void gtk_clist_column_title_active(CList* this_, int column);
41851 void gtk_clist_column_title_passive(CList* this_, int column);
41852 void gtk_clist_column_titles_active(CList* this_);
41853 void gtk_clist_column_titles_hide(CList* this_);
41854 void gtk_clist_column_titles_passive(CList* this_);
41855 void gtk_clist_column_titles_show(CList* this_);
41856 int gtk_clist_columns_autosize(CList* this_);
41857 int gtk_clist_find_row_from_data(CList* this_, void* data);
41858 void gtk_clist_freeze(CList* this_);
41859 Style* gtk_clist_get_cell_style(CList* this_, int row, int column);
41860 CellType gtk_clist_get_cell_type(CList* this_, int row, int column);
41861 char* /*new*/ gtk_clist_get_column_title(CList* this_, int column);
41862 Widget* gtk_clist_get_column_widget(CList* this_, int column);
41863 Adjustment* gtk_clist_get_hadjustment(CList* this_);
41864 int gtk_clist_get_pixmap(CList* this_, int row, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
41865 int gtk_clist_get_pixtext(CList* this_, int row, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
41866 void* gtk_clist_get_row_data(CList* this_, int row);
41867 Style* gtk_clist_get_row_style(CList* this_, int row);
41868 int gtk_clist_get_selectable(CList* this_, int row);
41869 int gtk_clist_get_selection_info(CList* this_, int x, int y, int* row, int* column);
41870 int gtk_clist_get_text(CList* this_, int row, int column, char** text);
41871 Adjustment* gtk_clist_get_vadjustment(CList* this_);
41872 int gtk_clist_insert(CList* this_, int row, char* text);
41873 void gtk_clist_moveto(CList* this_, int row, int column, float row_align, float col_align);
41874 int gtk_clist_optimal_column_width(CList* this_, int column);
41875 int gtk_clist_prepend(CList* this_, char* text);
41876 void gtk_clist_remove(CList* this_, int row);
41877 Visibility gtk_clist_row_is_visible(CList* this_, int row);
41878 void gtk_clist_row_move(CList* this_, int source_row, int dest_row);
41879 void gtk_clist_select_all(CList* this_);
41880 void gtk_clist_select_row(CList* this_, int row, int column);
41881 void gtk_clist_set_auto_sort(CList* this_, int auto_sort);
41882 void gtk_clist_set_background(CList* this_, int row, Gdk2.Color* color);
41883 void gtk_clist_set_button_actions(CList* this_, uint button, ubyte button_actions);
41884 void gtk_clist_set_cell_style(CList* this_, int row, int column, Style* style);
41885 void gtk_clist_set_column_auto_resize(CList* this_, int column, int auto_resize);
41886 void gtk_clist_set_column_justification(CList* this_, int column, Justification justification);
41887 void gtk_clist_set_column_max_width(CList* this_, int column, int max_width);
41888 void gtk_clist_set_column_min_width(CList* this_, int column, int min_width);
41889 void gtk_clist_set_column_resizeable(CList* this_, int column, int resizeable);
41890 void gtk_clist_set_column_title(CList* this_, int column, char* title);
41891 void gtk_clist_set_column_visibility(CList* this_, int column, int visible);
41892 void gtk_clist_set_column_widget(CList* this_, int column, Widget* widget);
41893 void gtk_clist_set_column_width(CList* this_, int column, int width);
41894 void gtk_clist_set_compare_func(CList* this_, CListCompareFunc cmp_func);
41895 void gtk_clist_set_foreground(CList* this_, int row, Gdk2.Color* color);
41896 void gtk_clist_set_hadjustment(CList* this_, Adjustment* adjustment);
41897 void gtk_clist_set_pixmap(CList* this_, int row, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
41898 void gtk_clist_set_pixtext(CList* this_, int row, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask);
41899 void gtk_clist_set_reorderable(CList* this_, int reorderable);
41900 void gtk_clist_set_row_data(CList* this_, int row, void* data);
41901 void gtk_clist_set_row_data_full(CList* this_, int row, void* data, GLib2.DestroyNotify destroy);
41902 void gtk_clist_set_row_height(CList* this_, uint height);
41903 void gtk_clist_set_row_style(CList* this_, int row, Style* style);
41904 void gtk_clist_set_selectable(CList* this_, int row, int selectable);
41905 void gtk_clist_set_selection_mode(CList* this_, SelectionMode mode);
41906 void gtk_clist_set_shadow_type(CList* this_, ShadowType type);
41907 void gtk_clist_set_shift(CList* this_, int row, int column, int vertical, int horizontal);
41908 void gtk_clist_set_sort_column(CList* this_, int column);
41909 void gtk_clist_set_sort_type(CList* this_, SortType sort_type);
41910 void gtk_clist_set_text(CList* this_, int row, int column, char* text);
41911 void gtk_clist_set_use_drag_icons(CList* this_, int use_icons);
41912 void gtk_clist_set_vadjustment(CList* this_, Adjustment* adjustment);
41913 void gtk_clist_sort(CList* this_);
41914 void gtk_clist_swap_rows(CList* this_, int row1, int row2);
41915 void gtk_clist_thaw(CList* this_);
41916 void gtk_clist_undo_selection(CList* this_);
41917 void gtk_clist_unselect_all(CList* this_);
41918 void gtk_clist_unselect_row(CList* this_, int row, int column);
41919 CTree* gtk_ctree_new(int columns, int tree_column);
41920 CTree* gtk_ctree_new_with_titles(int columns, int tree_column, char* titles);
41921 void gtk_ctree_collapse(CTree* this_, CTreeNode* node);
41922 void gtk_ctree_collapse_recursive(CTree* this_, CTreeNode* node);
41923 void gtk_ctree_collapse_to_depth(CTree* this_, CTreeNode* node, int depth);
41924 void gtk_ctree_expand(CTree* this_, CTreeNode* node);
41925 void gtk_ctree_expand_recursive(CTree* this_, CTreeNode* node);
41926 void gtk_ctree_expand_to_depth(CTree* this_, CTreeNode* node, int depth);
41927 GLib2.Node* gtk_ctree_export_to_gnode(CTree* this_, GLib2.Node* parent, GLib2.Node* sibling, CTreeNode* node, CTreeGNodeFunc func, void* data);
41928 int gtk_ctree_find(CTree* this_, CTreeNode* node, CTreeNode* child);
41929 GLib2.List* gtk_ctree_find_all_by_row_data(CTree* this_, CTreeNode* node, void* data);
41930 GLib2.List* gtk_ctree_find_all_by_row_data_custom(CTree* this_, CTreeNode* node, void* data, GLib2.CompareFunc func);
41931 CTreeNode* gtk_ctree_find_by_row_data(CTree* this_, CTreeNode* node, void* data);
41932 CTreeNode* gtk_ctree_find_by_row_data_custom(CTree* this_, CTreeNode* node, void* data, GLib2.CompareFunc func);
41933 CTreeNode* gtk_ctree_find_node_ptr(CTree* this_, CTreeRow* ctree_row);
41934 int gtk_ctree_get_node_info(CTree* this_, CTreeNode* node, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap_closed, Gdk2.Bitmap** mask_closed, Gdk2.Pixmap** pixmap_opened, Gdk2.Bitmap** mask_opened, int* is_leaf, int* expanded);
41935 CTreeNode* gtk_ctree_insert_gnode(CTree* this_, CTreeNode* parent, CTreeNode* sibling, GLib2.Node* gnode, CTreeGNodeFunc func, void* data);
41936 CTreeNode* gtk_ctree_insert_node(CTree* this_, CTreeNode* parent, CTreeNode* sibling, char* text, ubyte spacing, Gdk2.Pixmap* pixmap_closed, Gdk2.Bitmap* mask_closed, Gdk2.Pixmap* pixmap_opened, Gdk2.Bitmap* mask_opened, int is_leaf, int expanded);
41937 int gtk_ctree_is_ancestor(CTree* this_, CTreeNode* node, CTreeNode* child);
41938 int gtk_ctree_is_hot_spot(CTree* this_, int x, int y);
41939 int gtk_ctree_is_viewable(CTree* this_, CTreeNode* node);
41940 CTreeNode* gtk_ctree_last(CTree* this_, CTreeNode* node);
41941 void gtk_ctree_move(CTree* this_, CTreeNode* node, CTreeNode* new_parent=null, CTreeNode* new_sibling=null);
41942 Style* gtk_ctree_node_get_cell_style(CTree* this_, CTreeNode* node, int column);
41943 CellType gtk_ctree_node_get_cell_type(CTree* this_, CTreeNode* node, int column);
41944 int gtk_ctree_node_get_pixmap(CTree* this_, CTreeNode* node, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
41945 int gtk_ctree_node_get_pixtext(CTree* this_, CTreeNode* node, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
41946 void* gtk_ctree_node_get_row_data(CTree* this_, CTreeNode* node);
41947 Style* gtk_ctree_node_get_row_style(CTree* this_, CTreeNode* node);
41948 int gtk_ctree_node_get_selectable(CTree* this_, CTreeNode* node);
41949 int gtk_ctree_node_get_text(CTree* this_, CTreeNode* node, int column, char** text);
41950 Visibility gtk_ctree_node_is_visible(CTree* this_, CTreeNode* node);
41951 void gtk_ctree_node_moveto(CTree* this_, CTreeNode* node, int column, float row_align, float col_align);
41952 CTreeNode* gtk_ctree_node_nth(CTree* this_, uint row);
41953 void gtk_ctree_node_set_background(CTree* this_, CTreeNode* node, Gdk2.Color* color);
41954 void gtk_ctree_node_set_cell_style(CTree* this_, CTreeNode* node, int column, Style* style);
41955 void gtk_ctree_node_set_foreground(CTree* this_, CTreeNode* node, Gdk2.Color* color);
41956 void gtk_ctree_node_set_pixmap(CTree* this_, CTreeNode* node, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
41957 void gtk_ctree_node_set_pixtext(CTree* this_, CTreeNode* node, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
41958 void gtk_ctree_node_set_row_data(CTree* this_, CTreeNode* node, void* data);
41959 void gtk_ctree_node_set_row_data_full(CTree* this_, CTreeNode* node, void* data, GLib2.DestroyNotify destroy);
41960 void gtk_ctree_node_set_row_style(CTree* this_, CTreeNode* node, Style* style);
41961 void gtk_ctree_node_set_selectable(CTree* this_, CTreeNode* node, int selectable);
41962 void gtk_ctree_node_set_shift(CTree* this_, CTreeNode* node, int column, int vertical, int horizontal);
41963 void gtk_ctree_node_set_text(CTree* this_, CTreeNode* node, int column, char* text);
41964 void gtk_ctree_post_recursive(CTree* this_, CTreeNode* node, CTreeFunc func, void* data);
41965 void gtk_ctree_post_recursive_to_depth(CTree* this_, CTreeNode* node, int depth, CTreeFunc func, void* data);
41966 void gtk_ctree_pre_recursive(CTree* this_, CTreeNode* node, CTreeFunc func, void* data);
41967 void gtk_ctree_pre_recursive_to_depth(CTree* this_, CTreeNode* node, int depth, CTreeFunc func, void* data);
41968 void gtk_ctree_real_select_recursive(CTree* this_, CTreeNode* node, int state);
41969 void gtk_ctree_remove_node(CTree* this_, CTreeNode* node);
41970 void gtk_ctree_select(CTree* this_, CTreeNode* node);
41971 void gtk_ctree_select_recursive(CTree* this_, CTreeNode* node);
41972 void gtk_ctree_set_drag_compare_func(CTree* this_, CTreeCompareDragFunc cmp_func);
41973 void gtk_ctree_set_expander_style(CTree* this_, CTreeExpanderStyle expander_style);
41974 void gtk_ctree_set_indent(CTree* this_, int indent);
41975 void gtk_ctree_set_line_style(CTree* this_, CTreeLineStyle line_style);
41976 void gtk_ctree_set_node_info(CTree* this_, CTreeNode* node, char* text, ubyte spacing, Gdk2.Pixmap* pixmap_closed, Gdk2.Bitmap* mask_closed, Gdk2.Pixmap* pixmap_opened, Gdk2.Bitmap* mask_opened, int is_leaf, int expanded);
41977 void gtk_ctree_set_show_stub(CTree* this_, int show_stub);
41978 void gtk_ctree_set_spacing(CTree* this_, int spacing);
41979 void gtk_ctree_sort_node(CTree* this_, CTreeNode* node);
41980 void gtk_ctree_sort_recursive(CTree* this_, CTreeNode* node);
41981 void gtk_ctree_toggle_expansion(CTree* this_, CTreeNode* node);
41982 void gtk_ctree_toggle_expansion_recursive(CTree* this_, CTreeNode* node);
41983 void gtk_ctree_unselect(CTree* this_, CTreeNode* node);
41984 void gtk_ctree_unselect_recursive(CTree* this_, CTreeNode* node);
41985 Calendar* gtk_calendar_new();
41986 void gtk_calendar_clear_marks(Calendar* this_);
41987 void gtk_calendar_display_options(Calendar* this_, CalendarDisplayOptions flags);
41988 void gtk_calendar_freeze(Calendar* this_);
41989 void gtk_calendar_get_date(Calendar* this_, /*out*/ uint* year=null, /*out*/ uint* month=null, /*out*/ uint* day=null);
41990 int gtk_calendar_get_detail_height_rows(Calendar* this_);
41991 int gtk_calendar_get_detail_width_chars(Calendar* this_);
41992 CalendarDisplayOptions gtk_calendar_get_display_options(Calendar* this_);
41993 int gtk_calendar_mark_day(Calendar* this_, uint day);
41994 void gtk_calendar_select_day(Calendar* this_, uint day);
41995 int gtk_calendar_select_month(Calendar* this_, uint month, uint year);
41996 void gtk_calendar_set_detail_func(Calendar* this_, CalendarDetailFunc func, void* data, GLib2.DestroyNotify destroy);
41997 void gtk_calendar_set_detail_height_rows(Calendar* this_, int rows);
41998 void gtk_calendar_set_detail_width_chars(Calendar* this_, int chars);
41999 void gtk_calendar_set_display_options(Calendar* this_, CalendarDisplayOptions flags);
42000 void gtk_calendar_thaw(Calendar* this_);
42001 int gtk_calendar_unmark_day(Calendar* this_, uint day);
42002 void gtk_cell_editable_editing_done(CellEditable* this_);
42003 void gtk_cell_editable_remove_widget(CellEditable* this_);
42004 void gtk_cell_editable_start_editing(CellEditable* this_, Gdk2.Event* event=null);
42005 void gtk_cell_layout_add_attribute(CellLayout* this_, CellRenderer* cell, char* attribute, int column);
42006 void gtk_cell_layout_clear(CellLayout* this_);
42007 void gtk_cell_layout_clear_attributes(CellLayout* this_, CellRenderer* cell);
42008 GLib2.List* /*new container*/ gtk_cell_layout_get_cells(CellLayout* this_);
42009 void gtk_cell_layout_pack_end(CellLayout* this_, CellRenderer* cell, int expand);
42010 void gtk_cell_layout_pack_start(CellLayout* this_, CellRenderer* cell, int expand);
42011 void gtk_cell_layout_reorder(CellLayout* this_, CellRenderer* cell, int position);
42012 void gtk_cell_layout_set_attributes(CellLayout* this_, CellRenderer* cell, ...);
42013 void gtk_cell_layout_set_cell_data_func(CellLayout* this_, CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy);
42014 int gtk_cell_renderer_activate(CellRenderer* this_, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags);
42015 void gtk_cell_renderer_editing_canceled(CellRenderer* this_);
42016 void gtk_cell_renderer_get_alignment(CellRenderer* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null);
42017 void gtk_cell_renderer_get_fixed_size(CellRenderer* this_, /*out*/ int* width=null, /*out*/ int* height=null);
42018 void gtk_cell_renderer_get_padding(CellRenderer* this_, /*out*/ int* xpad=null, /*out*/ int* ypad=null);
42019 int gtk_cell_renderer_get_sensitive(CellRenderer* this_);
42020 void gtk_cell_renderer_get_size(CellRenderer* this_, Widget* widget, Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null);
42021 int gtk_cell_renderer_get_visible(CellRenderer* this_);
42022 void gtk_cell_renderer_render(CellRenderer* this_, Gdk2.Window* window, Widget* widget, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, Gdk2.Rectangle* expose_area, CellRendererState flags);
42023 void gtk_cell_renderer_set_alignment(CellRenderer* this_, float xalign, float yalign);
42024 void gtk_cell_renderer_set_fixed_size(CellRenderer* this_, int width, int height);
42025 void gtk_cell_renderer_set_padding(CellRenderer* this_, int xpad, int ypad);
42026 void gtk_cell_renderer_set_sensitive(CellRenderer* this_, int sensitive);
42027 void gtk_cell_renderer_set_visible(CellRenderer* this_, int visible);
42028 CellEditable* gtk_cell_renderer_start_editing(CellRenderer* this_, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags);
42029 void gtk_cell_renderer_stop_editing(CellRenderer* this_, int canceled);
42030 CellRendererAccel* gtk_cell_renderer_accel_new();
42031 CellRendererCombo* gtk_cell_renderer_combo_new();
42032 CellRendererPixbuf* gtk_cell_renderer_pixbuf_new();
42033 CellRendererProgress* gtk_cell_renderer_progress_new();
42034 CellRendererSpin* gtk_cell_renderer_spin_new();
42035 CellRendererSpinner* gtk_cell_renderer_spinner_new();
42036 CellRendererText* gtk_cell_renderer_text_new();
42037 void gtk_cell_renderer_text_set_fixed_height_from_font(CellRendererText* this_, int number_of_rows);
42038 CellRendererToggle* gtk_cell_renderer_toggle_new();
42039 int gtk_cell_renderer_toggle_get_activatable(CellRendererToggle* this_);
42040 int gtk_cell_renderer_toggle_get_active(CellRendererToggle* this_);
42041 int gtk_cell_renderer_toggle_get_radio(CellRendererToggle* this_);
42042 void gtk_cell_renderer_toggle_set_activatable(CellRendererToggle* this_, int setting);
42043 void gtk_cell_renderer_toggle_set_active(CellRendererToggle* this_, int setting);
42044 void gtk_cell_renderer_toggle_set_radio(CellRendererToggle* this_, int radio);
42045 CellView* gtk_cell_view_new();
42046 CellView* gtk_cell_view_new_with_markup(char* markup);
42047 CellView* gtk_cell_view_new_with_pixbuf(GdkPixbuf2.Pixbuf* pixbuf);
42048 CellView* gtk_cell_view_new_with_text(char* text);
42049 GLib2.List* gtk_cell_view_get_cell_renderers(CellView* this_);
42050 TreePath* /*new*/ gtk_cell_view_get_displayed_row(CellView* this_);
42051 TreeModel* gtk_cell_view_get_model(CellView* this_);
42052 int gtk_cell_view_get_size_of_row(CellView* this_, TreePath* path, /*out*/ Requisition* requisition);
42053 void gtk_cell_view_set_background_color(CellView* this_, Gdk2.Color* color);
42054 void gtk_cell_view_set_displayed_row(CellView* this_, TreePath* path=null);
42055 void gtk_cell_view_set_model(CellView* this_, TreeModel* model=null);
42056 CheckButton* gtk_check_button_new();
42057 CheckButton* gtk_check_button_new_with_label(char* label);
42058 CheckButton* gtk_check_button_new_with_mnemonic(char* label);
42059 CheckMenuItem* gtk_check_menu_item_new();
42060 CheckMenuItem* gtk_check_menu_item_new_with_label(char* label);
42061 CheckMenuItem* gtk_check_menu_item_new_with_mnemonic(char* label);
42062 int gtk_check_menu_item_get_active(CheckMenuItem* this_);
42063 int gtk_check_menu_item_get_draw_as_radio(CheckMenuItem* this_);
42064 int gtk_check_menu_item_get_inconsistent(CheckMenuItem* this_);
42065 void gtk_check_menu_item_set_active(CheckMenuItem* this_, int is_active);
42066 void gtk_check_menu_item_set_draw_as_radio(CheckMenuItem* this_, int draw_as_radio);
42067 void gtk_check_menu_item_set_inconsistent(CheckMenuItem* this_, int setting);
42068 void gtk_check_menu_item_set_show_toggle(CheckMenuItem* this_, int always);
42069 void gtk_check_menu_item_toggled(CheckMenuItem* this_);
42070 Clipboard* gtk_clipboard_get(Gdk2.Atom selection);
42071 Clipboard* gtk_clipboard_get_for_display(Gdk2.Display* display, Gdk2.Atom selection);
42072 void gtk_clipboard_clear(Clipboard* this_);
42073 Gdk2.Display* gtk_clipboard_get_display(Clipboard* this_);
42074 GObject2.Object* gtk_clipboard_get_owner(Clipboard* this_);
42075 void gtk_clipboard_request_contents(Clipboard* this_, Gdk2.Atom target, ClipboardReceivedFunc callback, void* user_data);
42076 void gtk_clipboard_request_image(Clipboard* this_, ClipboardImageReceivedFunc callback, void* user_data);
42077 void gtk_clipboard_request_rich_text(Clipboard* this_, TextBuffer* buffer, ClipboardRichTextReceivedFunc callback, void* user_data);
42078 void gtk_clipboard_request_targets(Clipboard* this_, ClipboardTargetsReceivedFunc callback, void* user_data);
42079 void gtk_clipboard_request_text(Clipboard* this_, ClipboardTextReceivedFunc callback, void* user_data);
42080 void gtk_clipboard_request_uris(Clipboard* this_, ClipboardURIReceivedFunc callback, void* user_data);
42081 void gtk_clipboard_set_can_store(Clipboard* this_, TargetEntry* targets, int n_targets);
42082 void gtk_clipboard_set_image(Clipboard* this_, GdkPixbuf2.Pixbuf* pixbuf);
42083 void gtk_clipboard_set_text(Clipboard* this_, char* text, int len);
42084 int gtk_clipboard_set_with_data(Clipboard* this_, TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, void* user_data);
42085 int gtk_clipboard_set_with_owner(Clipboard* this_, TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, GObject2.Object* owner);
42086 void gtk_clipboard_store(Clipboard* this_);
42087 SelectionData* /*new*/ gtk_clipboard_wait_for_contents(Clipboard* this_, Gdk2.Atom target);
42088 GdkPixbuf2.Pixbuf* /*new*/ gtk_clipboard_wait_for_image(Clipboard* this_);
42089 ubyte* /*new*/ gtk_clipboard_wait_for_rich_text(Clipboard* this_, TextBuffer* buffer, Gdk2.Atom* format, /*out*/ size_t* length);
42090 int gtk_clipboard_wait_for_targets(Clipboard* this_, /*out*/ Gdk2.Atom** targets, /*out*/ int* n_targets);
42091 char* /*new*/ gtk_clipboard_wait_for_text(Clipboard* this_);
42092 char** /*new*/ gtk_clipboard_wait_for_uris(Clipboard* this_);
42093 int gtk_clipboard_wait_is_image_available(Clipboard* this_);
42094 int gtk_clipboard_wait_is_rich_text_available(Clipboard* this_, TextBuffer* buffer);
42095 int gtk_clipboard_wait_is_target_available(Clipboard* this_, Gdk2.Atom target);
42096 int gtk_clipboard_wait_is_text_available(Clipboard* this_);
42097 int gtk_clipboard_wait_is_uris_available(Clipboard* this_);
42098 ColorButton* gtk_color_button_new();
42099 ColorButton* gtk_color_button_new_with_color(Gdk2.Color* color);
42100 ushort gtk_color_button_get_alpha(ColorButton* this_);
42101 void gtk_color_button_get_color(ColorButton* this_, Gdk2.Color* color);
42102 char* gtk_color_button_get_title(ColorButton* this_);
42103 int gtk_color_button_get_use_alpha(ColorButton* this_);
42104 void gtk_color_button_set_alpha(ColorButton* this_, ushort alpha);
42105 void gtk_color_button_set_color(ColorButton* this_, Gdk2.Color* color);
42106 void gtk_color_button_set_title(ColorButton* this_, char* title);
42107 void gtk_color_button_set_use_alpha(ColorButton* this_, int use_alpha);
42108 ColorSelection* gtk_color_selection_new();
42109 int gtk_color_selection_palette_from_string(char* str, /*out*/ Gdk2.Color** colors, /*out*/ int* n_colors);
42110 char* /*new*/ gtk_color_selection_palette_to_string(Gdk2.Color* colors, int n_colors);
42111 ColorSelectionChangePaletteFunc gtk_color_selection_set_change_palette_hook(ColorSelectionChangePaletteFunc func);
42112 ColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook(ColorSelectionChangePaletteWithScreenFunc func);
42113 void gtk_color_selection_get_color(ColorSelection* this_, double* color);
42114 ushort gtk_color_selection_get_current_alpha(ColorSelection* this_);
42115 void gtk_color_selection_get_current_color(ColorSelection* this_, /*out*/ Gdk2.Color* color);
42116 int gtk_color_selection_get_has_opacity_control(ColorSelection* this_);
42117 int gtk_color_selection_get_has_palette(ColorSelection* this_);
42118 ushort gtk_color_selection_get_previous_alpha(ColorSelection* this_);
42119 void gtk_color_selection_get_previous_color(ColorSelection* this_, /*out*/ Gdk2.Color* color);
42120 int gtk_color_selection_is_adjusting(ColorSelection* this_);
42121 void gtk_color_selection_set_color(ColorSelection* this_, double* color);
42122 void gtk_color_selection_set_current_alpha(ColorSelection* this_, ushort alpha);
42123 void gtk_color_selection_set_current_color(ColorSelection* this_, Gdk2.Color* color);
42124 void gtk_color_selection_set_has_opacity_control(ColorSelection* this_, int has_opacity);
42125 void gtk_color_selection_set_has_palette(ColorSelection* this_, int has_palette);
42126 void gtk_color_selection_set_previous_alpha(ColorSelection* this_, ushort alpha);
42127 void gtk_color_selection_set_previous_color(ColorSelection* this_, Gdk2.Color* color);
42128 void gtk_color_selection_set_update_policy(ColorSelection* this_, UpdateType policy);
42129 ColorSelectionDialog* gtk_color_selection_dialog_new(char* title);
42130 Widget* gtk_color_selection_dialog_get_color_selection(ColorSelectionDialog* this_);
42131 Combo* gtk_combo_new();
42132 void gtk_combo_disable_activate(Combo* this_);
42133 void gtk_combo_set_case_sensitive(Combo* this_, int val);
42134 void gtk_combo_set_item_string(Combo* this_, Item* item, char* item_value);
42135 void gtk_combo_set_popdown_strings(Combo* this_, GLib2.List* strings);
42136 void gtk_combo_set_use_arrows(Combo* this_, int val);
42137 void gtk_combo_set_use_arrows_always(Combo* this_, int val);
42138 void gtk_combo_set_value_in_list(Combo* this_, int val, int ok_if_empty);
42139 ComboBox* gtk_combo_box_new();
42140 ComboBox* gtk_combo_box_new_text();
42141 ComboBox* gtk_combo_box_new_with_entry();
42142 ComboBox* gtk_combo_box_new_with_model(TreeModel* model);
42143 ComboBox* gtk_combo_box_new_with_model_and_entry(TreeModel* model);
42144 void gtk_combo_box_append_text(ComboBox* this_, char* text);
42145 int gtk_combo_box_get_active(ComboBox* this_);
42146 int gtk_combo_box_get_active_iter(ComboBox* this_, /*out*/ TreeIter* iter);
42147 char* /*new*/ gtk_combo_box_get_active_text(ComboBox* this_);
42148 int gtk_combo_box_get_add_tearoffs(ComboBox* this_);
42149 SensitivityType gtk_combo_box_get_button_sensitivity(ComboBox* this_);
42150 int gtk_combo_box_get_column_span_column(ComboBox* this_);
42151 int gtk_combo_box_get_entry_text_column(ComboBox* this_);
42152 int gtk_combo_box_get_focus_on_click(ComboBox* this_);
42153 int gtk_combo_box_get_has_entry(ComboBox* this_);
42154 TreeModel* gtk_combo_box_get_model(ComboBox* this_);
42155 Atk.Object* gtk_combo_box_get_popup_accessible(ComboBox* this_);
42156 TreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func(ComboBox* this_);
42157 int gtk_combo_box_get_row_span_column(ComboBox* this_);
42158 char* gtk_combo_box_get_title(ComboBox* this_);
42159 int gtk_combo_box_get_wrap_width(ComboBox* this_);
42160 void gtk_combo_box_insert_text(ComboBox* this_, int position, char* text);
42161 void gtk_combo_box_popdown(ComboBox* this_);
42162 void gtk_combo_box_popup(ComboBox* this_);
42163 void gtk_combo_box_prepend_text(ComboBox* this_, char* text);
42164 void gtk_combo_box_remove_text(ComboBox* this_, int position);
42165 void gtk_combo_box_set_active(ComboBox* this_, int index_);
42166 void gtk_combo_box_set_active_iter(ComboBox* this_, TreeIter* iter=null);
42167 void gtk_combo_box_set_add_tearoffs(ComboBox* this_, int add_tearoffs);
42168 void gtk_combo_box_set_button_sensitivity(ComboBox* this_, SensitivityType sensitivity);
42169 void gtk_combo_box_set_column_span_column(ComboBox* this_, int column_span);
42170 void gtk_combo_box_set_entry_text_column(ComboBox* this_, int text_column);
42171 void gtk_combo_box_set_focus_on_click(ComboBox* this_, int focus_on_click);
42172 void gtk_combo_box_set_model(ComboBox* this_, TreeModel* model=null);
42173 void gtk_combo_box_set_row_separator_func(ComboBox* this_, TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
42174 void gtk_combo_box_set_row_span_column(ComboBox* this_, int row_span);
42175 void gtk_combo_box_set_title(ComboBox* this_, char* title);
42176 void gtk_combo_box_set_wrap_width(ComboBox* this_, int width);
42177 ComboBoxEntry* gtk_combo_box_entry_new();
42178 ComboBoxEntry* gtk_combo_box_entry_new_text();
42179 ComboBoxEntry* gtk_combo_box_entry_new_with_model(TreeModel* model, int text_column);
42180 int gtk_combo_box_entry_get_text_column(ComboBoxEntry* this_);
42181 void gtk_combo_box_entry_set_text_column(ComboBoxEntry* this_, int text_column);
42182 ComboBoxText* gtk_combo_box_text_new();
42183 ComboBoxText* gtk_combo_box_text_new_with_entry();
42184 void gtk_combo_box_text_append_text(ComboBoxText* this_, char* text);
42185 char* /*new*/ gtk_combo_box_text_get_active_text(ComboBoxText* this_);
42186 void gtk_combo_box_text_insert_text(ComboBoxText* this_, int position, char* text);
42187 void gtk_combo_box_text_prepend_text(ComboBoxText* this_, char* text);
42188 void gtk_combo_box_text_remove(ComboBoxText* this_, int position);
42189 void gtk_container_add(Container* this_, Widget* widget);
42190 void gtk_container_add_with_properties(Container* this_, Widget* widget, char* first_prop_name, ...);
42191 void gtk_container_check_resize(Container* this_);
42192 void gtk_container_child_get(Container* this_, Widget* child, char* first_prop_name, ...);
42193 void gtk_container_child_get_property(Container* this_, Widget* child, char* property_name, GObject2.Value* value);
42194 void gtk_container_child_get_valist(Container* this_, Widget* child, char* first_property_name, va_list var_args);
42195 void gtk_container_child_set(Container* this_, Widget* child, char* first_prop_name, ...);
42196 void gtk_container_child_set_property(Container* this_, Widget* child, char* property_name, GObject2.Value* value);
42197 void gtk_container_child_set_valist(Container* this_, Widget* child, char* first_property_name, va_list var_args);
42198 Type gtk_container_child_type(Container* this_);
42199 void gtk_container_forall(Container* this_, Callback callback, void* callback_data);
42200 void gtk_container_foreach(Container* this_, Callback callback, void* callback_data);
42201 void gtk_container_foreach_full(Container* this_, Callback callback, CallbackMarshal marshal, void* callback_data, GLib2.DestroyNotify notify);
42202 uint gtk_container_get_border_width(Container* this_);
42203 GLib2.List* /*new container*/ gtk_container_get_children(Container* this_);
42204 int gtk_container_get_focus_chain(Container* this_, /*out*/ GLib2.List** focusable_widgets);
42205 Widget* gtk_container_get_focus_child(Container* this_);
42206 Adjustment* gtk_container_get_focus_hadjustment(Container* this_);
42207 Adjustment* gtk_container_get_focus_vadjustment(Container* this_);
42208 ResizeMode gtk_container_get_resize_mode(Container* this_);
42209 void gtk_container_propagate_expose(Container* this_, Widget* child, Gdk2.EventExpose* event);
42210 void gtk_container_remove(Container* this_, Widget* widget);
42211 void gtk_container_resize_children(Container* this_);
42212 void gtk_container_set_border_width(Container* this_, uint border_width);
42213 void gtk_container_set_focus_chain(Container* this_, GLib2.List* focusable_widgets);
42214 void gtk_container_set_focus_child(Container* this_, Widget* child=null);
42215 void gtk_container_set_focus_hadjustment(Container* this_, Adjustment* adjustment);
42216 void gtk_container_set_focus_vadjustment(Container* this_, Adjustment* adjustment);
42217 void gtk_container_set_reallocate_redraws(Container* this_, int needs_redraws);
42218 void gtk_container_set_resize_mode(Container* this_, ResizeMode resize_mode);
42219 void gtk_container_unset_focus_chain(Container* this_);
42220 GObject2.ParamSpec* gtk_container_class_find_child_property(ContainerClass* this_, char* property_name);
42221 void gtk_container_class_install_child_property(ContainerClass* this_, uint property_id, GObject2.ParamSpec* pspec);
42222 GObject2.ParamSpec** /*new container*/ gtk_container_class_list_child_properties(ContainerClass* this_, /*out*/ uint* n_properties);
42223 Curve* gtk_curve_new();
42224 void gtk_curve_get_vector(Curve* this_, int veclen, float vector);
42225 void gtk_curve_reset(Curve* this_);
42226 void gtk_curve_set_curve_type(Curve* this_, CurveType type);
42227 void gtk_curve_set_gamma(Curve* this_, float gamma_);
42228 void gtk_curve_set_range(Curve* this_, float min_x, float max_x, float min_y, float max_y);
42229 void gtk_curve_set_vector(Curve* this_, int veclen, float vector);
42230 Dialog* gtk_dialog_new();
42231 Dialog* gtk_dialog_new_with_buttons(char* title, Window* parent, DialogFlags flags, char* first_button_text=null, ...);
42232 void gtk_dialog_add_action_widget(Dialog* this_, Widget* child, int response_id);
42233 Widget* gtk_dialog_add_button(Dialog* this_, char* button_text, int response_id);
42234 void gtk_dialog_add_buttons(Dialog* this_, char* first_button_text, ...);
42235 Widget* gtk_dialog_get_action_area(Dialog* this_);
42236 Widget* gtk_dialog_get_content_area(Dialog* this_);
42237 int gtk_dialog_get_has_separator(Dialog* this_);
42238 int gtk_dialog_get_response_for_widget(Dialog* this_, Widget* widget);
42239 Widget* gtk_dialog_get_widget_for_response(Dialog* this_, int response_id);
42240 void gtk_dialog_response(Dialog* this_, int response_id);
42241 int gtk_dialog_run(Dialog* this_);
42242 void gtk_dialog_set_alternative_button_order(Dialog* this_, int first_response_id, ...);
42243 void gtk_dialog_set_alternative_button_order_from_array(Dialog* this_, int n_params, int* new_order);
42244 void gtk_dialog_set_default_response(Dialog* this_, int response_id);
42245 void gtk_dialog_set_has_separator(Dialog* this_, int setting);
42246 void gtk_dialog_set_response_sensitive(Dialog* this_, int response_id, int setting);
42247 DrawingArea* gtk_drawing_area_new();
42248 void gtk_drawing_area_size(DrawingArea* this_, int width, int height);
42249 void gtk_editable_copy_clipboard(Editable* this_);
42250 void gtk_editable_cut_clipboard(Editable* this_);
42251 void gtk_editable_delete_selection(Editable* this_);
42252 void gtk_editable_delete_text(Editable* this_, int start_pos, int end_pos);
42253 char* /*new*/ gtk_editable_get_chars(Editable* this_, int start_pos, int end_pos);
42254 int gtk_editable_get_editable(Editable* this_);
42255 int gtk_editable_get_position(Editable* this_);
42256 int gtk_editable_get_selection_bounds(Editable* this_, /*out*/ int* start_pos=null, /*out*/ int* end_pos=null);
42257 void gtk_editable_insert_text(Editable* this_, char* new_text, int new_text_length, /*inout*/ int* position);
42258 void gtk_editable_paste_clipboard(Editable* this_);
42259 void gtk_editable_select_region(Editable* this_, int start_pos, int end_pos);
42260 void gtk_editable_set_editable(Editable* this_, int is_editable);
42261 void gtk_editable_set_position(Editable* this_, int position);
42262 Entry* gtk_entry_new();
42263 Entry* gtk_entry_new_with_buffer(EntryBuffer* buffer);
42264 Entry* gtk_entry_new_with_max_length(int max);
42265 void gtk_entry_append_text(Entry* this_, char* text);
42266 int gtk_entry_get_activates_default(Entry* this_);
42267 float gtk_entry_get_alignment(Entry* this_);
42268 EntryBuffer* gtk_entry_get_buffer(Entry* this_);
42269 EntryCompletion* gtk_entry_get_completion(Entry* this_);
42270 int gtk_entry_get_current_icon_drag_source(Entry* this_);
42271 Adjustment* gtk_entry_get_cursor_hadjustment(Entry* this_);
42272 int gtk_entry_get_has_frame(Entry* this_);
42273 int gtk_entry_get_icon_activatable(Entry* this_, EntryIconPosition icon_pos);
42274 int gtk_entry_get_icon_at_pos(Entry* this_, int x, int y);
42275 Gio2.Icon* gtk_entry_get_icon_gicon(Entry* this_, EntryIconPosition icon_pos);
42276 char* gtk_entry_get_icon_name(Entry* this_, EntryIconPosition icon_pos);
42277 GdkPixbuf2.Pixbuf* gtk_entry_get_icon_pixbuf(Entry* this_, EntryIconPosition icon_pos);
42278 int gtk_entry_get_icon_sensitive(Entry* this_, EntryIconPosition icon_pos);
42279 char* gtk_entry_get_icon_stock(Entry* this_, EntryIconPosition icon_pos);
42280 ImageType gtk_entry_get_icon_storage_type(Entry* this_, EntryIconPosition icon_pos);
42281 char* /*new*/ gtk_entry_get_icon_tooltip_markup(Entry* this_, EntryIconPosition icon_pos);
42282 char* /*new*/ gtk_entry_get_icon_tooltip_text(Entry* this_, EntryIconPosition icon_pos);
42283 Gdk2.Window* gtk_entry_get_icon_window(Entry* this_, EntryIconPosition icon_pos);
42284 Border* gtk_entry_get_inner_border(Entry* this_);
42285 dchar gtk_entry_get_invisible_char(Entry* this_);
42286 Pango.Layout* gtk_entry_get_layout(Entry* this_);
42287 void gtk_entry_get_layout_offsets(Entry* this_, /*out*/ int* x=null, /*out*/ int* y=null);
42288 int gtk_entry_get_max_length(Entry* this_);
42289 int gtk_entry_get_overwrite_mode(Entry* this_);
42290 double gtk_entry_get_progress_fraction(Entry* this_);
42291 double gtk_entry_get_progress_pulse_step(Entry* this_);
42292 char* gtk_entry_get_text(Entry* this_);
42293 ushort gtk_entry_get_text_length(Entry* this_);
42294 Gdk2.Window* gtk_entry_get_text_window(Entry* this_);
42295 int gtk_entry_get_visibility(Entry* this_);
42296 int gtk_entry_get_width_chars(Entry* this_);
42297 int gtk_entry_im_context_filter_keypress(Entry* this_, Gdk2.EventKey* event);
42298 int gtk_entry_layout_index_to_text_index(Entry* this_, int layout_index);
42299 void gtk_entry_prepend_text(Entry* this_, char* text);
42300 void gtk_entry_progress_pulse(Entry* this_);
42301 void gtk_entry_reset_im_context(Entry* this_);
42302 void gtk_entry_select_region(Entry* this_, int start, int end);
42303 void gtk_entry_set_activates_default(Entry* this_, int setting);
42304 void gtk_entry_set_alignment(Entry* this_, float xalign);
42305 void gtk_entry_set_buffer(Entry* this_, EntryBuffer* buffer);
42306 void gtk_entry_set_completion(Entry* this_, EntryCompletion* completion=null);
42307 void gtk_entry_set_cursor_hadjustment(Entry* this_, Adjustment* adjustment);
42308 void gtk_entry_set_editable(Entry* this_, int editable);
42309 void gtk_entry_set_has_frame(Entry* this_, int setting);
42310 void gtk_entry_set_icon_activatable(Entry* this_, EntryIconPosition icon_pos, int activatable);
42311 void gtk_entry_set_icon_drag_source(Entry* this_, EntryIconPosition icon_pos, TargetList* target_list, Gdk2.DragAction actions);
42312 void gtk_entry_set_icon_from_gicon(Entry* this_, EntryIconPosition icon_pos, Gio2.Icon* icon=null);
42313 void gtk_entry_set_icon_from_icon_name(Entry* this_, EntryIconPosition icon_pos, char* icon_name=null);
42314 void gtk_entry_set_icon_from_pixbuf(Entry* this_, EntryIconPosition icon_pos, GdkPixbuf2.Pixbuf* pixbuf=null);
42315 void gtk_entry_set_icon_from_stock(Entry* this_, EntryIconPosition icon_pos, char* stock_id=null);
42316 void gtk_entry_set_icon_sensitive(Entry* this_, EntryIconPosition icon_pos, int sensitive);
42317 void gtk_entry_set_icon_tooltip_markup(Entry* this_, EntryIconPosition icon_pos, char* tooltip=null);
42318 void gtk_entry_set_icon_tooltip_text(Entry* this_, EntryIconPosition icon_pos, char* tooltip=null);
42319 void gtk_entry_set_inner_border(Entry* this_, Border* border=null);
42320 void gtk_entry_set_invisible_char(Entry* this_, dchar ch);
42321 void gtk_entry_set_max_length(Entry* this_, int max);
42322 void gtk_entry_set_overwrite_mode(Entry* this_, int overwrite);
42323 void gtk_entry_set_position(Entry* this_, int position);
42324 void gtk_entry_set_progress_fraction(Entry* this_, double fraction);
42325 void gtk_entry_set_progress_pulse_step(Entry* this_, double fraction);
42326 void gtk_entry_set_text(Entry* this_, char* text);
42327 void gtk_entry_set_visibility(Entry* this_, int visible);
42328 void gtk_entry_set_width_chars(Entry* this_, int n_chars);
42329 int gtk_entry_text_index_to_layout_index(Entry* this_, int text_index);
42330 void gtk_entry_unset_invisible_char(Entry* this_);
42331 EntryBuffer* /*new*/ gtk_entry_buffer_new(char* initial_chars, int n_initial_chars);
42332 uint gtk_entry_buffer_delete_text(EntryBuffer* this_, uint position, int n_chars);
42333 void gtk_entry_buffer_emit_deleted_text(EntryBuffer* this_, uint position, uint n_chars);
42334 void gtk_entry_buffer_emit_inserted_text(EntryBuffer* this_, uint position, char* chars, uint n_chars);
42335 size_t gtk_entry_buffer_get_bytes(EntryBuffer* this_);
42336 uint gtk_entry_buffer_get_length(EntryBuffer* this_);
42337 int gtk_entry_buffer_get_max_length(EntryBuffer* this_);
42338 char* gtk_entry_buffer_get_text(EntryBuffer* this_);
42339 uint gtk_entry_buffer_insert_text(EntryBuffer* this_, uint position, char* chars, int n_chars);
42340 void gtk_entry_buffer_set_max_length(EntryBuffer* this_, int max_length);
42341 void gtk_entry_buffer_set_text(EntryBuffer* this_, char* chars, int n_chars);
42342 EntryCompletion* /*new*/ gtk_entry_completion_new();
42343 void gtk_entry_completion_complete(EntryCompletion* this_);
42344 void gtk_entry_completion_delete_action(EntryCompletion* this_, int index_);
42345 char* gtk_entry_completion_get_completion_prefix(EntryCompletion* this_);
42346 Widget* gtk_entry_completion_get_entry(EntryCompletion* this_);
42347 int gtk_entry_completion_get_inline_completion(EntryCompletion* this_);
42348 int gtk_entry_completion_get_inline_selection(EntryCompletion* this_);
42349 int gtk_entry_completion_get_minimum_key_length(EntryCompletion* this_);
42350 TreeModel* gtk_entry_completion_get_model(EntryCompletion* this_);
42351 int gtk_entry_completion_get_popup_completion(EntryCompletion* this_);
42352 int gtk_entry_completion_get_popup_set_width(EntryCompletion* this_);
42353 int gtk_entry_completion_get_popup_single_match(EntryCompletion* this_);
42354 int gtk_entry_completion_get_text_column(EntryCompletion* this_);
42355 void gtk_entry_completion_insert_action_markup(EntryCompletion* this_, int index_, char* markup);
42356 void gtk_entry_completion_insert_action_text(EntryCompletion* this_, int index_, char* text);
42357 void gtk_entry_completion_insert_prefix(EntryCompletion* this_);
42358 void gtk_entry_completion_set_inline_completion(EntryCompletion* this_, int inline_completion);
42359 void gtk_entry_completion_set_inline_selection(EntryCompletion* this_, int inline_selection);
42360 void gtk_entry_completion_set_match_func(EntryCompletion* this_, EntryCompletionMatchFunc func, void* func_data, GLib2.DestroyNotify func_notify);
42361 void gtk_entry_completion_set_minimum_key_length(EntryCompletion* this_, int length);
42362 void gtk_entry_completion_set_model(EntryCompletion* this_, TreeModel* model=null);
42363 void gtk_entry_completion_set_popup_completion(EntryCompletion* this_, int popup_completion);
42364 void gtk_entry_completion_set_popup_set_width(EntryCompletion* this_, int popup_set_width);
42365 void gtk_entry_completion_set_popup_single_match(EntryCompletion* this_, int popup_single_match);
42366 void gtk_entry_completion_set_text_column(EntryCompletion* this_, int column);
42367 EventBox* gtk_event_box_new();
42368 int gtk_event_box_get_above_child(EventBox* this_);
42369 int gtk_event_box_get_visible_window(EventBox* this_);
42370 void gtk_event_box_set_above_child(EventBox* this_, int above_child);
42371 void gtk_event_box_set_visible_window(EventBox* this_, int visible_window);
42372 Expander* gtk_expander_new(char* label);
42373 Expander* gtk_expander_new_with_mnemonic(char* label=null);
42374 int gtk_expander_get_expanded(Expander* this_);
42375 char* gtk_expander_get_label(Expander* this_);
42376 int gtk_expander_get_label_fill(Expander* this_);
42377 Widget* gtk_expander_get_label_widget(Expander* this_);
42378 int gtk_expander_get_spacing(Expander* this_);
42379 int gtk_expander_get_use_markup(Expander* this_);
42380 int gtk_expander_get_use_underline(Expander* this_);
42381 void gtk_expander_set_expanded(Expander* this_, int expanded);
42382 void gtk_expander_set_label(Expander* this_, char* label=null);
42383 void gtk_expander_set_label_fill(Expander* this_, int label_fill);
42384 void gtk_expander_set_label_widget(Expander* this_, Widget* label_widget=null);
42385 void gtk_expander_set_spacing(Expander* this_, int spacing);
42386 void gtk_expander_set_use_markup(Expander* this_, int use_markup);
42387 void gtk_expander_set_use_underline(Expander* this_, int use_underline);
42388 void gtk_file_chooser_add_filter(FileChooser* this_, FileFilter* filter);
42389 int gtk_file_chooser_add_shortcut_folder(FileChooser* this_, char* folder, GLib2.Error** error);
42390 int gtk_file_chooser_add_shortcut_folder_uri(FileChooser* this_, char* uri, GLib2.Error** error);
42391 FileChooserAction gtk_file_chooser_get_action(FileChooser* this_);
42392 int gtk_file_chooser_get_create_folders(FileChooser* this_);
42393 char* /*new*/ gtk_file_chooser_get_current_folder(FileChooser* this_);
42394 Gio2.File* /*new*/ gtk_file_chooser_get_current_folder_file(FileChooser* this_);
42395 char* /*new*/ gtk_file_chooser_get_current_folder_uri(FileChooser* this_);
42396 int gtk_file_chooser_get_do_overwrite_confirmation(FileChooser* this_);
42397 Widget* gtk_file_chooser_get_extra_widget(FileChooser* this_);
42398 Gio2.File* /*new*/ gtk_file_chooser_get_file(FileChooser* this_);
42399 char* /*new*/ gtk_file_chooser_get_filename(FileChooser* this_);
42400 GLib2.SList* /*new*/ gtk_file_chooser_get_filenames(FileChooser* this_);
42401 GLib2.SList* /*new*/ gtk_file_chooser_get_files(FileChooser* this_);
42402 FileFilter* gtk_file_chooser_get_filter(FileChooser* this_);
42403 int gtk_file_chooser_get_local_only(FileChooser* this_);
42404 Gio2.File* /*new*/ gtk_file_chooser_get_preview_file(FileChooser* this_);
42405 char* /*new*/ gtk_file_chooser_get_preview_filename(FileChooser* this_);
42406 char* /*new*/ gtk_file_chooser_get_preview_uri(FileChooser* this_);
42407 Widget* gtk_file_chooser_get_preview_widget(FileChooser* this_);
42408 int gtk_file_chooser_get_preview_widget_active(FileChooser* this_);
42409 int gtk_file_chooser_get_select_multiple(FileChooser* this_);
42410 int gtk_file_chooser_get_show_hidden(FileChooser* this_);
42411 char* /*new*/ gtk_file_chooser_get_uri(FileChooser* this_);
42412 GLib2.SList* /*new*/ gtk_file_chooser_get_uris(FileChooser* this_);
42413 int gtk_file_chooser_get_use_preview_label(FileChooser* this_);
42414 GLib2.SList* /*new container*/ gtk_file_chooser_list_filters(FileChooser* this_);
42415 GLib2.SList* /*new*/ gtk_file_chooser_list_shortcut_folder_uris(FileChooser* this_);
42416 GLib2.SList* /*new*/ gtk_file_chooser_list_shortcut_folders(FileChooser* this_);
42417 void gtk_file_chooser_remove_filter(FileChooser* this_, FileFilter* filter);
42418 int gtk_file_chooser_remove_shortcut_folder(FileChooser* this_, char* folder, GLib2.Error** error);
42419 int gtk_file_chooser_remove_shortcut_folder_uri(FileChooser* this_, char* uri, GLib2.Error** error);
42420 void gtk_file_chooser_select_all(FileChooser* this_);
42421 int gtk_file_chooser_select_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error);
42422 int gtk_file_chooser_select_filename(FileChooser* this_, char* filename);
42423 int gtk_file_chooser_select_uri(FileChooser* this_, char* uri);
42424 void gtk_file_chooser_set_action(FileChooser* this_, FileChooserAction action);
42425 void gtk_file_chooser_set_create_folders(FileChooser* this_, int create_folders);
42426 int gtk_file_chooser_set_current_folder(FileChooser* this_, char* filename);
42427 int gtk_file_chooser_set_current_folder_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error);
42428 int gtk_file_chooser_set_current_folder_uri(FileChooser* this_, char* uri);
42429 void gtk_file_chooser_set_current_name(FileChooser* this_, char* name);
42430 void gtk_file_chooser_set_do_overwrite_confirmation(FileChooser* this_, int do_overwrite_confirmation);
42431 void gtk_file_chooser_set_extra_widget(FileChooser* this_, Widget* extra_widget);
42432 int gtk_file_chooser_set_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error);
42433 int gtk_file_chooser_set_filename(FileChooser* this_, char* filename);
42434 void gtk_file_chooser_set_filter(FileChooser* this_, FileFilter* filter);
42435 void gtk_file_chooser_set_local_only(FileChooser* this_, int local_only);
42436 void gtk_file_chooser_set_preview_widget(FileChooser* this_, Widget* preview_widget);
42437 void gtk_file_chooser_set_preview_widget_active(FileChooser* this_, int active);
42438 void gtk_file_chooser_set_select_multiple(FileChooser* this_, int select_multiple);
42439 void gtk_file_chooser_set_show_hidden(FileChooser* this_, int show_hidden);
42440 int gtk_file_chooser_set_uri(FileChooser* this_, char* uri);
42441 void gtk_file_chooser_set_use_preview_label(FileChooser* this_, int use_label);
42442 void gtk_file_chooser_unselect_all(FileChooser* this_);
42443 void gtk_file_chooser_unselect_file(FileChooser* this_, Gio2.File* file);
42444 void gtk_file_chooser_unselect_filename(FileChooser* this_, char* filename);
42445 void gtk_file_chooser_unselect_uri(FileChooser* this_, char* uri);
42446 FileChooserButton* gtk_file_chooser_button_new(char* title, FileChooserAction action);
42447 FileChooserButton* gtk_file_chooser_button_new_with_backend(char* title, FileChooserAction action, char* backend);
42448 FileChooserButton* gtk_file_chooser_button_new_with_dialog(Widget* dialog);
42449 int gtk_file_chooser_button_get_focus_on_click(FileChooserButton* this_);
42450 char* gtk_file_chooser_button_get_title(FileChooserButton* this_);
42451 int gtk_file_chooser_button_get_width_chars(FileChooserButton* this_);
42452 void gtk_file_chooser_button_set_focus_on_click(FileChooserButton* this_, int focus_on_click);
42453 void gtk_file_chooser_button_set_title(FileChooserButton* this_, char* title);
42454 void gtk_file_chooser_button_set_width_chars(FileChooserButton* this_, int n_chars);
42455 FileChooserDialog* gtk_file_chooser_dialog_new(char* title, Window* parent, FileChooserAction action, char* first_button_text=null, ...);
42456 FileChooserDialog* gtk_file_chooser_dialog_new_with_backend(char* title, Window* parent, FileChooserAction action, char* backend, char* first_button_text=null, ...);
42457 FileChooserWidget* gtk_file_chooser_widget_new(FileChooserAction action);
42458 FileChooserWidget* gtk_file_chooser_widget_new_with_backend(FileChooserAction action, char* backend);
42459 FileFilter* gtk_file_filter_new();
42460 void gtk_file_filter_add_custom(FileFilter* this_, FileFilterFlags needed, FileFilterFunc func, void* data, GLib2.DestroyNotify notify);
42461 void gtk_file_filter_add_mime_type(FileFilter* this_, char* mime_type);
42462 void gtk_file_filter_add_pattern(FileFilter* this_, char* pattern);
42463 void gtk_file_filter_add_pixbuf_formats(FileFilter* this_);
42464 int gtk_file_filter_filter(FileFilter* this_, FileFilterInfo* filter_info);
42465 char* gtk_file_filter_get_name(FileFilter* this_);
42466 FileFilterFlags gtk_file_filter_get_needed(FileFilter* this_);
42467 void gtk_file_filter_set_name(FileFilter* this_, char* name=null);
42468 FileSelection* gtk_file_selection_new(char* title);
42469 void gtk_file_selection_complete(FileSelection* this_, char* pattern);
42470 char* gtk_file_selection_get_filename(FileSelection* this_);
42471 int gtk_file_selection_get_select_multiple(FileSelection* this_);
42472 char** gtk_file_selection_get_selections(FileSelection* this_);
42473 void gtk_file_selection_hide_fileop_buttons(FileSelection* this_);
42474 void gtk_file_selection_set_filename(FileSelection* this_, char* filename);
42475 void gtk_file_selection_set_select_multiple(FileSelection* this_, int select_multiple);
42476 void gtk_file_selection_show_fileop_buttons(FileSelection* this_);
42477 Fixed* gtk_fixed_new();
42478 int gtk_fixed_get_has_window(Fixed* this_);
42479 void gtk_fixed_move(Fixed* this_, Widget* widget, int x, int y);
42480 void gtk_fixed_put(Fixed* this_, Widget* widget, int x, int y);
42481 void gtk_fixed_set_has_window(Fixed* this_, int has_window);
42482 FontButton* gtk_font_button_new();
42483 FontButton* gtk_font_button_new_with_font(char* fontname);
42484 char* gtk_font_button_get_font_name(FontButton* this_);
42485 int gtk_font_button_get_show_size(FontButton* this_);
42486 int gtk_font_button_get_show_style(FontButton* this_);
42487 char* gtk_font_button_get_title(FontButton* this_);
42488 int gtk_font_button_get_use_font(FontButton* this_);
42489 int gtk_font_button_get_use_size(FontButton* this_);
42490 int gtk_font_button_set_font_name(FontButton* this_, char* fontname);
42491 void gtk_font_button_set_show_size(FontButton* this_, int show_size);
42492 void gtk_font_button_set_show_style(FontButton* this_, int show_style);
42493 void gtk_font_button_set_title(FontButton* this_, char* title);
42494 void gtk_font_button_set_use_font(FontButton* this_, int use_font);
42495 void gtk_font_button_set_use_size(FontButton* this_, int use_size);
42496 FontSelection* gtk_font_selection_new();
42497 Pango.FontFace* gtk_font_selection_get_face(FontSelection* this_);
42498 Widget* gtk_font_selection_get_face_list(FontSelection* this_);
42499 Pango.FontFamily* gtk_font_selection_get_family(FontSelection* this_);
42500 Widget* gtk_font_selection_get_family_list(FontSelection* this_);
42501 Gdk2.Font* /*new*/ gtk_font_selection_get_font(FontSelection* this_);
42502 char* /*new*/ gtk_font_selection_get_font_name(FontSelection* this_);
42503 Widget* gtk_font_selection_get_preview_entry(FontSelection* this_);
42504 char* gtk_font_selection_get_preview_text(FontSelection* this_);
42505 int gtk_font_selection_get_size(FontSelection* this_);
42506 Widget* gtk_font_selection_get_size_entry(FontSelection* this_);
42507 Widget* gtk_font_selection_get_size_list(FontSelection* this_);
42508 int gtk_font_selection_set_font_name(FontSelection* this_, char* fontname);
42509 void gtk_font_selection_set_preview_text(FontSelection* this_, char* text);
42510 FontSelectionDialog* gtk_font_selection_dialog_new(char* title);
42511 Widget* gtk_font_selection_dialog_get_apply_button(FontSelectionDialog* this_);
42512 Widget* gtk_font_selection_dialog_get_cancel_button(FontSelectionDialog* this_);
42513 Gdk2.Font* /*new*/ gtk_font_selection_dialog_get_font(FontSelectionDialog* this_);
42514 char* /*new*/ gtk_font_selection_dialog_get_font_name(FontSelectionDialog* this_);
42515 Widget* gtk_font_selection_dialog_get_font_selection(FontSelectionDialog* this_);
42516 Widget* gtk_font_selection_dialog_get_ok_button(FontSelectionDialog* this_);
42517 char* gtk_font_selection_dialog_get_preview_text(FontSelectionDialog* this_);
42518 int gtk_font_selection_dialog_set_font_name(FontSelectionDialog* this_, char* fontname);
42519 void gtk_font_selection_dialog_set_preview_text(FontSelectionDialog* this_, char* text);
42520 Frame* gtk_frame_new(char* label);
42521 char* gtk_frame_get_label(Frame* this_);
42522 void gtk_frame_get_label_align(Frame* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null);
42523 Widget* gtk_frame_get_label_widget(Frame* this_);
42524 ShadowType gtk_frame_get_shadow_type(Frame* this_);
42525 void gtk_frame_set_label(Frame* this_, char* label=null);
42526 void gtk_frame_set_label_align(Frame* this_, float xalign, float yalign);
42527 void gtk_frame_set_label_widget(Frame* this_, Widget* label_widget);
42528 void gtk_frame_set_shadow_type(Frame* this_, ShadowType type);
42529 GammaCurve* gtk_gamma_curve_new();
42530 HBox* gtk_hbox_new(int homogeneous, int spacing);
42531 HButtonBox* gtk_hbutton_box_new();
42532 ButtonBoxStyle gtk_hbutton_box_get_layout_default();
42533 int gtk_hbutton_box_get_spacing_default();
42534 void gtk_hbutton_box_set_layout_default(ButtonBoxStyle layout);
42535 void gtk_hbutton_box_set_spacing_default(int spacing);
42536 HPaned* gtk_hpaned_new();
42537 HRuler* gtk_hruler_new();
42538 HSV* gtk_hsv_new();
42539 void gtk_hsv_to_rgb(double h, double s, double v, /*out*/ double* r, /*out*/ double* g, /*out*/ double* b);
42540 void gtk_hsv_get_color(HSV* this_, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v);
42541 void gtk_hsv_get_metrics(HSV* this_, /*out*/ int* size, /*out*/ int* ring_width);
42542 int gtk_hsv_is_adjusting(HSV* this_);
42543 void gtk_hsv_set_color(HSV* this_, double h, double s, double v);
42544 void gtk_hsv_set_metrics(HSV* this_, int size, int ring_width);
42545 HScale* gtk_hscale_new(Adjustment* adjustment);
42546 HScale* gtk_hscale_new_with_range(double min, double max, double step);
42547 HScrollbar* gtk_hscrollbar_new(Adjustment* adjustment=null);
42548 HSeparator* gtk_hseparator_new();
42549 HandleBox* gtk_handle_box_new();
42550 int gtk_handle_box_get_child_detached(HandleBox* this_);
42551 PositionType gtk_handle_box_get_handle_position(HandleBox* this_);
42552 ShadowType gtk_handle_box_get_shadow_type(HandleBox* this_);
42553 PositionType gtk_handle_box_get_snap_edge(HandleBox* this_);
42554 void gtk_handle_box_set_handle_position(HandleBox* this_, PositionType position);
42555 void gtk_handle_box_set_shadow_type(HandleBox* this_, ShadowType type);
42556 void gtk_handle_box_set_snap_edge(HandleBox* this_, PositionType edge);
42557 int gtk_im_context_delete_surrounding(IMContext* this_, int offset, int n_chars);
42558 int gtk_im_context_filter_keypress(IMContext* this_, Gdk2.EventKey* event);
42559 void gtk_im_context_focus_in(IMContext* this_);
42560 void gtk_im_context_focus_out(IMContext* this_);
42561 void gtk_im_context_get_preedit_string(IMContext* this_, /*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos);
42562 int gtk_im_context_get_surrounding(IMContext* this_, /*out*/ char** text, int* cursor_index);
42563 void gtk_im_context_reset(IMContext* this_);
42564 void gtk_im_context_set_client_window(IMContext* this_, Gdk2.Window* window=null);
42565 void gtk_im_context_set_cursor_location(IMContext* this_, Gdk2.Rectangle* area);
42566 void gtk_im_context_set_surrounding(IMContext* this_, char* text, int len, int cursor_index);
42567 void gtk_im_context_set_use_preedit(IMContext* this_, int use_preedit);
42568 IMContextSimple* /*new*/ gtk_im_context_simple_new();
42569 void gtk_im_context_simple_add_table(IMContextSimple* this_, ushort* data, int max_seq_len, int n_seqs);
42570 IMMulticontext* /*new*/ gtk_im_multicontext_new();
42571 void gtk_im_multicontext_append_menuitems(IMMulticontext* this_, MenuShell* menushell);
42572 char* gtk_im_multicontext_get_context_id(IMMulticontext* this_);
42573 void gtk_im_multicontext_set_context_id(IMMulticontext* this_, char* context_id);
42574 IconFactory* /*new*/ gtk_icon_factory_new();
42575 IconSet* gtk_icon_factory_lookup_default(char* stock_id);
42576 void gtk_icon_factory_add(IconFactory* this_, char* stock_id, IconSet* icon_set);
42577 void gtk_icon_factory_add_default(IconFactory* this_);
42578 IconSet* gtk_icon_factory_lookup(IconFactory* this_, char* stock_id);
42579 void gtk_icon_factory_remove_default(IconFactory* this_);
42580 IconInfo* /*new*/ gtk_icon_info_new_for_pixbuf(IconTheme* icon_theme, GdkPixbuf2.Pixbuf* pixbuf);
42581 IconInfo* /*new*/ gtk_icon_info_copy(IconInfo* this_);
42582 void gtk_icon_info_free(IconInfo* this_);
42583 int gtk_icon_info_get_attach_points(IconInfo* this_, Gdk2.Point** points=null, int* n_points=null);
42584 int gtk_icon_info_get_base_size(IconInfo* this_);
42585 GdkPixbuf2.Pixbuf* gtk_icon_info_get_builtin_pixbuf(IconInfo* this_);
42586 char* gtk_icon_info_get_display_name(IconInfo* this_);
42587 int gtk_icon_info_get_embedded_rect(IconInfo* this_, /*out*/ Gdk2.Rectangle* rectangle);
42588 char* gtk_icon_info_get_filename(IconInfo* this_);
42589 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_info_load_icon(IconInfo* this_, GLib2.Error** error);
42590 void gtk_icon_info_set_raw_coordinates(IconInfo* this_, int raw_coordinates);
42591 IconSet* /*new*/ gtk_icon_set_new();
42592 IconSet* /*new*/ gtk_icon_set_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf);
42593 void gtk_icon_set_add_source(IconSet* this_, IconSource* source);
42594 IconSet* /*new*/ gtk_icon_set_copy(IconSet* this_);
42595 void gtk_icon_set_get_sizes(IconSet* this_, /*out*/ /*POINTER*/ int* sizes, /*out*/ int* n_sizes);
42596 IconSet* /*new*/ gtk_icon_set_ref(IconSet* this_);
42597 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_set_render_icon(IconSet* this_, Style* style, TextDirection direction, StateType state, int size, Widget* widget=null, char* detail=null);
42598 void gtk_icon_set_unref(IconSet* this_);
42599 IconSource* /*new*/ gtk_icon_source_new();
42600 IconSource* /*new*/ gtk_icon_source_copy(IconSource* this_);
42601 void gtk_icon_source_free(IconSource* this_);
42602 TextDirection gtk_icon_source_get_direction(IconSource* this_);
42603 int gtk_icon_source_get_direction_wildcarded(IconSource* this_);
42604 char* gtk_icon_source_get_filename(IconSource* this_);
42605 char* gtk_icon_source_get_icon_name(IconSource* this_);
42606 GdkPixbuf2.Pixbuf* gtk_icon_source_get_pixbuf(IconSource* this_);
42607 int gtk_icon_source_get_size(IconSource* this_);
42608 int gtk_icon_source_get_size_wildcarded(IconSource* this_);
42609 StateType gtk_icon_source_get_state(IconSource* this_);
42610 int gtk_icon_source_get_state_wildcarded(IconSource* this_);
42611 void gtk_icon_source_set_direction(IconSource* this_, TextDirection direction);
42612 void gtk_icon_source_set_direction_wildcarded(IconSource* this_, int setting);
42613 void gtk_icon_source_set_filename(IconSource* this_, char* filename);
42614 void gtk_icon_source_set_icon_name(IconSource* this_, char* icon_name=null);
42615 void gtk_icon_source_set_pixbuf(IconSource* this_, GdkPixbuf2.Pixbuf* pixbuf);
42616 void gtk_icon_source_set_size(IconSource* this_, int size);
42617 void gtk_icon_source_set_size_wildcarded(IconSource* this_, int setting);
42618 void gtk_icon_source_set_state(IconSource* this_, StateType state);
42619 void gtk_icon_source_set_state_wildcarded(IconSource* this_, int setting);
42620 IconTheme* /*new*/ gtk_icon_theme_new();
42621 void gtk_icon_theme_add_builtin_icon(char* icon_name, int size, GdkPixbuf2.Pixbuf* pixbuf);
42622 IconTheme* gtk_icon_theme_get_default();
42623 IconTheme* gtk_icon_theme_get_for_screen(Gdk2.Screen* screen);
42624 void gtk_icon_theme_append_search_path(IconTheme* this_, char* path);
42625 IconInfo* /*new*/ gtk_icon_theme_choose_icon(IconTheme* this_, char* icon_names, int size, IconLookupFlags flags);
42626 char* /*new*/ gtk_icon_theme_get_example_icon_name(IconTheme* this_);
42627 int* gtk_icon_theme_get_icon_sizes(IconTheme* this_, char* icon_name);
42628 void gtk_icon_theme_get_search_path(IconTheme* this_, char** path, int* n_elements);
42629 int gtk_icon_theme_has_icon(IconTheme* this_, char* icon_name);
42630 GLib2.List* /*new*/ gtk_icon_theme_list_contexts(IconTheme* this_);
42631 GLib2.List* /*new*/ gtk_icon_theme_list_icons(IconTheme* this_, char* context);
42632 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_theme_load_icon(IconTheme* this_, char* icon_name, int size, IconLookupFlags flags, GLib2.Error** error);
42633 IconInfo* /*new*/ gtk_icon_theme_lookup_by_gicon(IconTheme* this_, Gio2.Icon* icon, int size, IconLookupFlags flags);
42634 IconInfo* /*new*/ gtk_icon_theme_lookup_icon(IconTheme* this_, char* icon_name, int size, IconLookupFlags flags);
42635 void gtk_icon_theme_prepend_search_path(IconTheme* this_, char* path);
42636 int gtk_icon_theme_rescan_if_needed(IconTheme* this_);
42637 void gtk_icon_theme_set_custom_theme(IconTheme* this_, char* theme_name);
42638 void gtk_icon_theme_set_screen(IconTheme* this_, Gdk2.Screen* screen);
42639 void gtk_icon_theme_set_search_path(IconTheme* this_, char* path, int n_elements);
42640 IconView* gtk_icon_view_new();
42641 IconView* gtk_icon_view_new_with_model(TreeModel* model);
42642 void gtk_icon_view_convert_widget_to_bin_window_coords(IconView* this_, int wx, int wy, /*out*/ int* bx, /*out*/ int* by);
42643 Gdk2.Pixmap* /*new*/ gtk_icon_view_create_drag_icon(IconView* this_, TreePath* path);
42644 void gtk_icon_view_enable_model_drag_dest(IconView* this_, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
42645 void gtk_icon_view_enable_model_drag_source(IconView* this_, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
42646 int gtk_icon_view_get_column_spacing(IconView* this_);
42647 int gtk_icon_view_get_columns(IconView* this_);
42648 int gtk_icon_view_get_cursor(IconView* this_, TreePath** path=null, CellRenderer** cell=null);
42649 int gtk_icon_view_get_dest_item_at_pos(IconView* this_, int drag_x, int drag_y, TreePath** path=null, IconViewDropPosition* pos=null);
42650 void gtk_icon_view_get_drag_dest_item(IconView* this_, TreePath** path=null, IconViewDropPosition* pos=null);
42651 int gtk_icon_view_get_item_at_pos(IconView* this_, int x, int y, TreePath** path, CellRenderer** cell);
42652 int gtk_icon_view_get_item_column(IconView* this_, TreePath* path);
42653 Orientation gtk_icon_view_get_item_orientation(IconView* this_);
42654 int gtk_icon_view_get_item_padding(IconView* this_);
42655 int gtk_icon_view_get_item_row(IconView* this_, TreePath* path);
42656 int gtk_icon_view_get_item_width(IconView* this_);
42657 int gtk_icon_view_get_margin(IconView* this_);
42658 int gtk_icon_view_get_markup_column(IconView* this_);
42659 TreeModel* gtk_icon_view_get_model(IconView* this_);
42660 Orientation gtk_icon_view_get_orientation(IconView* this_);
42661 TreePath* /*new*/ gtk_icon_view_get_path_at_pos(IconView* this_, int x, int y);
42662 int gtk_icon_view_get_pixbuf_column(IconView* this_);
42663 int gtk_icon_view_get_reorderable(IconView* this_);
42664 int gtk_icon_view_get_row_spacing(IconView* this_);
42665 GLib2.List* /*new*/ gtk_icon_view_get_selected_items(IconView* this_);
42666 SelectionMode gtk_icon_view_get_selection_mode(IconView* this_);
42667 int gtk_icon_view_get_spacing(IconView* this_);
42668 int gtk_icon_view_get_text_column(IconView* this_);
42669 int gtk_icon_view_get_tooltip_column(IconView* this_);
42670 int gtk_icon_view_get_tooltip_context(IconView* this_, /*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ TreeModel** model=null, /*out*/ TreePath** path=null, /*out*/ TreeIter* iter=null);
42671 int gtk_icon_view_get_visible_range(IconView* this_, TreePath** start_path=null, TreePath** end_path=null);
42672 void gtk_icon_view_item_activated(IconView* this_, TreePath* path);
42673 int gtk_icon_view_path_is_selected(IconView* this_, TreePath* path);
42674 void gtk_icon_view_scroll_to_path(IconView* this_, TreePath* path, int use_align, float row_align, float col_align);
42675 void gtk_icon_view_select_all(IconView* this_);
42676 void gtk_icon_view_select_path(IconView* this_, TreePath* path);
42677 void gtk_icon_view_selected_foreach(IconView* this_, IconViewForeachFunc func, void* data);
42678 void gtk_icon_view_set_column_spacing(IconView* this_, int column_spacing);
42679 void gtk_icon_view_set_columns(IconView* this_, int columns);
42680 void gtk_icon_view_set_cursor(IconView* this_, TreePath* path, CellRenderer* cell, int start_editing);
42681 void gtk_icon_view_set_drag_dest_item(IconView* this_, TreePath* path, IconViewDropPosition pos);
42682 void gtk_icon_view_set_item_orientation(IconView* this_, Orientation orientation);
42683 void gtk_icon_view_set_item_padding(IconView* this_, int item_padding);
42684 void gtk_icon_view_set_item_width(IconView* this_, int item_width);
42685 void gtk_icon_view_set_margin(IconView* this_, int margin);
42686 void gtk_icon_view_set_markup_column(IconView* this_, int column);
42687 void gtk_icon_view_set_model(IconView* this_, TreeModel* model=null);
42688 void gtk_icon_view_set_orientation(IconView* this_, Orientation orientation);
42689 void gtk_icon_view_set_pixbuf_column(IconView* this_, int column);
42690 void gtk_icon_view_set_reorderable(IconView* this_, int reorderable);
42691 void gtk_icon_view_set_row_spacing(IconView* this_, int row_spacing);
42692 void gtk_icon_view_set_selection_mode(IconView* this_, SelectionMode mode);
42693 void gtk_icon_view_set_spacing(IconView* this_, int spacing);
42694 void gtk_icon_view_set_text_column(IconView* this_, int column);
42695 void gtk_icon_view_set_tooltip_cell(IconView* this_, Tooltip* tooltip, TreePath* path, CellRenderer* cell=null);
42696 void gtk_icon_view_set_tooltip_column(IconView* this_, int column);
42697 void gtk_icon_view_set_tooltip_item(IconView* this_, Tooltip* tooltip, TreePath* path);
42698 void gtk_icon_view_unselect_all(IconView* this_);
42699 void gtk_icon_view_unselect_path(IconView* this_, TreePath* path);
42700 void gtk_icon_view_unset_model_drag_dest(IconView* this_);
42701 void gtk_icon_view_unset_model_drag_source(IconView* this_);
42702 Image* gtk_image_new();
42703 Image* gtk_image_new_from_animation(GdkPixbuf2.PixbufAnimation* animation);
42704 Image* gtk_image_new_from_file(char* filename);
42705 Image* gtk_image_new_from_gicon(Gio2.Icon* icon, int size);
42706 Image* gtk_image_new_from_icon_name(char* icon_name, int size);
42707 Image* gtk_image_new_from_icon_set(IconSet* icon_set, int size);
42708 Image* gtk_image_new_from_image(Gdk2.Image* image=null, Gdk2.Bitmap* mask=null);
42709 Image* gtk_image_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf=null);
42710 Image* gtk_image_new_from_pixmap(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null);
42711 Image* gtk_image_new_from_stock(char* stock_id, int size);
42712 void gtk_image_clear(Image* this_);
42713 void gtk_image_get(Image* this_, Gdk2.Image** val, Gdk2.Bitmap** mask);
42714 GdkPixbuf2.PixbufAnimation* gtk_image_get_animation(Image* this_);
42715 void gtk_image_get_gicon(Image* this_, /*out*/ Gio2.Icon** gicon=null, /*out*/ /*POINTER*/ int* size=null);
42716 void gtk_image_get_icon_name(Image* this_, /*out*/ char** icon_name=null, /*out*/ /*POINTER*/ int* size=null);
42717 void gtk_image_get_icon_set(Image* this_, /*out*/ IconSet** icon_set=null, /*out*/ /*POINTER*/ int* size=null);
42718 void gtk_image_get_image(Image* this_, /*out*/ Gdk2.Image** gdk_image=null, /*out*/ Gdk2.Bitmap** mask=null);
42719 GdkPixbuf2.Pixbuf* gtk_image_get_pixbuf(Image* this_);
42720 int gtk_image_get_pixel_size(Image* this_);
42721 void gtk_image_get_pixmap(Image* this_, /*out*/ Gdk2.Pixmap** pixmap=null, /*out*/ Gdk2.Bitmap** mask=null);
42722 void gtk_image_get_stock(Image* this_, /*out*/ char** stock_id=null, /*out*/ /*POINTER*/ int* size=null);
42723 ImageType gtk_image_get_storage_type(Image* this_);
42724 void gtk_image_set(Image* this_, Gdk2.Image* val, Gdk2.Bitmap* mask);
42725 void gtk_image_set_from_animation(Image* this_, GdkPixbuf2.PixbufAnimation* animation);
42726 void gtk_image_set_from_file(Image* this_, char* filename=null);
42727 void gtk_image_set_from_gicon(Image* this_, Gio2.Icon* icon, int size);
42728 void gtk_image_set_from_icon_name(Image* this_, char* icon_name, int size);
42729 void gtk_image_set_from_icon_set(Image* this_, IconSet* icon_set, int size);
42730 void gtk_image_set_from_image(Image* this_, Gdk2.Image* gdk_image=null, Gdk2.Bitmap* mask=null);
42731 void gtk_image_set_from_pixbuf(Image* this_, GdkPixbuf2.Pixbuf* pixbuf=null);
42732 void gtk_image_set_from_pixmap(Image* this_, Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null);
42733 void gtk_image_set_from_stock(Image* this_, char* stock_id, int size);
42734 void gtk_image_set_pixel_size(Image* this_, int pixel_size);
42735 ImageMenuItem* gtk_image_menu_item_new();
42736 ImageMenuItem* gtk_image_menu_item_new_from_stock(char* stock_id, AccelGroup* accel_group=null);
42737 ImageMenuItem* gtk_image_menu_item_new_with_label(char* label);
42738 ImageMenuItem* gtk_image_menu_item_new_with_mnemonic(char* label);
42739 int gtk_image_menu_item_get_always_show_image(ImageMenuItem* this_);
42740 Widget* gtk_image_menu_item_get_image(ImageMenuItem* this_);
42741 int gtk_image_menu_item_get_use_stock(ImageMenuItem* this_);
42742 void gtk_image_menu_item_set_accel_group(ImageMenuItem* this_, AccelGroup* accel_group);
42743 void gtk_image_menu_item_set_always_show_image(ImageMenuItem* this_, int always_show);
42744 void gtk_image_menu_item_set_image(ImageMenuItem* this_, Widget* image=null);
42745 void gtk_image_menu_item_set_use_stock(ImageMenuItem* this_, int use_stock);
42746 InfoBar* gtk_info_bar_new();
42747 InfoBar* gtk_info_bar_new_with_buttons(char* first_button_text=null, ...);
42748 void gtk_info_bar_add_action_widget(InfoBar* this_, Widget* child, int response_id);
42749 Widget* gtk_info_bar_add_button(InfoBar* this_, char* button_text, int response_id);
42750 void gtk_info_bar_add_buttons(InfoBar* this_, char* first_button_text, ...);
42751 Widget* gtk_info_bar_get_action_area(InfoBar* this_);
42752 Widget* gtk_info_bar_get_content_area(InfoBar* this_);
42753 MessageType gtk_info_bar_get_message_type(InfoBar* this_);
42754 void gtk_info_bar_response(InfoBar* this_, int response_id);
42755 void gtk_info_bar_set_default_response(InfoBar* this_, int response_id);
42756 void gtk_info_bar_set_message_type(InfoBar* this_, MessageType message_type);
42757 void gtk_info_bar_set_response_sensitive(InfoBar* this_, int response_id, int setting);
42758 InputDialog* gtk_input_dialog_new();
42759 Invisible* gtk_invisible_new();
42760 Invisible* gtk_invisible_new_for_screen(Gdk2.Screen* screen);
42761 Gdk2.Screen* gtk_invisible_get_screen(Invisible* this_);
42762 void gtk_invisible_set_screen(Invisible* this_, Gdk2.Screen* screen);
42763 void gtk_item_factories_path_delete(char* ifactory_path, char* path);
42764 void gtk_item_deselect(Item* this_);
42765 void gtk_item_select(Item* this_);
42766 void gtk_item_toggle(Item* this_);
42767 ItemFactory* gtk_item_factory_new(Type container_type, char* path, AccelGroup* accel_group=null);
42768 void gtk_item_factory_add_foreign(Widget* accel_widget, char* full_path, AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifiers);
42769 void gtk_item_factory_create_menu_entries(uint n_entries, MenuEntry* entries);
42770 ItemFactory* gtk_item_factory_from_path(char* path);
42771 ItemFactory* gtk_item_factory_from_widget(Widget* widget);
42772 char* gtk_item_factory_path_from_widget(Widget* widget);
42773 void* gtk_item_factory_popup_data_from_widget(Widget* widget);
42774 void gtk_item_factory_construct(ItemFactory* this_, Type container_type, char* path, AccelGroup* accel_group);
42775 void gtk_item_factory_create_item(ItemFactory* this_, ItemFactoryEntry* entry, void* callback_data, uint callback_type);
42776 void gtk_item_factory_create_items(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries, void* callback_data);
42777 void gtk_item_factory_create_items_ac(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries, void* callback_data, uint callback_type);
42778 void gtk_item_factory_delete_entries(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries);
42779 void gtk_item_factory_delete_entry(ItemFactory* this_, ItemFactoryEntry* entry);
42780 void gtk_item_factory_delete_item(ItemFactory* this_, char* path);
42781 Widget* gtk_item_factory_get_item(ItemFactory* this_, char* path);
42782 Widget* gtk_item_factory_get_item_by_action(ItemFactory* this_, uint action);
42783 Widget* gtk_item_factory_get_widget(ItemFactory* this_, char* path);
42784 Widget* gtk_item_factory_get_widget_by_action(ItemFactory* this_, uint action);
42785 void gtk_item_factory_popup(ItemFactory* this_, uint x, uint y, uint mouse_button, uint time_);
42786 void* gtk_item_factory_popup_data(ItemFactory* this_);
42787 void gtk_item_factory_popup_with_data(ItemFactory* this_, void* popup_data, GLib2.DestroyNotify destroy, uint x, uint y, uint mouse_button, uint time_);
42788 void gtk_item_factory_set_translate_func(ItemFactory* this_, TranslateFunc func, void* data, GLib2.DestroyNotify notify);
42789 Label* gtk_label_new(char* str);
42790 Label* gtk_label_new_with_mnemonic(char* str);
42791 void gtk_label_get(Label* this_, char** str);
42792 double gtk_label_get_angle(Label* this_);
42793 Pango.AttrList* gtk_label_get_attributes(Label* this_);
42794 char* gtk_label_get_current_uri(Label* this_);
42795 Pango.EllipsizeMode gtk_label_get_ellipsize(Label* this_);
42796 Justification gtk_label_get_justify(Label* this_);
42797 char* gtk_label_get_label(Label* this_);
42798 Pango.Layout* gtk_label_get_layout(Label* this_);
42799 void gtk_label_get_layout_offsets(Label* this_, /*out*/ int* x=null, /*out*/ int* y=null);
42800 int gtk_label_get_line_wrap(Label* this_);
42801 Pango.WrapMode gtk_label_get_line_wrap_mode(Label* this_);
42802 int gtk_label_get_max_width_chars(Label* this_);
42803 uint gtk_label_get_mnemonic_keyval(Label* this_);
42804 Widget* gtk_label_get_mnemonic_widget(Label* this_);
42805 int gtk_label_get_selectable(Label* this_);
42806 int gtk_label_get_selection_bounds(Label* this_, /*out*/ int* start, /*out*/ int* end);
42807 int gtk_label_get_single_line_mode(Label* this_);
42808 char* gtk_label_get_text(Label* this_);
42809 int gtk_label_get_track_visited_links(Label* this_);
42810 int gtk_label_get_use_markup(Label* this_);
42811 int gtk_label_get_use_underline(Label* this_);
42812 int gtk_label_get_width_chars(Label* this_);
42813 uint gtk_label_parse_uline(Label* this_, char* string_);
42814 void gtk_label_select_region(Label* this_, int start_offset, int end_offset);
42815 void gtk_label_set_angle(Label* this_, double angle);
42816 void gtk_label_set_attributes(Label* this_, Pango.AttrList* attrs);
42817 void gtk_label_set_ellipsize(Label* this_, Pango.EllipsizeMode mode);
42818 void gtk_label_set_justify(Label* this_, Justification jtype);
42819 void gtk_label_set_label(Label* this_, char* str);
42820 void gtk_label_set_line_wrap(Label* this_, int wrap);
42821 void gtk_label_set_line_wrap_mode(Label* this_, Pango.WrapMode wrap_mode);
42822 void gtk_label_set_markup(Label* this_, char* str);
42823 void gtk_label_set_markup_with_mnemonic(Label* this_, char* str);
42824 void gtk_label_set_max_width_chars(Label* this_, int n_chars);
42825 void gtk_label_set_mnemonic_widget(Label* this_, Widget* widget=null);
42826 void gtk_label_set_pattern(Label* this_, char* pattern);
42827 void gtk_label_set_selectable(Label* this_, int setting);
42828 void gtk_label_set_single_line_mode(Label* this_, int single_line_mode);
42829 void gtk_label_set_text(Label* this_, char* str);
42830 void gtk_label_set_text_with_mnemonic(Label* this_, char* str);
42831 void gtk_label_set_track_visited_links(Label* this_, int track_links);
42832 void gtk_label_set_use_markup(Label* this_, int setting);
42833 void gtk_label_set_use_underline(Label* this_, int setting);
42834 void gtk_label_set_width_chars(Label* this_, int n_chars);
42835 Layout* gtk_layout_new(Adjustment* hadjustment=null, Adjustment* vadjustment=null);
42836 void gtk_layout_freeze(Layout* this_);
42837 Gdk2.Window* gtk_layout_get_bin_window(Layout* this_);
42838 Adjustment* gtk_layout_get_hadjustment(Layout* this_);
42839 void gtk_layout_get_size(Layout* this_, /*out*/ uint* width=null, /*out*/ uint* height=null);
42840 Adjustment* gtk_layout_get_vadjustment(Layout* this_);
42841 void gtk_layout_move(Layout* this_, Widget* child_widget, int x, int y);
42842 void gtk_layout_put(Layout* this_, Widget* child_widget, int x, int y);
42843 void gtk_layout_set_hadjustment(Layout* this_, Adjustment* adjustment=null);
42844 void gtk_layout_set_size(Layout* this_, uint width, uint height);
42845 void gtk_layout_set_vadjustment(Layout* this_, Adjustment* adjustment=null);
42846 void gtk_layout_thaw(Layout* this_);
42847 LinkButton* gtk_link_button_new(char* uri);
42848 LinkButton* gtk_link_button_new_with_label(char* uri, char* label=null);
42849 LinkButtonUriFunc gtk_link_button_set_uri_hook(LinkButtonUriFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null);
42850 char* gtk_link_button_get_uri(LinkButton* this_);
42851 int gtk_link_button_get_visited(LinkButton* this_);
42852 void gtk_link_button_set_uri(LinkButton* this_, char* uri);
42853 void gtk_link_button_set_visited(LinkButton* this_, int visited);
42854 List* gtk_list_new();
42855 void gtk_list_append_items(List* this_, GLib2.List* items);
42856 int gtk_list_child_position(List* this_, Widget* child);
42857 void gtk_list_clear_items(List* this_, int start, int end);
42858 void gtk_list_end_drag_selection(List* this_);
42859 void gtk_list_end_selection(List* this_);
42860 void gtk_list_extend_selection(List* this_, ScrollType scroll_type, float position, int auto_start_selection);
42861 void gtk_list_insert_items(List* this_, GLib2.List* items, int position);
42862 void gtk_list_prepend_items(List* this_, GLib2.List* items);
42863 void gtk_list_remove_items(List* this_, GLib2.List* items);
42864 void gtk_list_remove_items_no_unref(List* this_, GLib2.List* items);
42865 void gtk_list_scroll_horizontal(List* this_, ScrollType scroll_type, float position);
42866 void gtk_list_scroll_vertical(List* this_, ScrollType scroll_type, float position);
42867 void gtk_list_select_all(List* this_);
42868 void gtk_list_select_child(List* this_, Widget* child);
42869 void gtk_list_select_item(List* this_, int item);
42870 void gtk_list_set_selection_mode(List* this_, SelectionMode mode);
42871 void gtk_list_start_selection(List* this_);
42872 void gtk_list_toggle_add_mode(List* this_);
42873 void gtk_list_toggle_focus_row(List* this_);
42874 void gtk_list_toggle_row(List* this_, Widget* item);
42875 void gtk_list_undo_selection(List* this_);
42876 void gtk_list_unselect_all(List* this_);
42877 void gtk_list_unselect_child(List* this_, Widget* child);
42878 void gtk_list_unselect_item(List* this_, int item);
42879 ListItem* gtk_list_item_new();
42880 ListItem* gtk_list_item_new_with_label(char* label);
42881 void gtk_list_item_deselect(ListItem* this_);
42882 void gtk_list_item_select(ListItem* this_);
42883 ListStore* /*new*/ gtk_list_store_new(int n_columns, ...);
42884 ListStore* gtk_list_store_newv(int n_columns, Type* types);
42885 void gtk_list_store_append(ListStore* this_, /*out*/ TreeIter* iter);
42886 void gtk_list_store_clear(ListStore* this_);
42887 void gtk_list_store_insert(ListStore* this_, /*out*/ TreeIter* iter, int position);
42888 void gtk_list_store_insert_after(ListStore* this_, /*out*/ TreeIter* iter, TreeIter* sibling=null);
42889 void gtk_list_store_insert_before(ListStore* this_, /*out*/ TreeIter* iter, TreeIter* sibling=null);
42890 void gtk_list_store_insert_with_values(ListStore* this_, /*out*/ TreeIter* iter, int position, ...);
42891 void gtk_list_store_insert_with_valuesv(ListStore* this_, /*out*/ TreeIter* iter, int position, int* columns, GObject2.Value* values, int n_values);
42892 int gtk_list_store_iter_is_valid(ListStore* this_, TreeIter* iter);
42893 void gtk_list_store_move_after(ListStore* this_, TreeIter* iter, TreeIter* position=null);
42894 void gtk_list_store_move_before(ListStore* this_, TreeIter* iter, TreeIter* position=null);
42895 void gtk_list_store_prepend(ListStore* this_, /*out*/ TreeIter* iter);
42896 int gtk_list_store_remove(ListStore* this_, TreeIter* iter);
42897 void gtk_list_store_reorder(ListStore* this_, int* new_order);
42898 void gtk_list_store_set(ListStore* this_, TreeIter* iter, ...);
42899 void gtk_list_store_set_column_types(ListStore* this_, int n_columns, Type* types);
42900 void gtk_list_store_set_valist(ListStore* this_, TreeIter* iter, va_list var_args);
42901 void gtk_list_store_set_value(ListStore* this_, TreeIter* iter, int column, GObject2.Value* value);
42902 void gtk_list_store_set_valuesv(ListStore* this_, TreeIter* iter, int* columns, GObject2.Value* values, int n_values);
42903 void gtk_list_store_swap(ListStore* this_, TreeIter* a, TreeIter* b);
42904 Menu* gtk_menu_new();
42905 GLib2.List* gtk_menu_get_for_attach_widget(Widget* widget);
42906 void gtk_menu_attach(Menu* this_, Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
42907 void gtk_menu_attach_to_widget(Menu* this_, Widget* attach_widget, MenuDetachFunc detacher);
42908 void gtk_menu_detach(Menu* this_);
42909 AccelGroup* gtk_menu_get_accel_group(Menu* this_);
42910 char* gtk_menu_get_accel_path(Menu* this_);
42911 Widget* gtk_menu_get_active(Menu* this_);
42912 Widget* gtk_menu_get_attach_widget(Menu* this_);
42913 int gtk_menu_get_monitor(Menu* this_);
42914 int gtk_menu_get_reserve_toggle_size(Menu* this_);
42915 int gtk_menu_get_tearoff_state(Menu* this_);
42916 char* gtk_menu_get_title(Menu* this_);
42917 void gtk_menu_popdown(Menu* this_);
42918 void gtk_menu_popup(Menu* this_, Widget* parent_menu_shell, Widget* parent_menu_item, MenuPositionFunc func, void* data, uint button, uint activate_time);
42919 void gtk_menu_reorder_child(Menu* this_, Widget* child, int position);
42920 void gtk_menu_reposition(Menu* this_);
42921 void gtk_menu_set_accel_group(Menu* this_, AccelGroup* accel_group=null);
42922 void gtk_menu_set_accel_path(Menu* this_, char* accel_path=null);
42923 void gtk_menu_set_active(Menu* this_, uint index_);
42924 void gtk_menu_set_monitor(Menu* this_, int monitor_num);
42925 void gtk_menu_set_reserve_toggle_size(Menu* this_, int reserve_toggle_size);
42926 void gtk_menu_set_screen(Menu* this_, Gdk2.Screen* screen=null);
42927 void gtk_menu_set_tearoff_state(Menu* this_, int torn_off);
42928 void gtk_menu_set_title(Menu* this_, char* title);
42929 MenuBar* gtk_menu_bar_new();
42930 PackDirection gtk_menu_bar_get_child_pack_direction(MenuBar* this_);
42931 PackDirection gtk_menu_bar_get_pack_direction(MenuBar* this_);
42932 void gtk_menu_bar_set_child_pack_direction(MenuBar* this_, PackDirection child_pack_dir);
42933 void gtk_menu_bar_set_pack_direction(MenuBar* this_, PackDirection pack_dir);
42934 MenuItem* gtk_menu_item_new();
42935 MenuItem* gtk_menu_item_new_with_label(char* label);
42936 MenuItem* gtk_menu_item_new_with_mnemonic(char* label);
42937 void gtk_menu_item_activate(MenuItem* this_);
42938 void gtk_menu_item_deselect(MenuItem* this_);
42939 char* gtk_menu_item_get_accel_path(MenuItem* this_);
42940 char* gtk_menu_item_get_label(MenuItem* this_);
42941 int gtk_menu_item_get_right_justified(MenuItem* this_);
42942 Widget* gtk_menu_item_get_submenu(MenuItem* this_);
42943 int gtk_menu_item_get_use_underline(MenuItem* this_);
42944 void gtk_menu_item_remove_submenu(MenuItem* this_);
42945 void gtk_menu_item_select(MenuItem* this_);
42946 void gtk_menu_item_set_accel_path(MenuItem* this_, char* accel_path=null);
42947 void gtk_menu_item_set_label(MenuItem* this_, char* label);
42948 void gtk_menu_item_set_right_justified(MenuItem* this_, int right_justified);
42949 void gtk_menu_item_set_submenu(MenuItem* this_, Widget* submenu=null);
42950 void gtk_menu_item_set_use_underline(MenuItem* this_, int setting);
42951 void gtk_menu_item_toggle_size_allocate(MenuItem* this_, int allocation);
42952 void gtk_menu_item_toggle_size_request(MenuItem* this_, int* requisition);
42953 void gtk_menu_shell_activate_item(MenuShell* this_, Widget* menu_item, int force_deactivate);
42954 void gtk_menu_shell_append(MenuShell* this_, Widget* child);
42955 void gtk_menu_shell_cancel(MenuShell* this_);
42956 void gtk_menu_shell_deactivate(MenuShell* this_);
42957 void gtk_menu_shell_deselect(MenuShell* this_);
42958 int gtk_menu_shell_get_take_focus(MenuShell* this_);
42959 void gtk_menu_shell_insert(MenuShell* this_, Widget* child, int position);
42960 void gtk_menu_shell_prepend(MenuShell* this_, Widget* child);
42961 void gtk_menu_shell_select_first(MenuShell* this_, int search_sensitive);
42962 void gtk_menu_shell_select_item(MenuShell* this_, Widget* menu_item);
42963 void gtk_menu_shell_set_take_focus(MenuShell* this_, int take_focus);
42964 MenuToolButton* gtk_menu_tool_button_new(Widget* icon_widget=null, char* label=null);
42965 MenuToolButton* gtk_menu_tool_button_new_from_stock(char* stock_id);
42966 Widget* gtk_menu_tool_button_get_menu(MenuToolButton* this_);
42967 void gtk_menu_tool_button_set_arrow_tooltip(MenuToolButton* this_, Tooltips* tooltips, char* tip_text=null, char* tip_private=null);
42968 void gtk_menu_tool_button_set_arrow_tooltip_markup(MenuToolButton* this_, char* markup);
42969 void gtk_menu_tool_button_set_arrow_tooltip_text(MenuToolButton* this_, char* text);
42970 void gtk_menu_tool_button_set_menu(MenuToolButton* this_, Widget* menu);
42971 MessageDialog* gtk_message_dialog_new(Window* parent, DialogFlags flags, MessageType type, ButtonsType buttons, char* message_format=null, ...);
42972 MessageDialog* gtk_message_dialog_new_with_markup(Window* parent, DialogFlags flags, MessageType type, ButtonsType buttons, char* message_format=null, ...);
42973 void gtk_message_dialog_format_secondary_markup(MessageDialog* this_, char* message_format, ...);
42974 void gtk_message_dialog_format_secondary_text(MessageDialog* this_, char* message_format=null, ...);
42975 Widget* gtk_message_dialog_get_image(MessageDialog* this_);
42976 Widget* gtk_message_dialog_get_message_area(MessageDialog* this_);
42977 void gtk_message_dialog_set_image(MessageDialog* this_, Widget* image);
42978 void gtk_message_dialog_set_markup(MessageDialog* this_, char* str);
42979 void gtk_misc_get_alignment(Misc* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null);
42980 void gtk_misc_get_padding(Misc* this_, /*out*/ int* xpad=null, /*out*/ int* ypad=null);
42981 void gtk_misc_set_alignment(Misc* this_, float xalign, float yalign);
42982 void gtk_misc_set_padding(Misc* this_, int xpad, int ypad);
42983 MountOperation* /*new*/ gtk_mount_operation_new(Window* parent=null);
42984 Window* gtk_mount_operation_get_parent(MountOperation* this_);
42985 Gdk2.Screen* gtk_mount_operation_get_screen(MountOperation* this_);
42986 int gtk_mount_operation_is_showing(MountOperation* this_);
42987 void gtk_mount_operation_set_parent(MountOperation* this_, Window* parent=null);
42988 void gtk_mount_operation_set_screen(MountOperation* this_, Gdk2.Screen* screen);
42989 Notebook* gtk_notebook_new();
42990 void gtk_notebook_set_window_creation_hook(NotebookWindowCreationFunc func, void* data, GLib2.DestroyNotify destroy=null);
42991 int gtk_notebook_append_page(Notebook* this_, Widget* child, Widget* tab_label=null);
42992 int gtk_notebook_append_page_menu(Notebook* this_, Widget* child, Widget* tab_label=null, Widget* menu_label=null);
42993 Widget* gtk_notebook_get_action_widget(Notebook* this_, PackType pack_type);
42994 int gtk_notebook_get_current_page(Notebook* this_);
42995 void* gtk_notebook_get_group(Notebook* this_);
42996 int gtk_notebook_get_group_id(Notebook* this_);
42997 char* gtk_notebook_get_group_name(Notebook* this_);
42998 Widget* gtk_notebook_get_menu_label(Notebook* this_, Widget* child);
42999 char* gtk_notebook_get_menu_label_text(Notebook* this_, Widget* child);
43000 int gtk_notebook_get_n_pages(Notebook* this_);
43001 Widget* gtk_notebook_get_nth_page(Notebook* this_, int page_num);
43002 int gtk_notebook_get_scrollable(Notebook* this_);
43003 int gtk_notebook_get_show_border(Notebook* this_);
43004 int gtk_notebook_get_show_tabs(Notebook* this_);
43005 int gtk_notebook_get_tab_detachable(Notebook* this_, Widget* child);
43006 ushort gtk_notebook_get_tab_hborder(Notebook* this_);
43007 Widget* gtk_notebook_get_tab_label(Notebook* this_, Widget* child);
43008 char* gtk_notebook_get_tab_label_text(Notebook* this_, Widget* child);
43009 PositionType gtk_notebook_get_tab_pos(Notebook* this_);
43010 int gtk_notebook_get_tab_reorderable(Notebook* this_, Widget* child);
43011 ushort gtk_notebook_get_tab_vborder(Notebook* this_);
43012 int gtk_notebook_insert_page(Notebook* this_, Widget* child, Widget* tab_label, int position);
43013 int gtk_notebook_insert_page_menu(Notebook* this_, Widget* child, Widget* tab_label, Widget* menu_label, int position);
43014 void gtk_notebook_next_page(Notebook* this_);
43015 int gtk_notebook_page_num(Notebook* this_, Widget* child);
43016 void gtk_notebook_popup_disable(Notebook* this_);
43017 void gtk_notebook_popup_enable(Notebook* this_);
43018 int gtk_notebook_prepend_page(Notebook* this_, Widget* child, Widget* tab_label=null);
43019 int gtk_notebook_prepend_page_menu(Notebook* this_, Widget* child, Widget* tab_label=null, Widget* menu_label=null);
43020 void gtk_notebook_prev_page(Notebook* this_);
43021 void gtk_notebook_query_tab_label_packing(Notebook* this_, Widget* child, int* expand, int* fill, PackType* pack_type);
43022 void gtk_notebook_remove_page(Notebook* this_, int page_num);
43023 void gtk_notebook_reorder_child(Notebook* this_, Widget* child, int position);
43024 void gtk_notebook_set_action_widget(Notebook* this_, Widget* widget, PackType pack_type);
43025 void gtk_notebook_set_current_page(Notebook* this_, int page_num);
43026 void gtk_notebook_set_group(Notebook* this_, void* group=null);
43027 void gtk_notebook_set_group_id(Notebook* this_, int group_id);
43028 void gtk_notebook_set_group_name(Notebook* this_, char* group_name);
43029 void gtk_notebook_set_homogeneous_tabs(Notebook* this_, int homogeneous);
43030 void gtk_notebook_set_menu_label(Notebook* this_, Widget* child, Widget* menu_label=null);
43031 void gtk_notebook_set_menu_label_text(Notebook* this_, Widget* child, char* menu_text);
43032 void gtk_notebook_set_scrollable(Notebook* this_, int scrollable);
43033 void gtk_notebook_set_show_border(Notebook* this_, int show_border);
43034 void gtk_notebook_set_show_tabs(Notebook* this_, int show_tabs);
43035 void gtk_notebook_set_tab_border(Notebook* this_, uint border_width);
43036 void gtk_notebook_set_tab_detachable(Notebook* this_, Widget* child, int detachable);
43037 void gtk_notebook_set_tab_hborder(Notebook* this_, uint tab_hborder);
43038 void gtk_notebook_set_tab_label(Notebook* this_, Widget* child, Widget* tab_label=null);
43039 void gtk_notebook_set_tab_label_packing(Notebook* this_, Widget* child, int expand, int fill, PackType pack_type);
43040 void gtk_notebook_set_tab_label_text(Notebook* this_, Widget* child, char* tab_text);
43041 void gtk_notebook_set_tab_pos(Notebook* this_, PositionType pos);
43042 void gtk_notebook_set_tab_reorderable(Notebook* this_, Widget* child, int reorderable);
43043 void gtk_notebook_set_tab_vborder(Notebook* this_, uint tab_vborder);
43044 Object* gtk_object_new(Type type, char* first_property_name, ...);
43045 void gtk_object_add_arg_type(char* arg_name, Type arg_type, uint arg_flags, uint arg_id);
43046 void gtk_object_destroy(Object* this_);
43047 void gtk_object_get(Object* this_, char* first_property_name, ...);
43048 void* gtk_object_get_data(Object* this_, char* key);
43049 void* gtk_object_get_data_by_id(Object* this_, GLib2.Quark data_id);
43050 void* gtk_object_get_user_data(Object* this_);
43051 Object* gtk_object_ref(Object* this_);
43052 void gtk_object_remove_data(Object* this_, char* key);
43053 void gtk_object_remove_data_by_id(Object* this_, GLib2.Quark data_id);
43054 void gtk_object_remove_no_notify(Object* this_, char* key);
43055 void gtk_object_remove_no_notify_by_id(Object* this_, GLib2.Quark key_id);
43056 void gtk_object_set(Object* this_, char* first_property_name, ...);
43057 void gtk_object_set_data(Object* this_, char* key, void* data);
43058 void gtk_object_set_data_by_id(Object* this_, GLib2.Quark data_id, void* data);
43059 void gtk_object_set_data_by_id_full(Object* this_, GLib2.Quark data_id, void* data, GLib2.DestroyNotify destroy);
43060 void gtk_object_set_data_full(Object* this_, char* key, void* data, GLib2.DestroyNotify destroy);
43061 void gtk_object_set_user_data(Object* this_, void* data);
43062 void gtk_object_sink(Object* this_);
43063 void gtk_object_unref(Object* this_);
43064 void gtk_object_weakref(Object* this_, GLib2.DestroyNotify notify, void* data);
43065 void gtk_object_weakunref(Object* this_, GLib2.DestroyNotify notify, void* data);
43066 OffscreenWindow* gtk_offscreen_window_new();
43067 GdkPixbuf2.Pixbuf* /*new*/ gtk_offscreen_window_get_pixbuf(OffscreenWindow* this_);
43068 Gdk2.Pixmap* gtk_offscreen_window_get_pixmap(OffscreenWindow* this_);
43069 void gtk_old_editable_changed(OldEditable* this_);
43070 void gtk_old_editable_claim_selection(OldEditable* this_, int claim, uint time_);
43071 OptionMenu* gtk_option_menu_new();
43072 int gtk_option_menu_get_history(OptionMenu* this_);
43073 Widget* gtk_option_menu_get_menu(OptionMenu* this_);
43074 void gtk_option_menu_remove_menu(OptionMenu* this_);
43075 void gtk_option_menu_set_history(OptionMenu* this_, uint index_);
43076 void gtk_option_menu_set_menu(OptionMenu* this_, Widget* menu);
43077 Orientation gtk_orientable_get_orientation(Orientable* this_);
43078 void gtk_orientable_set_orientation(Orientable* this_, Orientation orientation);
43079 PageSetup* /*new*/ gtk_page_setup_new();
43080 PageSetup* /*new*/ gtk_page_setup_new_from_file(char* file_name, GLib2.Error** error);
43081 PageSetup* /*new*/ gtk_page_setup_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
43082 PageSetup* /*new*/ gtk_page_setup_copy(PageSetup* this_);
43083 double gtk_page_setup_get_bottom_margin(PageSetup* this_, Unit unit);
43084 double gtk_page_setup_get_left_margin(PageSetup* this_, Unit unit);
43085 PageOrientation gtk_page_setup_get_orientation(PageSetup* this_);
43086 double gtk_page_setup_get_page_height(PageSetup* this_, Unit unit);
43087 double gtk_page_setup_get_page_width(PageSetup* this_, Unit unit);
43088 double gtk_page_setup_get_paper_height(PageSetup* this_, Unit unit);
43089 PaperSize* /*new*/ gtk_page_setup_get_paper_size(PageSetup* this_);
43090 double gtk_page_setup_get_paper_width(PageSetup* this_, Unit unit);
43091 double gtk_page_setup_get_right_margin(PageSetup* this_, Unit unit);
43092 double gtk_page_setup_get_top_margin(PageSetup* this_, Unit unit);
43093 int gtk_page_setup_load_file(PageSetup* this_, char* file_name, GLib2.Error** error);
43094 int gtk_page_setup_load_key_file(PageSetup* this_, GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
43095 void gtk_page_setup_set_bottom_margin(PageSetup* this_, double margin, Unit unit);
43096 void gtk_page_setup_set_left_margin(PageSetup* this_, double margin, Unit unit);
43097 void gtk_page_setup_set_orientation(PageSetup* this_, PageOrientation orientation);
43098 void gtk_page_setup_set_paper_size(PageSetup* this_, PaperSize* size);
43099 void gtk_page_setup_set_paper_size_and_default_margins(PageSetup* this_, PaperSize* size);
43100 void gtk_page_setup_set_right_margin(PageSetup* this_, double margin, Unit unit);
43101 void gtk_page_setup_set_top_margin(PageSetup* this_, double margin, Unit unit);
43102 int gtk_page_setup_to_file(PageSetup* this_, char* file_name, GLib2.Error** error);
43103 void gtk_page_setup_to_key_file(PageSetup* this_, GLib2.KeyFile* key_file, char* group_name);
43104 void gtk_paned_add1(Paned* this_, Widget* child);
43105 void gtk_paned_add2(Paned* this_, Widget* child);
43106 void gtk_paned_compute_position(Paned* this_, int allocation, int child1_req, int child2_req);
43107 Widget* gtk_paned_get_child1(Paned* this_);
43108 Widget* gtk_paned_get_child2(Paned* this_);
43109 Gdk2.Window* gtk_paned_get_handle_window(Paned* this_);
43110 int gtk_paned_get_position(Paned* this_);
43111 void gtk_paned_pack1(Paned* this_, Widget* child, int resize, int shrink);
43112 void gtk_paned_pack2(Paned* this_, Widget* child, int resize, int shrink);
43113 void gtk_paned_set_position(Paned* this_, int position);
43114 PaperSize* /*new*/ gtk_paper_size_new(char* name=null);
43115 PaperSize* /*new*/ gtk_paper_size_new_custom(char* name, char* display_name, double width, double height, Unit unit);
43116 PaperSize* /*new*/ gtk_paper_size_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
43117 PaperSize* /*new*/ gtk_paper_size_new_from_ppd(char* ppd_name, char* ppd_display_name, double width, double height);
43118 PaperSize* /*new*/ gtk_paper_size_copy(PaperSize* this_);
43119 void gtk_paper_size_free(PaperSize* this_);
43120 double gtk_paper_size_get_default_bottom_margin(PaperSize* this_, Unit unit);
43121 double gtk_paper_size_get_default_left_margin(PaperSize* this_, Unit unit);
43122 double gtk_paper_size_get_default_right_margin(PaperSize* this_, Unit unit);
43123 double gtk_paper_size_get_default_top_margin(PaperSize* this_, Unit unit);
43124 char* gtk_paper_size_get_display_name(PaperSize* this_);
43125 double gtk_paper_size_get_height(PaperSize* this_, Unit unit);
43126 char* gtk_paper_size_get_name(PaperSize* this_);
43127 char* gtk_paper_size_get_ppd_name(PaperSize* this_);
43128 double gtk_paper_size_get_width(PaperSize* this_, Unit unit);
43129 int gtk_paper_size_is_custom(PaperSize* this_);
43130 int gtk_paper_size_is_equal(PaperSize* this_, PaperSize* size2);
43131 void gtk_paper_size_set_size(PaperSize* this_, double width, double height, Unit unit);
43132 void gtk_paper_size_to_key_file(PaperSize* this_, GLib2.KeyFile* key_file, char* group_name);
43133 Pixmap* gtk_pixmap_new(Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
43134 void gtk_pixmap_get(Pixmap* this_, Gdk2.Pixmap** val, Gdk2.Bitmap** mask);
43135 void gtk_pixmap_set(Pixmap* this_, Gdk2.Pixmap* val, Gdk2.Bitmap* mask);
43136 void gtk_pixmap_set_build_insensitive(Pixmap* this_, int build);
43137 Plug* gtk_plug_new(Gdk2.NativeWindow socket_id);
43138 Plug* gtk_plug_new_for_display(Gdk2.Display* display, Gdk2.NativeWindow socket_id);
43139 void gtk_plug_construct(Plug* this_, Gdk2.NativeWindow socket_id);
43140 void gtk_plug_construct_for_display(Plug* this_, Gdk2.Display* display, Gdk2.NativeWindow socket_id);
43141 int gtk_plug_get_embedded(Plug* this_);
43142 Gdk2.NativeWindow gtk_plug_get_id(Plug* this_);
43143 Gdk2.Window* gtk_plug_get_socket_window(Plug* this_);
43144 Preview* gtk_preview_new(PreviewType type);
43145 Gdk2.Colormap* gtk_preview_get_cmap();
43146 PreviewInfo* gtk_preview_get_info();
43147 Gdk2.Visual* gtk_preview_get_visual();
43148 void gtk_preview_reset();
43149 void gtk_preview_set_color_cube(uint nred_shades, uint ngreen_shades, uint nblue_shades, uint ngray_shades);
43150 void gtk_preview_set_gamma(double gamma_);
43151 void gtk_preview_set_install_cmap(int install_cmap);
43152 void gtk_preview_set_reserved(int nreserved);
43153 void gtk_preview_uninit();
43154 void gtk_preview_draw_row(Preview* this_, ubyte* data, int x, int y, int w);
43155 void gtk_preview_put(Preview* this_, Gdk2.Window* window, Gdk2.GC* gc, int srcx, int srcy, int destx, int desty, int width, int height);
43156 void gtk_preview_set_dither(Preview* this_, Gdk2.RgbDither dither);
43157 void gtk_preview_set_expand(Preview* this_, int expand);
43158 void gtk_preview_size(Preview* this_, int width, int height);
43159 Pango.Context* /*new*/ gtk_print_context_create_pango_context(PrintContext* this_);
43160 Pango.Layout* /*new*/ gtk_print_context_create_pango_layout(PrintContext* this_);
43161 cairo.Context* gtk_print_context_get_cairo_context(PrintContext* this_);
43162 double gtk_print_context_get_dpi_x(PrintContext* this_);
43163 double gtk_print_context_get_dpi_y(PrintContext* this_);
43164 int gtk_print_context_get_hard_margins(PrintContext* this_, /*out*/ double* top, /*out*/ double* bottom, /*out*/ double* left, /*out*/ double* right);
43165 double gtk_print_context_get_height(PrintContext* this_);
43166 PageSetup* gtk_print_context_get_page_setup(PrintContext* this_);
43167 Pango.FontMap* gtk_print_context_get_pango_fontmap(PrintContext* this_);
43168 double gtk_print_context_get_width(PrintContext* this_);
43169 void gtk_print_context_set_cairo_context(PrintContext* this_, cairo.Context* cr, double dpi_x, double dpi_y);
43170 PrintOperation* /*new*/ gtk_print_operation_new();
43171 void gtk_print_operation_cancel(PrintOperation* this_);
43172 void gtk_print_operation_draw_page_finish(PrintOperation* this_);
43173 PageSetup* gtk_print_operation_get_default_page_setup(PrintOperation* this_);
43174 int gtk_print_operation_get_embed_page_setup(PrintOperation* this_);
43175 void gtk_print_operation_get_error(PrintOperation* this_, GLib2.Error** error);
43176 int gtk_print_operation_get_has_selection(PrintOperation* this_);
43177 int gtk_print_operation_get_n_pages_to_print(PrintOperation* this_);
43178 PrintSettings* gtk_print_operation_get_print_settings(PrintOperation* this_);
43179 PrintStatus gtk_print_operation_get_status(PrintOperation* this_);
43180 char* gtk_print_operation_get_status_string(PrintOperation* this_);
43181 int gtk_print_operation_get_support_selection(PrintOperation* this_);
43182 int gtk_print_operation_is_finished(PrintOperation* this_);
43183 PrintOperationResult gtk_print_operation_run(PrintOperation* this_, PrintOperationAction action, Window* parent, GLib2.Error** error);
43184 void gtk_print_operation_set_allow_async(PrintOperation* this_, int allow_async);
43185 void gtk_print_operation_set_current_page(PrintOperation* this_, int current_page);
43186 void gtk_print_operation_set_custom_tab_label(PrintOperation* this_, char* label=null);
43187 void gtk_print_operation_set_default_page_setup(PrintOperation* this_, PageSetup* default_page_setup=null);
43188 void gtk_print_operation_set_defer_drawing(PrintOperation* this_);
43189 void gtk_print_operation_set_embed_page_setup(PrintOperation* this_, int embed);
43190 void gtk_print_operation_set_export_filename(PrintOperation* this_, char* filename);
43191 void gtk_print_operation_set_has_selection(PrintOperation* this_, int has_selection);
43192 void gtk_print_operation_set_job_name(PrintOperation* this_, char* job_name);
43193 void gtk_print_operation_set_n_pages(PrintOperation* this_, int n_pages);
43194 void gtk_print_operation_set_print_settings(PrintOperation* this_, PrintSettings* print_settings=null);
43195 void gtk_print_operation_set_show_progress(PrintOperation* this_, int show_progress);
43196 void gtk_print_operation_set_support_selection(PrintOperation* this_, int support_selection);
43197 void gtk_print_operation_set_track_print_status(PrintOperation* this_, int track_status);
43198 void gtk_print_operation_set_unit(PrintOperation* this_, Unit unit);
43199 void gtk_print_operation_set_use_full_page(PrintOperation* this_, int full_page);
43200 void gtk_print_operation_preview_end_preview(PrintOperationPreview* this_);
43201 int gtk_print_operation_preview_is_selected(PrintOperationPreview* this_, int page_nr);
43202 void gtk_print_operation_preview_render_page(PrintOperationPreview* this_, int page_nr);
43203 PrintSettings* /*new*/ gtk_print_settings_new();
43204 PrintSettings* /*new*/ gtk_print_settings_new_from_file(char* file_name, GLib2.Error** error);
43205 PrintSettings* /*new*/ gtk_print_settings_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
43206 PrintSettings* /*new*/ gtk_print_settings_copy(PrintSettings* this_);
43207 void gtk_print_settings_foreach(PrintSettings* this_, PrintSettingsFunc func, void* user_data);
43208 char* gtk_print_settings_get(PrintSettings* this_, char* key);
43209 int gtk_print_settings_get_bool(PrintSettings* this_, char* key);
43210 int gtk_print_settings_get_collate(PrintSettings* this_);
43211 char* gtk_print_settings_get_default_source(PrintSettings* this_);
43212 char* gtk_print_settings_get_dither(PrintSettings* this_);
43213 double gtk_print_settings_get_double(PrintSettings* this_, char* key);
43214 double gtk_print_settings_get_double_with_default(PrintSettings* this_, char* key, double def);
43215 PrintDuplex gtk_print_settings_get_duplex(PrintSettings* this_);
43216 char* gtk_print_settings_get_finishings(PrintSettings* this_);
43217 int gtk_print_settings_get_int(PrintSettings* this_, char* key);
43218 int gtk_print_settings_get_int_with_default(PrintSettings* this_, char* key, int def);
43219 double gtk_print_settings_get_length(PrintSettings* this_, char* key, Unit unit);
43220 char* gtk_print_settings_get_media_type(PrintSettings* this_);
43221 int gtk_print_settings_get_n_copies(PrintSettings* this_);
43222 int gtk_print_settings_get_number_up(PrintSettings* this_);
43223 NumberUpLayout gtk_print_settings_get_number_up_layout(PrintSettings* this_);
43224 PageOrientation gtk_print_settings_get_orientation(PrintSettings* this_);
43225 char* gtk_print_settings_get_output_bin(PrintSettings* this_);
43226 PageRange* /*new*/ gtk_print_settings_get_page_ranges(PrintSettings* this_, /*out*/ int* num_ranges);
43227 PageSet gtk_print_settings_get_page_set(PrintSettings* this_);
43228 double gtk_print_settings_get_paper_height(PrintSettings* this_, Unit unit);
43229 PaperSize* /*new*/ gtk_print_settings_get_paper_size(PrintSettings* this_);
43230 double gtk_print_settings_get_paper_width(PrintSettings* this_, Unit unit);
43231 PrintPages gtk_print_settings_get_print_pages(PrintSettings* this_);
43232 char* gtk_print_settings_get_printer(PrintSettings* this_);
43233 double gtk_print_settings_get_printer_lpi(PrintSettings* this_);
43234 PrintQuality gtk_print_settings_get_quality(PrintSettings* this_);
43235 int gtk_print_settings_get_resolution(PrintSettings* this_);
43236 int gtk_print_settings_get_resolution_x(PrintSettings* this_);
43237 int gtk_print_settings_get_resolution_y(PrintSettings* this_);
43238 int gtk_print_settings_get_reverse(PrintSettings* this_);
43239 double gtk_print_settings_get_scale(PrintSettings* this_);
43240 int gtk_print_settings_get_use_color(PrintSettings* this_);
43241 int gtk_print_settings_has_key(PrintSettings* this_, char* key);
43242 int gtk_print_settings_load_file(PrintSettings* this_, char* file_name, GLib2.Error** error);
43243 int gtk_print_settings_load_key_file(PrintSettings* this_, GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
43244 void gtk_print_settings_set(PrintSettings* this_, char* key, char* value=null);
43245 void gtk_print_settings_set_bool(PrintSettings* this_, char* key, int value);
43246 void gtk_print_settings_set_collate(PrintSettings* this_, int collate);
43247 void gtk_print_settings_set_default_source(PrintSettings* this_, char* default_source);
43248 void gtk_print_settings_set_dither(PrintSettings* this_, char* dither);
43249 void gtk_print_settings_set_double(PrintSettings* this_, char* key, double value);
43250 void gtk_print_settings_set_duplex(PrintSettings* this_, PrintDuplex duplex);
43251 void gtk_print_settings_set_finishings(PrintSettings* this_, char* finishings);
43252 void gtk_print_settings_set_int(PrintSettings* this_, char* key, int value);
43253 void gtk_print_settings_set_length(PrintSettings* this_, char* key, double value, Unit unit);
43254 void gtk_print_settings_set_media_type(PrintSettings* this_, char* media_type);
43255 void gtk_print_settings_set_n_copies(PrintSettings* this_, int num_copies);
43256 void gtk_print_settings_set_number_up(PrintSettings* this_, int number_up);
43257 void gtk_print_settings_set_number_up_layout(PrintSettings* this_, NumberUpLayout number_up_layout);
43258 void gtk_print_settings_set_orientation(PrintSettings* this_, PageOrientation orientation);
43259 void gtk_print_settings_set_output_bin(PrintSettings* this_, char* output_bin);
43260 void gtk_print_settings_set_page_ranges(PrintSettings* this_, PageRange* page_ranges, int num_ranges);
43261 void gtk_print_settings_set_page_set(PrintSettings* this_, PageSet page_set);
43262 void gtk_print_settings_set_paper_height(PrintSettings* this_, double height, Unit unit);
43263 void gtk_print_settings_set_paper_size(PrintSettings* this_, PaperSize* paper_size);
43264 void gtk_print_settings_set_paper_width(PrintSettings* this_, double width, Unit unit);
43265 void gtk_print_settings_set_print_pages(PrintSettings* this_, PrintPages pages);
43266 void gtk_print_settings_set_printer(PrintSettings* this_, char* printer);
43267 void gtk_print_settings_set_printer_lpi(PrintSettings* this_, double lpi);
43268 void gtk_print_settings_set_quality(PrintSettings* this_, PrintQuality quality);
43269 void gtk_print_settings_set_resolution(PrintSettings* this_, int resolution);
43270 void gtk_print_settings_set_resolution_xy(PrintSettings* this_, int resolution_x, int resolution_y);
43271 void gtk_print_settings_set_reverse(PrintSettings* this_, int reverse);
43272 void gtk_print_settings_set_scale(PrintSettings* this_, double scale);
43273 void gtk_print_settings_set_use_color(PrintSettings* this_, int use_color);
43274 int gtk_print_settings_to_file(PrintSettings* this_, char* file_name, GLib2.Error** error);
43275 void gtk_print_settings_to_key_file(PrintSettings* this_, GLib2.KeyFile* key_file, char* group_name);
43276 void gtk_print_settings_unset(PrintSettings* this_, char* key);
43277 void gtk_progress_configure(Progress* this_, double value, double min, double max);
43278 double gtk_progress_get_current_percentage(Progress* this_);
43279 char* /*new*/ gtk_progress_get_current_text(Progress* this_);
43280 double gtk_progress_get_percentage_from_value(Progress* this_, double value);
43281 char* /*new*/ gtk_progress_get_text_from_value(Progress* this_, double value);
43282 double gtk_progress_get_value(Progress* this_);
43283 void gtk_progress_set_activity_mode(Progress* this_, int activity_mode);
43284 void gtk_progress_set_adjustment(Progress* this_, Adjustment* adjustment);
43285 void gtk_progress_set_format_string(Progress* this_, char* format);
43286 void gtk_progress_set_percentage(Progress* this_, double percentage);
43287 void gtk_progress_set_show_text(Progress* this_, int show_text);
43288 void gtk_progress_set_text_alignment(Progress* this_, float x_align, float y_align);
43289 void gtk_progress_set_value(Progress* this_, double value);
43290 ProgressBar* gtk_progress_bar_new();
43291 ProgressBar* gtk_progress_bar_new_with_adjustment(Adjustment* adjustment=null);
43292 Pango.EllipsizeMode gtk_progress_bar_get_ellipsize(ProgressBar* this_);
43293 double gtk_progress_bar_get_fraction(ProgressBar* this_);
43294 ProgressBarOrientation gtk_progress_bar_get_orientation(ProgressBar* this_);
43295 double gtk_progress_bar_get_pulse_step(ProgressBar* this_);
43296 char* gtk_progress_bar_get_text(ProgressBar* this_);
43297 void gtk_progress_bar_pulse(ProgressBar* this_);
43298 void gtk_progress_bar_set_activity_blocks(ProgressBar* this_, uint blocks);
43299 void gtk_progress_bar_set_activity_step(ProgressBar* this_, uint step);
43300 void gtk_progress_bar_set_bar_style(ProgressBar* this_, ProgressBarStyle style);
43301 void gtk_progress_bar_set_discrete_blocks(ProgressBar* this_, uint blocks);
43302 void gtk_progress_bar_set_ellipsize(ProgressBar* this_, Pango.EllipsizeMode mode);
43303 void gtk_progress_bar_set_fraction(ProgressBar* this_, double fraction);
43304 void gtk_progress_bar_set_orientation(ProgressBar* this_, ProgressBarOrientation orientation);
43305 void gtk_progress_bar_set_pulse_step(ProgressBar* this_, double fraction);
43306 void gtk_progress_bar_set_text(ProgressBar* this_, char* text=null);
43307 void gtk_progress_bar_update(ProgressBar* this_, double percentage);
43308 RadioAction* /*new*/ gtk_radio_action_new(char* name, char* label, char* tooltip, char* stock_id, int value);
43309 int gtk_radio_action_get_current_value(RadioAction* this_);
43310 GLib2.SList* gtk_radio_action_get_group(RadioAction* this_);
43311 void gtk_radio_action_set_current_value(RadioAction* this_, int current_value);
43312 void gtk_radio_action_set_group(RadioAction* this_, GLib2.SList* group);
43313 RadioButton* gtk_radio_button_new(GLib2.SList* group=null);
43314 RadioButton* gtk_radio_button_new_with_label(GLib2.SList* group, char* label);
43315 RadioButton* gtk_radio_button_new_with_label_from_widget(RadioButton* radio_group_member, char* label);
43316 RadioButton* gtk_radio_button_new_with_mnemonic(GLib2.SList* group, char* label);
43317 RadioButton* gtk_radio_button_new_with_mnemonic_from_widget(RadioButton* radio_group_member, char* label);
43318 GLib2.SList* gtk_radio_button_get_group(RadioButton* this_);
43319 Widget* gtk_radio_button_new_from_widget(RadioButton* this_);
43320 void gtk_radio_button_set_group(RadioButton* this_, GLib2.SList* group);
43321 RadioMenuItem* gtk_radio_menu_item_new(GLib2.SList* group);
43322 RadioMenuItem* gtk_radio_menu_item_new_with_label(GLib2.SList* group, char* label);
43323 RadioMenuItem* gtk_radio_menu_item_new_with_mnemonic(GLib2.SList* group, char* label);
43324 GLib2.SList* gtk_radio_menu_item_get_group(RadioMenuItem* this_);
43325 Widget* gtk_radio_menu_item_new_from_widget(RadioMenuItem* this_);
43326 Widget* gtk_radio_menu_item_new_with_label_from_widget(RadioMenuItem* this_, char* label);
43327 Widget* gtk_radio_menu_item_new_with_mnemonic_from_widget(RadioMenuItem* this_, char* label);
43328 void gtk_radio_menu_item_set_group(RadioMenuItem* this_, GLib2.SList* group);
43329 RadioToolButton* gtk_radio_tool_button_new(GLib2.SList* group=null);
43330 RadioToolButton* gtk_radio_tool_button_new_from_stock(GLib2.SList* group, char* stock_id);
43331 GLib2.SList* gtk_radio_tool_button_get_group(RadioToolButton* this_);
43332 ToolItem* gtk_radio_tool_button_new_from_widget(RadioToolButton* this_);
43333 ToolItem* gtk_radio_tool_button_new_with_stock_from_widget(RadioToolButton* this_, char* stock_id);
43334 void gtk_radio_tool_button_set_group(RadioToolButton* this_, GLib2.SList* group);
43335 Adjustment* gtk_range_get_adjustment(Range* this_);
43336 double gtk_range_get_fill_level(Range* this_);
43337 int gtk_range_get_flippable(Range* this_);
43338 int gtk_range_get_inverted(Range* this_);
43339 SensitivityType gtk_range_get_lower_stepper_sensitivity(Range* this_);
43340 int gtk_range_get_min_slider_size(Range* this_);
43341 void gtk_range_get_range_rect(Range* this_, /*out*/ Gdk2.Rectangle* range_rect);
43342 int gtk_range_get_restrict_to_fill_level(Range* this_);
43343 int gtk_range_get_round_digits(Range* this_);
43344 int gtk_range_get_show_fill_level(Range* this_);
43345 void gtk_range_get_slider_range(Range* this_, /*out*/ int* slider_start=null, /*out*/ int* slider_end=null);
43346 int gtk_range_get_slider_size_fixed(Range* this_);
43347 UpdateType gtk_range_get_update_policy(Range* this_);
43348 SensitivityType gtk_range_get_upper_stepper_sensitivity(Range* this_);
43349 double gtk_range_get_value(Range* this_);
43350 void gtk_range_set_adjustment(Range* this_, Adjustment* adjustment);
43351 void gtk_range_set_fill_level(Range* this_, double fill_level);
43352 void gtk_range_set_flippable(Range* this_, int flippable);
43353 void gtk_range_set_increments(Range* this_, double step, double page);
43354 void gtk_range_set_inverted(Range* this_, int setting);
43355 void gtk_range_set_lower_stepper_sensitivity(Range* this_, SensitivityType sensitivity);
43356 void gtk_range_set_min_slider_size(Range* this_, int min_size);
43357 void gtk_range_set_range(Range* this_, double min, double max);
43358 void gtk_range_set_restrict_to_fill_level(Range* this_, int restrict_to_fill_level);
43359 void gtk_range_set_round_digits(Range* this_, int round_digits);
43360 void gtk_range_set_show_fill_level(Range* this_, int show_fill_level);
43361 void gtk_range_set_slider_size_fixed(Range* this_, int size_fixed);
43362 void gtk_range_set_update_policy(Range* this_, UpdateType policy);
43363 void gtk_range_set_upper_stepper_sensitivity(Range* this_, SensitivityType sensitivity);
43364 void gtk_range_set_value(Range* this_, double value);
43365 RcStyle* /*new*/ gtk_rc_style_new();
43366 RcStyle* /*new*/ gtk_rc_style_copy(RcStyle* this_);
43367 void gtk_rc_style_ref(RcStyle* this_);
43368 void gtk_rc_style_unref(RcStyle* this_);
43369 RecentAction* /*new*/ gtk_recent_action_new(char* name, char* label, char* tooltip, char* stock_id);
43370 RecentAction* /*new*/ gtk_recent_action_new_for_manager(char* name, char* label, char* tooltip, char* stock_id, RecentManager* manager=null);
43371 int gtk_recent_action_get_show_numbers(RecentAction* this_);
43372 void gtk_recent_action_set_show_numbers(RecentAction* this_, int show_numbers);
43373 void gtk_recent_chooser_add_filter(RecentChooser* this_, RecentFilter* filter);
43374 RecentInfo* /*new*/ gtk_recent_chooser_get_current_item(RecentChooser* this_);
43375 char* /*new*/ gtk_recent_chooser_get_current_uri(RecentChooser* this_);
43376 RecentFilter* gtk_recent_chooser_get_filter(RecentChooser* this_);
43377 GLib2.List* /*new*/ gtk_recent_chooser_get_items(RecentChooser* this_);
43378 int gtk_recent_chooser_get_limit(RecentChooser* this_);
43379 int gtk_recent_chooser_get_local_only(RecentChooser* this_);
43380 int gtk_recent_chooser_get_select_multiple(RecentChooser* this_);
43381 int gtk_recent_chooser_get_show_icons(RecentChooser* this_);
43382 int gtk_recent_chooser_get_show_not_found(RecentChooser* this_);
43383 int gtk_recent_chooser_get_show_numbers(RecentChooser* this_);
43384 int gtk_recent_chooser_get_show_private(RecentChooser* this_);
43385 int gtk_recent_chooser_get_show_tips(RecentChooser* this_);
43386 RecentSortType gtk_recent_chooser_get_sort_type(RecentChooser* this_);
43387 char** /*new*/ gtk_recent_chooser_get_uris(RecentChooser* this_, /*out*/ size_t* length=null);
43388 GLib2.SList* /*new container*/ gtk_recent_chooser_list_filters(RecentChooser* this_);
43389 void gtk_recent_chooser_remove_filter(RecentChooser* this_, RecentFilter* filter);
43390 void gtk_recent_chooser_select_all(RecentChooser* this_);
43391 int gtk_recent_chooser_select_uri(RecentChooser* this_, char* uri, GLib2.Error** error);
43392 int gtk_recent_chooser_set_current_uri(RecentChooser* this_, char* uri, GLib2.Error** error);
43393 void gtk_recent_chooser_set_filter(RecentChooser* this_, RecentFilter* filter);
43394 void gtk_recent_chooser_set_limit(RecentChooser* this_, int limit);
43395 void gtk_recent_chooser_set_local_only(RecentChooser* this_, int local_only);
43396 void gtk_recent_chooser_set_select_multiple(RecentChooser* this_, int select_multiple);
43397 void gtk_recent_chooser_set_show_icons(RecentChooser* this_, int show_icons);
43398 void gtk_recent_chooser_set_show_not_found(RecentChooser* this_, int show_not_found);
43399 void gtk_recent_chooser_set_show_numbers(RecentChooser* this_, int show_numbers);
43400 void gtk_recent_chooser_set_show_private(RecentChooser* this_, int show_private);
43401 void gtk_recent_chooser_set_show_tips(RecentChooser* this_, int show_tips);
43402 void gtk_recent_chooser_set_sort_func(RecentChooser* this_, RecentSortFunc sort_func, void* sort_data=null, GLib2.DestroyNotify data_destroy=null);
43403 void gtk_recent_chooser_set_sort_type(RecentChooser* this_, RecentSortType sort_type);
43404 void gtk_recent_chooser_unselect_all(RecentChooser* this_);
43405 void gtk_recent_chooser_unselect_uri(RecentChooser* this_, char* uri);
43406 RecentChooserDialog* gtk_recent_chooser_dialog_new(char* title=null, Window* parent=null, char* first_button_text=null, ...);
43407 RecentChooserDialog* gtk_recent_chooser_dialog_new_for_manager(char* title, Window* parent, RecentManager* manager, char* first_button_text=null, ...);
43408 RecentChooserMenu* gtk_recent_chooser_menu_new();
43409 RecentChooserMenu* gtk_recent_chooser_menu_new_for_manager(RecentManager* manager);
43410 int gtk_recent_chooser_menu_get_show_numbers(RecentChooserMenu* this_);
43411 void gtk_recent_chooser_menu_set_show_numbers(RecentChooserMenu* this_, int show_numbers);
43412 RecentChooserWidget* gtk_recent_chooser_widget_new();
43413 RecentChooserWidget* gtk_recent_chooser_widget_new_for_manager(RecentManager* manager);
43414 RecentFilter* gtk_recent_filter_new();
43415 void gtk_recent_filter_add_age(RecentFilter* this_, int days);
43416 void gtk_recent_filter_add_application(RecentFilter* this_, char* application);
43417 void gtk_recent_filter_add_custom(RecentFilter* this_, RecentFilterFlags needed, RecentFilterFunc func, void* data, GLib2.DestroyNotify data_destroy);
43418 void gtk_recent_filter_add_group(RecentFilter* this_, char* group);
43419 void gtk_recent_filter_add_mime_type(RecentFilter* this_, char* mime_type);
43420 void gtk_recent_filter_add_pattern(RecentFilter* this_, char* pattern);
43421 void gtk_recent_filter_add_pixbuf_formats(RecentFilter* this_);
43422 int gtk_recent_filter_filter(RecentFilter* this_, RecentFilterInfo* filter_info);
43423 char* gtk_recent_filter_get_name(RecentFilter* this_);
43424 RecentFilterFlags gtk_recent_filter_get_needed(RecentFilter* this_);
43425 void gtk_recent_filter_set_name(RecentFilter* this_, char* name);
43426 int gtk_recent_info_exists(RecentInfo* this_);
43427 time_t gtk_recent_info_get_added(RecentInfo* this_);
43428 int gtk_recent_info_get_age(RecentInfo* this_);
43429 int gtk_recent_info_get_application_info(RecentInfo* this_, char* app_name, /*out*/ char** app_exec, /*out*/ uint* count, /*out*/ time_t* time_);
43430 char** /*new*/ gtk_recent_info_get_applications(RecentInfo* this_, /*out*/ size_t* length=null);
43431 char* gtk_recent_info_get_description(RecentInfo* this_);
43432 char* gtk_recent_info_get_display_name(RecentInfo* this_);
43433 char** /*new*/ gtk_recent_info_get_groups(RecentInfo* this_, /*out*/ size_t* length=null);
43434 GdkPixbuf2.Pixbuf* /*new*/ gtk_recent_info_get_icon(RecentInfo* this_, int size);
43435 char* gtk_recent_info_get_mime_type(RecentInfo* this_);
43436 time_t gtk_recent_info_get_modified(RecentInfo* this_);
43437 int gtk_recent_info_get_private_hint(RecentInfo* this_);
43438 char* /*new*/ gtk_recent_info_get_short_name(RecentInfo* this_);
43439 char* gtk_recent_info_get_uri(RecentInfo* this_);
43440 char* /*new*/ gtk_recent_info_get_uri_display(RecentInfo* this_);
43441 time_t gtk_recent_info_get_visited(RecentInfo* this_);
43442 int gtk_recent_info_has_application(RecentInfo* this_, char* app_name);
43443 int gtk_recent_info_has_group(RecentInfo* this_, char* group_name);
43444 int gtk_recent_info_is_local(RecentInfo* this_);
43445 char* /*new*/ gtk_recent_info_last_application(RecentInfo* this_);
43446 int gtk_recent_info_match(RecentInfo* this_, RecentInfo* info_b);
43447 RecentInfo* /*new*/ gtk_recent_info_ref(RecentInfo* this_);
43448 void gtk_recent_info_unref(RecentInfo* this_);
43449 RecentManager* /*new*/ gtk_recent_manager_new();
43450 RecentManager* gtk_recent_manager_get_default();
43451 RecentManager* gtk_recent_manager_get_for_screen(Gdk2.Screen* screen);
43452 int gtk_recent_manager_add_full(RecentManager* this_, char* uri, RecentData* recent_data);
43453 int gtk_recent_manager_add_item(RecentManager* this_, char* uri);
43454 GLib2.List* /*new*/ gtk_recent_manager_get_items(RecentManager* this_);
43455 int gtk_recent_manager_get_limit(RecentManager* this_);
43456 int gtk_recent_manager_has_item(RecentManager* this_, char* uri);
43457 RecentInfo* /*new*/ gtk_recent_manager_lookup_item(RecentManager* this_, char* uri, GLib2.Error** error);
43458 int gtk_recent_manager_move_item(RecentManager* this_, char* uri, char* new_uri, GLib2.Error** error);
43459 int gtk_recent_manager_purge_items(RecentManager* this_, GLib2.Error** error);
43460 int gtk_recent_manager_remove_item(RecentManager* this_, char* uri, GLib2.Error** error);
43461 void gtk_recent_manager_set_limit(RecentManager* this_, int limit);
43462 void gtk_recent_manager_set_screen(RecentManager* this_, Gdk2.Screen* screen);
43463 Requisition* /*new*/ gtk_requisition_copy(Requisition* this_);
43464 void gtk_requisition_free(Requisition* this_);
43465 void gtk_ruler_draw_pos(Ruler* this_);
43466 void gtk_ruler_draw_ticks(Ruler* this_);
43467 MetricType gtk_ruler_get_metric(Ruler* this_);
43468 void gtk_ruler_get_range(Ruler* this_, double* lower, double* upper, double* position, double* max_size);
43469 void gtk_ruler_set_metric(Ruler* this_, MetricType metric);
43470 void gtk_ruler_set_range(Ruler* this_, double lower, double upper, double position, double max_size);
43471 void gtk_scale_add_mark(Scale* this_, double value, PositionType position, char* markup=null);
43472 void gtk_scale_clear_marks(Scale* this_);
43473 int gtk_scale_get_digits(Scale* this_);
43474 int gtk_scale_get_draw_value(Scale* this_);
43475 Pango.Layout* gtk_scale_get_layout(Scale* this_);
43476 void gtk_scale_get_layout_offsets(Scale* this_, /*out*/ int* x=null, /*out*/ int* y=null);
43477 PositionType gtk_scale_get_value_pos(Scale* this_);
43478 void gtk_scale_set_digits(Scale* this_, int digits);
43479 void gtk_scale_set_draw_value(Scale* this_, int draw_value);
43480 void gtk_scale_set_value_pos(Scale* this_, PositionType pos);
43481 ScaleButton* gtk_scale_button_new(IconSize size, double min, double max, double step, char** icons=null);
43482 Adjustment* gtk_scale_button_get_adjustment(ScaleButton* this_);
43483 Widget* gtk_scale_button_get_minus_button(ScaleButton* this_);
43484 Orientation gtk_scale_button_get_orientation(ScaleButton* this_);
43485 Widget* gtk_scale_button_get_plus_button(ScaleButton* this_);
43486 Widget* gtk_scale_button_get_popup(ScaleButton* this_);
43487 double gtk_scale_button_get_value(ScaleButton* this_);
43488 void gtk_scale_button_set_adjustment(ScaleButton* this_, Adjustment* adjustment);
43489 void gtk_scale_button_set_icons(ScaleButton* this_, char** icons);
43490 void gtk_scale_button_set_orientation(ScaleButton* this_, Orientation orientation);
43491 void gtk_scale_button_set_value(ScaleButton* this_, double value);
43492 ScrolledWindow* gtk_scrolled_window_new(Adjustment* hadjustment=null, Adjustment* vadjustment=null);
43493 void gtk_scrolled_window_add_with_viewport(ScrolledWindow* this_, Widget* child);
43494 Adjustment* gtk_scrolled_window_get_hadjustment(ScrolledWindow* this_);
43495 Widget* gtk_scrolled_window_get_hscrollbar(ScrolledWindow* this_);
43496 CornerType gtk_scrolled_window_get_placement(ScrolledWindow* this_);
43497 void gtk_scrolled_window_get_policy(ScrolledWindow* this_, /*out*/ PolicyType* hscrollbar_policy=null, /*out*/ PolicyType* vscrollbar_policy=null);
43498 ShadowType gtk_scrolled_window_get_shadow_type(ScrolledWindow* this_);
43499 Adjustment* gtk_scrolled_window_get_vadjustment(ScrolledWindow* this_);
43500 Widget* gtk_scrolled_window_get_vscrollbar(ScrolledWindow* this_);
43501 void gtk_scrolled_window_set_hadjustment(ScrolledWindow* this_, Adjustment* hadjustment);
43502 void gtk_scrolled_window_set_placement(ScrolledWindow* this_, CornerType window_placement);
43503 void gtk_scrolled_window_set_policy(ScrolledWindow* this_, PolicyType hscrollbar_policy, PolicyType vscrollbar_policy);
43504 void gtk_scrolled_window_set_shadow_type(ScrolledWindow* this_, ShadowType type);
43505 void gtk_scrolled_window_set_vadjustment(ScrolledWindow* this_, Adjustment* vadjustment);
43506 void gtk_scrolled_window_unset_placement(ScrolledWindow* this_);
43507 SelectionData* /*new*/ gtk_selection_data_copy(SelectionData* this_);
43508 void gtk_selection_data_free(SelectionData* this_);
43509 ubyte* gtk_selection_data_get_data(SelectionData* this_);
43510 Gdk2.Atom gtk_selection_data_get_data_type(SelectionData* this_);
43511 Gdk2.Display* gtk_selection_data_get_display(SelectionData* this_);
43512 int gtk_selection_data_get_format(SelectionData* this_);
43513 int gtk_selection_data_get_length(SelectionData* this_);
43514 GdkPixbuf2.Pixbuf* /*new*/ gtk_selection_data_get_pixbuf(SelectionData* this_);
43515 Gdk2.Atom gtk_selection_data_get_selection(SelectionData* this_);
43516 Gdk2.Atom gtk_selection_data_get_target(SelectionData* this_);
43517 int gtk_selection_data_get_targets(SelectionData* this_, /*out*/ Gdk2.Atom** targets, /*out*/ int* n_atoms);
43518 ubyte* gtk_selection_data_get_text(SelectionData* this_);
43519 char** /*new*/ gtk_selection_data_get_uris(SelectionData* this_);
43520 void gtk_selection_data_set(SelectionData* this_, Gdk2.Atom type, int format, ubyte* data, int length);
43521 int gtk_selection_data_set_pixbuf(SelectionData* this_, GdkPixbuf2.Pixbuf* pixbuf);
43522 int gtk_selection_data_set_text(SelectionData* this_, char* str, int len);
43523 int gtk_selection_data_set_uris(SelectionData* this_, char** uris);
43524 int gtk_selection_data_targets_include_image(SelectionData* this_, int writable);
43525 int gtk_selection_data_targets_include_rich_text(SelectionData* this_, TextBuffer* buffer);
43526 int gtk_selection_data_targets_include_text(SelectionData* this_);
43527 int gtk_selection_data_targets_include_uri(SelectionData* this_);
43528 SeparatorMenuItem* gtk_separator_menu_item_new();
43529 SeparatorToolItem* gtk_separator_tool_item_new();
43530 int gtk_separator_tool_item_get_draw(SeparatorToolItem* this_);
43531 void gtk_separator_tool_item_set_draw(SeparatorToolItem* this_, int draw);
43532 Settings* gtk_settings_get_default();
43533 Settings* gtk_settings_get_for_screen(Gdk2.Screen* screen);
43534 void gtk_settings_install_property(GObject2.ParamSpec* pspec);
43535 void gtk_settings_install_property_parser(GObject2.ParamSpec* pspec, RcPropertyParser parser);
43536 void gtk_settings_set_double_property(Settings* this_, char* name, double v_double, char* origin);
43537 void gtk_settings_set_long_property(Settings* this_, char* name, c_long v_long, char* origin);
43538 void gtk_settings_set_property_value(Settings* this_, char* name, SettingsValue* svalue);
43539 void gtk_settings_set_string_property(Settings* this_, char* name, char* v_string, char* origin);
43540 SizeGroup* /*new*/ gtk_size_group_new(SizeGroupMode mode);
43541 void gtk_size_group_add_widget(SizeGroup* this_, Widget* widget);
43542 int gtk_size_group_get_ignore_hidden(SizeGroup* this_);
43543 SizeGroupMode gtk_size_group_get_mode(SizeGroup* this_);
43544 GLib2.SList* gtk_size_group_get_widgets(SizeGroup* this_);
43545 void gtk_size_group_remove_widget(SizeGroup* this_, Widget* widget);
43546 void gtk_size_group_set_ignore_hidden(SizeGroup* this_, int ignore_hidden);
43547 void gtk_size_group_set_mode(SizeGroup* this_, SizeGroupMode mode);
43548 Socket* gtk_socket_new();
43549 void gtk_socket_add_id(Socket* this_, Gdk2.NativeWindow window_id);
43550 Gdk2.NativeWindow gtk_socket_get_id(Socket* this_);
43551 Gdk2.Window* gtk_socket_get_plug_window(Socket* this_);
43552 void gtk_socket_steal(Socket* this_, Gdk2.NativeWindow wid);
43553 SpinButton* gtk_spin_button_new(Adjustment* adjustment, double climb_rate, uint digits);
43554 SpinButton* gtk_spin_button_new_with_range(double min, double max, double step);
43555 void gtk_spin_button_configure(SpinButton* this_, Adjustment* adjustment, double climb_rate, uint digits);
43556 Adjustment* gtk_spin_button_get_adjustment(SpinButton* this_);
43557 uint gtk_spin_button_get_digits(SpinButton* this_);
43558 void gtk_spin_button_get_increments(SpinButton* this_, /*out*/ double* step=null, /*out*/ double* page=null);
43559 int gtk_spin_button_get_numeric(SpinButton* this_);
43560 void gtk_spin_button_get_range(SpinButton* this_, /*out*/ double* min=null, /*out*/ double* max=null);
43561 int gtk_spin_button_get_snap_to_ticks(SpinButton* this_);
43562 SpinButtonUpdatePolicy gtk_spin_button_get_update_policy(SpinButton* this_);
43563 double gtk_spin_button_get_value(SpinButton* this_);
43564 int gtk_spin_button_get_value_as_int(SpinButton* this_);
43565 int gtk_spin_button_get_wrap(SpinButton* this_);
43566 void gtk_spin_button_set_adjustment(SpinButton* this_, Adjustment* adjustment);
43567 void gtk_spin_button_set_digits(SpinButton* this_, uint digits);
43568 void gtk_spin_button_set_increments(SpinButton* this_, double step, double page);
43569 void gtk_spin_button_set_numeric(SpinButton* this_, int numeric);
43570 void gtk_spin_button_set_range(SpinButton* this_, double min, double max);
43571 void gtk_spin_button_set_snap_to_ticks(SpinButton* this_, int snap_to_ticks);
43572 void gtk_spin_button_set_update_policy(SpinButton* this_, SpinButtonUpdatePolicy policy);
43573 void gtk_spin_button_set_value(SpinButton* this_, double value);
43574 void gtk_spin_button_set_wrap(SpinButton* this_, int wrap);
43575 void gtk_spin_button_spin(SpinButton* this_, SpinType direction, double increment);
43576 void gtk_spin_button_update(SpinButton* this_);
43577 Spinner* gtk_spinner_new();
43578 void gtk_spinner_start(Spinner* this_);
43579 void gtk_spinner_stop(Spinner* this_);
43580 StatusIcon* /*new*/ gtk_status_icon_new();
43581 StatusIcon* /*new*/ gtk_status_icon_new_from_file(char* filename);
43582 StatusIcon* /*new*/ gtk_status_icon_new_from_gicon(Gio2.Icon* icon);
43583 StatusIcon* /*new*/ gtk_status_icon_new_from_icon_name(char* icon_name);
43584 StatusIcon* /*new*/ gtk_status_icon_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf);
43585 StatusIcon* /*new*/ gtk_status_icon_new_from_stock(char* stock_id);
43586 void gtk_status_icon_position_menu(Menu* menu, int* x, int* y, int* push_in, void* user_data);
43587 int gtk_status_icon_get_blinking(StatusIcon* this_);
43588 int gtk_status_icon_get_geometry(StatusIcon* this_, /*out*/ Gdk2.Screen** screen=null, /*out*/ Gdk2.Rectangle* area=null, /*out*/ Orientation* orientation=null);
43589 Gio2.Icon* gtk_status_icon_get_gicon(StatusIcon* this_);
43590 int gtk_status_icon_get_has_tooltip(StatusIcon* this_);
43591 char* gtk_status_icon_get_icon_name(StatusIcon* this_);
43592 GdkPixbuf2.Pixbuf* gtk_status_icon_get_pixbuf(StatusIcon* this_);
43593 Gdk2.Screen* gtk_status_icon_get_screen(StatusIcon* this_);
43594 int gtk_status_icon_get_size(StatusIcon* this_);
43595 char* gtk_status_icon_get_stock(StatusIcon* this_);
43596 ImageType gtk_status_icon_get_storage_type(StatusIcon* this_);
43597 char* gtk_status_icon_get_title(StatusIcon* this_);
43598 char* /*new*/ gtk_status_icon_get_tooltip_markup(StatusIcon* this_);
43599 char* /*new*/ gtk_status_icon_get_tooltip_text(StatusIcon* this_);
43600 int gtk_status_icon_get_visible(StatusIcon* this_);
43601 uint gtk_status_icon_get_x11_window_id(StatusIcon* this_);
43602 int gtk_status_icon_is_embedded(StatusIcon* this_);
43603 void gtk_status_icon_set_blinking(StatusIcon* this_, int blinking);
43604 void gtk_status_icon_set_from_file(StatusIcon* this_, char* filename);
43605 void gtk_status_icon_set_from_gicon(StatusIcon* this_, Gio2.Icon* icon);
43606 void gtk_status_icon_set_from_icon_name(StatusIcon* this_, char* icon_name);
43607 void gtk_status_icon_set_from_pixbuf(StatusIcon* this_, GdkPixbuf2.Pixbuf* pixbuf=null);
43608 void gtk_status_icon_set_from_stock(StatusIcon* this_, char* stock_id);
43609 void gtk_status_icon_set_has_tooltip(StatusIcon* this_, int has_tooltip);
43610 void gtk_status_icon_set_name(StatusIcon* this_, char* name);
43611 void gtk_status_icon_set_screen(StatusIcon* this_, Gdk2.Screen* screen);
43612 void gtk_status_icon_set_title(StatusIcon* this_, char* title);
43613 void gtk_status_icon_set_tooltip(StatusIcon* this_, char* tooltip_text=null);
43614 void gtk_status_icon_set_tooltip_markup(StatusIcon* this_, char* markup=null);
43615 void gtk_status_icon_set_tooltip_text(StatusIcon* this_, char* text);
43616 void gtk_status_icon_set_visible(StatusIcon* this_, int visible);
43617 Statusbar* gtk_statusbar_new();
43618 uint gtk_statusbar_get_context_id(Statusbar* this_, char* context_description);
43619 int gtk_statusbar_get_has_resize_grip(Statusbar* this_);
43620 Widget* gtk_statusbar_get_message_area(Statusbar* this_);
43621 void gtk_statusbar_pop(Statusbar* this_, uint context_id);
43622 uint gtk_statusbar_push(Statusbar* this_, uint context_id, char* text);
43623 void gtk_statusbar_remove(Statusbar* this_, uint context_id, uint message_id);
43624 void gtk_statusbar_remove_all(Statusbar* this_, uint context_id);
43625 void gtk_statusbar_set_has_resize_grip(Statusbar* this_, int setting);
43626 StockItem* gtk_stock_item_copy(StockItem* this_);
43627 void gtk_stock_item_free(StockItem* this_);
43628 Style* /*new*/ gtk_style_new();
43629 void gtk_style_apply_default_background(Style* this_, Gdk2.Window* window, int set_bg, StateType state_type, Gdk2.Rectangle* area, int x, int y, int width, int height);
43630 Style* gtk_style_attach(Style* this_, Gdk2.Window* window);
43631 Style* /*new*/ gtk_style_copy(Style* this_);
43632 void gtk_style_detach(Style* this_);
43633 void gtk_style_get(Style* this_, Type widget_type, char* first_property_name, ...);
43634 Gdk2.Font* /*new*/ gtk_style_get_font(Style* this_);
43635 void gtk_style_get_style_property(Style* this_, Type widget_type, char* property_name, GObject2.Value* value);
43636 void gtk_style_get_valist(Style* this_, Type widget_type, char* first_property_name, va_list var_args);
43637 int gtk_style_lookup_color(Style* this_, char* color_name, /*out*/ Gdk2.Color* color);
43638 IconSet* gtk_style_lookup_icon_set(Style* this_, char* stock_id);
43639 Style* gtk_style_ref(Style* this_);
43640 GdkPixbuf2.Pixbuf* /*new*/ gtk_style_render_icon(Style* this_, IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null);
43641 void gtk_style_set_background(Style* this_, Gdk2.Window* window, StateType state_type);
43642 void gtk_style_set_font(Style* this_, Gdk2.Font* font=null);
43643 void gtk_style_unref(Style* this_);
43644 Table* gtk_table_new(uint rows, uint columns, int homogeneous);
43645 void gtk_table_attach(Table* this_, Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach, AttachOptions xoptions, AttachOptions yoptions, uint xpadding, uint ypadding);
43646 void gtk_table_attach_defaults(Table* this_, Widget* widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
43647 uint gtk_table_get_col_spacing(Table* this_, uint column);
43648 uint gtk_table_get_default_col_spacing(Table* this_);
43649 uint gtk_table_get_default_row_spacing(Table* this_);
43650 int gtk_table_get_homogeneous(Table* this_);
43651 uint gtk_table_get_row_spacing(Table* this_, uint row);
43652 void gtk_table_get_size(Table* this_, /*out*/ uint* rows=null, /*out*/ uint* columns=null);
43653 void gtk_table_resize(Table* this_, uint rows, uint columns);
43654 void gtk_table_set_col_spacing(Table* this_, uint column, uint spacing);
43655 void gtk_table_set_col_spacings(Table* this_, uint spacing);
43656 void gtk_table_set_homogeneous(Table* this_, int homogeneous);
43657 void gtk_table_set_row_spacing(Table* this_, uint row, uint spacing);
43658 void gtk_table_set_row_spacings(Table* this_, uint spacing);
43659 TargetList* /*new*/ gtk_target_list_new(TargetEntry* targets, uint ntargets);
43660 void gtk_target_list_add(TargetList* this_, Gdk2.Atom target, uint flags, uint info);
43661 void gtk_target_list_add_image_targets(TargetList* this_, uint info, int writable);
43662 void gtk_target_list_add_rich_text_targets(TargetList* this_, uint info, int deserializable, TextBuffer* buffer);
43663 void gtk_target_list_add_table(TargetList* this_, TargetEntry* targets, uint ntargets);
43664 void gtk_target_list_add_text_targets(TargetList* this_, uint info);
43665 void gtk_target_list_add_uri_targets(TargetList* this_, uint info);
43666 int gtk_target_list_find(TargetList* this_, Gdk2.Atom target, uint* info);
43667 TargetList* /*new*/ gtk_target_list_ref(TargetList* this_);
43668 void gtk_target_list_remove(TargetList* this_, Gdk2.Atom target);
43669 void gtk_target_list_unref(TargetList* this_);
43670 TearoffMenuItem* gtk_tearoff_menu_item_new();
43671 TextAttributes* /*new*/ gtk_text_attributes_new();
43672 TextAttributes* /*new*/ gtk_text_attributes_copy(TextAttributes* this_);
43673 void gtk_text_attributes_copy_values(TextAttributes* this_, TextAttributes* dest);
43674 TextAttributes* /*new*/ gtk_text_attributes_ref(TextAttributes* this_);
43675 void gtk_text_attributes_unref(TextAttributes* this_);
43676 TextBuffer* /*new*/ gtk_text_buffer_new(TextTagTable* table=null);
43677 void gtk_text_buffer_add_mark(TextBuffer* this_, TextMark* mark, TextIter* where);
43678 void gtk_text_buffer_add_selection_clipboard(TextBuffer* this_, Clipboard* clipboard);
43679 void gtk_text_buffer_apply_tag(TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end);
43680 void gtk_text_buffer_apply_tag_by_name(TextBuffer* this_, char* name, TextIter* start, TextIter* end);
43681 int gtk_text_buffer_backspace(TextBuffer* this_, TextIter* iter, int interactive, int default_editable);
43682 void gtk_text_buffer_begin_user_action(TextBuffer* this_);
43683 void gtk_text_buffer_copy_clipboard(TextBuffer* this_, Clipboard* clipboard);
43684 TextChildAnchor* gtk_text_buffer_create_child_anchor(TextBuffer* this_, TextIter* iter);
43685 TextMark* gtk_text_buffer_create_mark(TextBuffer* this_, char* mark_name, TextIter* where, int left_gravity);
43686 TextTag* gtk_text_buffer_create_tag(TextBuffer* this_, char* tag_name=null, char* first_property_name=null, ...);
43687 void gtk_text_buffer_cut_clipboard(TextBuffer* this_, Clipboard* clipboard, int default_editable);
43688 void gtk_text_buffer_delete(TextBuffer* this_, TextIter* start, TextIter* end);
43689 int gtk_text_buffer_delete_interactive(TextBuffer* this_, TextIter* start_iter, TextIter* end_iter, int default_editable);
43690 void gtk_text_buffer_delete_mark(TextBuffer* this_, TextMark* mark);
43691 void gtk_text_buffer_delete_mark_by_name(TextBuffer* this_, char* name);
43692 int gtk_text_buffer_delete_selection(TextBuffer* this_, int interactive, int default_editable);
43693 int gtk_text_buffer_deserialize(TextBuffer* this_, TextBuffer* content_buffer, Gdk2.Atom format, TextIter* iter, ubyte* data, size_t length, GLib2.Error** error);
43694 int gtk_text_buffer_deserialize_get_can_create_tags(TextBuffer* this_, Gdk2.Atom format);
43695 void gtk_text_buffer_deserialize_set_can_create_tags(TextBuffer* this_, Gdk2.Atom format, int can_create_tags);
43696 void gtk_text_buffer_end_user_action(TextBuffer* this_);
43697 void gtk_text_buffer_get_bounds(TextBuffer* this_, /*out*/ TextIter* start, /*out*/ TextIter* end);
43698 int gtk_text_buffer_get_char_count(TextBuffer* this_);
43699 TargetList* gtk_text_buffer_get_copy_target_list(TextBuffer* this_);
43700 Gdk2.Atom* /*new container*/ gtk_text_buffer_get_deserialize_formats(TextBuffer* this_, /*out*/ int* n_formats);
43701 void gtk_text_buffer_get_end_iter(TextBuffer* this_, /*out*/ TextIter* iter);
43702 int gtk_text_buffer_get_has_selection(TextBuffer* this_);
43703 TextMark* gtk_text_buffer_get_insert(TextBuffer* this_);
43704 void gtk_text_buffer_get_iter_at_child_anchor(TextBuffer* this_, /*out*/ TextIter* iter, TextChildAnchor* anchor);
43705 void gtk_text_buffer_get_iter_at_line(TextBuffer* this_, /*out*/ TextIter* iter, int line_number);
43706 void gtk_text_buffer_get_iter_at_line_index(TextBuffer* this_, /*out*/ TextIter* iter, int line_number, int byte_index);
43707 void gtk_text_buffer_get_iter_at_line_offset(TextBuffer* this_, /*out*/ TextIter* iter, int line_number, int char_offset);
43708 void gtk_text_buffer_get_iter_at_mark(TextBuffer* this_, /*out*/ TextIter* iter, TextMark* mark);
43709 void gtk_text_buffer_get_iter_at_offset(TextBuffer* this_, /*out*/ TextIter* iter, int char_offset);
43710 int gtk_text_buffer_get_line_count(TextBuffer* this_);
43711 TextMark* gtk_text_buffer_get_mark(TextBuffer* this_, char* name);
43712 int gtk_text_buffer_get_modified(TextBuffer* this_);
43713 TargetList* gtk_text_buffer_get_paste_target_list(TextBuffer* this_);
43714 TextMark* gtk_text_buffer_get_selection_bound(TextBuffer* this_);
43715 int gtk_text_buffer_get_selection_bounds(TextBuffer* this_, /*out*/ TextIter* start, /*out*/ TextIter* end);
43716 Gdk2.Atom* /*new container*/ gtk_text_buffer_get_serialize_formats(TextBuffer* this_, /*out*/ int* n_formats);
43717 char* /*new*/ gtk_text_buffer_get_slice(TextBuffer* this_, TextIter* start, TextIter* end, int include_hidden_chars);
43718 void gtk_text_buffer_get_start_iter(TextBuffer* this_, /*out*/ TextIter* iter);
43719 TextTagTable* gtk_text_buffer_get_tag_table(TextBuffer* this_);
43720 char* /*new*/ gtk_text_buffer_get_text(TextBuffer* this_, TextIter* start, TextIter* end, int include_hidden_chars);
43721 void gtk_text_buffer_insert(TextBuffer* this_, TextIter* iter, char* text, int len);
43722 void gtk_text_buffer_insert_at_cursor(TextBuffer* this_, char* text, int len);
43723 void gtk_text_buffer_insert_child_anchor(TextBuffer* this_, TextIter* iter, TextChildAnchor* anchor);
43724 int gtk_text_buffer_insert_interactive(TextBuffer* this_, TextIter* iter, char* text, int len, int default_editable);
43725 int gtk_text_buffer_insert_interactive_at_cursor(TextBuffer* this_, char* text, int len, int default_editable);
43726 void gtk_text_buffer_insert_pixbuf(TextBuffer* this_, TextIter* iter, GdkPixbuf2.Pixbuf* pixbuf);
43727 void gtk_text_buffer_insert_range(TextBuffer* this_, TextIter* iter, TextIter* start, TextIter* end);
43728 int gtk_text_buffer_insert_range_interactive(TextBuffer* this_, TextIter* iter, TextIter* start, TextIter* end, int default_editable);
43729 void gtk_text_buffer_insert_with_tags(TextBuffer* this_, TextIter* iter, char* text, int len, TextTag* first_tag, ...);
43730 void gtk_text_buffer_insert_with_tags_by_name(TextBuffer* this_, TextIter* iter, char* text, int len, char* first_tag_name, ...);
43731 void gtk_text_buffer_move_mark(TextBuffer* this_, TextMark* mark, TextIter* where);
43732 void gtk_text_buffer_move_mark_by_name(TextBuffer* this_, char* name, TextIter* where);
43733 void gtk_text_buffer_paste_clipboard(TextBuffer* this_, Clipboard* clipboard, TextIter* override_location, int default_editable);
43734 void gtk_text_buffer_place_cursor(TextBuffer* this_, TextIter* where);
43735 Gdk2.Atom gtk_text_buffer_register_deserialize_format(TextBuffer* this_, char* mime_type, TextBufferDeserializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy);
43736 Gdk2.Atom gtk_text_buffer_register_deserialize_tagset(TextBuffer* this_, char* tagset_name=null);
43737 Gdk2.Atom gtk_text_buffer_register_serialize_format(TextBuffer* this_, char* mime_type, TextBufferSerializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy);
43738 Gdk2.Atom gtk_text_buffer_register_serialize_tagset(TextBuffer* this_, char* tagset_name=null);
43739 void gtk_text_buffer_remove_all_tags(TextBuffer* this_, TextIter* start, TextIter* end);
43740 void gtk_text_buffer_remove_selection_clipboard(TextBuffer* this_, Clipboard* clipboard);
43741 void gtk_text_buffer_remove_tag(TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end);
43742 void gtk_text_buffer_remove_tag_by_name(TextBuffer* this_, char* name, TextIter* start, TextIter* end);
43743 void gtk_text_buffer_select_range(TextBuffer* this_, TextIter* ins, TextIter* bound);
43744 ubyte* /*new*/ gtk_text_buffer_serialize(TextBuffer* this_, TextBuffer* content_buffer, Gdk2.Atom format, TextIter* start, TextIter* end, /*out*/ size_t* length);
43745 void gtk_text_buffer_set_modified(TextBuffer* this_, int setting);
43746 void gtk_text_buffer_set_text(TextBuffer* this_, char* text, int len);
43747 void gtk_text_buffer_unregister_deserialize_format(TextBuffer* this_, Gdk2.Atom format);
43748 void gtk_text_buffer_unregister_serialize_format(TextBuffer* this_, Gdk2.Atom format);
43749 TextChildAnchor* /*new*/ gtk_text_child_anchor_new();
43750 int gtk_text_child_anchor_get_deleted(TextChildAnchor* this_);
43751 GLib2.List* /*new container*/ gtk_text_child_anchor_get_widgets(TextChildAnchor* this_);
43752 void gtk_text_child_anchor_queue_resize(TextChildAnchor* this_, TextLayout* layout);
43753 void gtk_text_child_anchor_register_child(TextChildAnchor* this_, Widget* child, TextLayout* layout);
43754 void gtk_text_child_anchor_unregister_child(TextChildAnchor* this_, Widget* child);
43755 int gtk_text_iter_backward_char(TextIter* this_);
43756 int gtk_text_iter_backward_chars(TextIter* this_, int count);
43757 int gtk_text_iter_backward_cursor_position(TextIter* this_);
43758 int gtk_text_iter_backward_cursor_positions(TextIter* this_, int count);
43759 int gtk_text_iter_backward_find_char(TextIter* this_, TextCharPredicate pred, void* user_data, TextIter* limit=null);
43760 int gtk_text_iter_backward_line(TextIter* this_);
43761 int gtk_text_iter_backward_lines(TextIter* this_, int count);
43762 int gtk_text_iter_backward_search(TextIter* this_, char* str, TextSearchFlags flags, /*out*/ TextIter* match_start=null, /*out*/ TextIter* match_end=null, TextIter* limit=null);
43763 int gtk_text_iter_backward_sentence_start(TextIter* this_);
43764 int gtk_text_iter_backward_sentence_starts(TextIter* this_, int count);
43765 int gtk_text_iter_backward_to_tag_toggle(TextIter* this_, TextTag* tag=null);
43766 int gtk_text_iter_backward_visible_cursor_position(TextIter* this_);
43767 int gtk_text_iter_backward_visible_cursor_positions(TextIter* this_, int count);
43768 int gtk_text_iter_backward_visible_line(TextIter* this_);
43769 int gtk_text_iter_backward_visible_lines(TextIter* this_, int count);
43770 int gtk_text_iter_backward_visible_word_start(TextIter* this_);
43771 int gtk_text_iter_backward_visible_word_starts(TextIter* this_, int count);
43772 int gtk_text_iter_backward_word_start(TextIter* this_);
43773 int gtk_text_iter_backward_word_starts(TextIter* this_, int count);
43774 int gtk_text_iter_begins_tag(TextIter* this_, TextTag* tag=null);
43775 int gtk_text_iter_can_insert(TextIter* this_, int default_editability);
43776 int gtk_text_iter_compare(TextIter* this_, TextIter* rhs);
43777 TextIter* /*new*/ gtk_text_iter_copy(TextIter* this_);
43778 int gtk_text_iter_editable(TextIter* this_, int default_setting);
43779 int gtk_text_iter_ends_line(TextIter* this_);
43780 int gtk_text_iter_ends_sentence(TextIter* this_);
43781 int gtk_text_iter_ends_tag(TextIter* this_, TextTag* tag=null);
43782 int gtk_text_iter_ends_word(TextIter* this_);
43783 int gtk_text_iter_equal(TextIter* this_, TextIter* rhs);
43784 int gtk_text_iter_forward_char(TextIter* this_);
43785 int gtk_text_iter_forward_chars(TextIter* this_, int count);
43786 int gtk_text_iter_forward_cursor_position(TextIter* this_);
43787 int gtk_text_iter_forward_cursor_positions(TextIter* this_, int count);
43788 int gtk_text_iter_forward_find_char(TextIter* this_, TextCharPredicate pred, void* user_data, TextIter* limit=null);
43789 int gtk_text_iter_forward_line(TextIter* this_);
43790 int gtk_text_iter_forward_lines(TextIter* this_, int count);
43791 int gtk_text_iter_forward_search(TextIter* this_, char* str, TextSearchFlags flags, /*out*/ TextIter* match_start=null, /*out*/ TextIter* match_end=null, TextIter* limit=null);
43792 int gtk_text_iter_forward_sentence_end(TextIter* this_);
43793 int gtk_text_iter_forward_sentence_ends(TextIter* this_, int count);
43794 void gtk_text_iter_forward_to_end(TextIter* this_);
43795 int gtk_text_iter_forward_to_line_end(TextIter* this_);
43796 int gtk_text_iter_forward_to_tag_toggle(TextIter* this_, TextTag* tag=null);
43797 int gtk_text_iter_forward_visible_cursor_position(TextIter* this_);
43798 int gtk_text_iter_forward_visible_cursor_positions(TextIter* this_, int count);
43799 int gtk_text_iter_forward_visible_line(TextIter* this_);
43800 int gtk_text_iter_forward_visible_lines(TextIter* this_, int count);
43801 int gtk_text_iter_forward_visible_word_end(TextIter* this_);
43802 int gtk_text_iter_forward_visible_word_ends(TextIter* this_, int count);
43803 int gtk_text_iter_forward_word_end(TextIter* this_);
43804 int gtk_text_iter_forward_word_ends(TextIter* this_, int count);
43805 void gtk_text_iter_free(TextIter* this_);
43806 int gtk_text_iter_get_attributes(TextIter* this_, /*out*/ TextAttributes* values);
43807 TextBuffer* gtk_text_iter_get_buffer(TextIter* this_);
43808 int gtk_text_iter_get_bytes_in_line(TextIter* this_);
43809 dchar gtk_text_iter_get_char(TextIter* this_);
43810 int gtk_text_iter_get_chars_in_line(TextIter* this_);
43811 TextChildAnchor* gtk_text_iter_get_child_anchor(TextIter* this_);
43812 Pango.Language* /*new*/ gtk_text_iter_get_language(TextIter* this_);
43813 int gtk_text_iter_get_line(TextIter* this_);
43814 int gtk_text_iter_get_line_index(TextIter* this_);
43815 int gtk_text_iter_get_line_offset(TextIter* this_);
43816 GLib2.SList* /*new container*/ gtk_text_iter_get_marks(TextIter* this_);
43817 int gtk_text_iter_get_offset(TextIter* this_);
43818 GdkPixbuf2.Pixbuf* gtk_text_iter_get_pixbuf(TextIter* this_);
43819 char* /*new*/ gtk_text_iter_get_slice(TextIter* this_, TextIter* end);
43820 GLib2.SList* /*new container*/ gtk_text_iter_get_tags(TextIter* this_);
43821 char* /*new*/ gtk_text_iter_get_text(TextIter* this_, TextIter* end);
43822 GLib2.SList* /*new container*/ gtk_text_iter_get_toggled_tags(TextIter* this_, int toggled_on);
43823 int gtk_text_iter_get_visible_line_index(TextIter* this_);
43824 int gtk_text_iter_get_visible_line_offset(TextIter* this_);
43825 char* /*new*/ gtk_text_iter_get_visible_slice(TextIter* this_, TextIter* end);
43826 char* /*new*/ gtk_text_iter_get_visible_text(TextIter* this_, TextIter* end);
43827 int gtk_text_iter_has_tag(TextIter* this_, TextTag* tag);
43828 int gtk_text_iter_in_range(TextIter* this_, TextIter* start, TextIter* end);
43829 int gtk_text_iter_inside_sentence(TextIter* this_);
43830 int gtk_text_iter_inside_word(TextIter* this_);
43831 int gtk_text_iter_is_cursor_position(TextIter* this_);
43832 int gtk_text_iter_is_end(TextIter* this_);
43833 int gtk_text_iter_is_start(TextIter* this_);
43834 void gtk_text_iter_order(TextIter* this_, TextIter* second);
43835 void gtk_text_iter_set_line(TextIter* this_, int line_number);
43836 void gtk_text_iter_set_line_index(TextIter* this_, int byte_on_line);
43837 void gtk_text_iter_set_line_offset(TextIter* this_, int char_on_line);
43838 void gtk_text_iter_set_offset(TextIter* this_, int char_offset);
43839 void gtk_text_iter_set_visible_line_index(TextIter* this_, int byte_on_line);
43840 void gtk_text_iter_set_visible_line_offset(TextIter* this_, int char_on_line);
43841 int gtk_text_iter_starts_line(TextIter* this_);
43842 int gtk_text_iter_starts_sentence(TextIter* this_);
43843 int gtk_text_iter_starts_word(TextIter* this_);
43844 int gtk_text_iter_toggles_tag(TextIter* this_, TextTag* tag=null);
43845 TextLayout* /*new*/ gtk_text_layout_new();
43846 void gtk_text_layout_changed(TextLayout* this_, int y, int old_height, int new_height);
43847 int gtk_text_layout_clamp_iter_to_vrange(TextLayout* this_, TextIter* iter, int top, int bottom);
43848 void gtk_text_layout_cursors_changed(TextLayout* this_, int y, int old_height, int new_height);
43849 void gtk_text_layout_default_style_changed(TextLayout* this_);
43850 void gtk_text_layout_draw(TextLayout* this_, Widget* widget, Gdk2.Drawable* drawable, Gdk2.GC* cursor_gc, int x_offset, int y_offset, int x, int y, int width, int height, GLib2.List** widgets);
43851 void gtk_text_layout_free_line_data(TextLayout* this_, TextLine* line, TextLineData* line_data);
43852 void gtk_text_layout_free_line_display(TextLayout* this_, TextLineDisplay* display);
43853 TextBuffer* gtk_text_layout_get_buffer(TextLayout* this_);
43854 void gtk_text_layout_get_cursor_locations(TextLayout* this_, TextIter* iter, Gdk2.Rectangle* strong_pos=null, Gdk2.Rectangle* weak_pos=null);
43855 int gtk_text_layout_get_cursor_visible(TextLayout* this_);
43856 void gtk_text_layout_get_iter_at_line(TextLayout* this_, TextIter* iter, TextLine* line, int byte_offset);
43857 void gtk_text_layout_get_iter_at_pixel(TextLayout* this_, TextIter* iter, int x, int y);
43858 void gtk_text_layout_get_iter_at_position(TextLayout* this_, TextIter* iter, int* trailing, int x, int y);
43859 void gtk_text_layout_get_iter_location(TextLayout* this_, TextIter* iter, Gdk2.Rectangle* rect);
43860 void gtk_text_layout_get_line_at_y(TextLayout* this_, TextIter* target_iter, int y, int* line_top);
43861 TextLineDisplay* gtk_text_layout_get_line_display(TextLayout* this_, TextLine* line, int size_only);
43862 void gtk_text_layout_get_line_yrange(TextLayout* this_, TextIter* iter, int* y, int* height);
43863 GLib2.SList* /*new container*/ gtk_text_layout_get_lines(TextLayout* this_, int top_y, int bottom_y, int* first_line_y);
43864 void gtk_text_layout_get_size(TextLayout* this_, int* width, int* height);
43865 void gtk_text_layout_invalidate(TextLayout* this_, TextIter* start, TextIter* end);
43866 void gtk_text_layout_invalidate_cursors(TextLayout* this_, TextIter* start, TextIter* end);
43867 int gtk_text_layout_is_valid(TextLayout* this_);
43868 int gtk_text_layout_iter_starts_line(TextLayout* this_, TextIter* iter);
43869 int gtk_text_layout_move_iter_to_line_end(TextLayout* this_, TextIter* iter, int direction);
43870 int gtk_text_layout_move_iter_to_next_line(TextLayout* this_, TextIter* iter);
43871 int gtk_text_layout_move_iter_to_previous_line(TextLayout* this_, TextIter* iter);
43872 void gtk_text_layout_move_iter_to_x(TextLayout* this_, TextIter* iter, int x);
43873 int gtk_text_layout_move_iter_visually(TextLayout* this_, TextIter* iter, int count);
43874 void gtk_text_layout_set_buffer(TextLayout* this_, TextBuffer* buffer=null);
43875 void gtk_text_layout_set_contexts(TextLayout* this_, Pango.Context* ltr_context, Pango.Context* rtl_context);
43876 void gtk_text_layout_set_cursor_direction(TextLayout* this_, TextDirection direction);
43877 void gtk_text_layout_set_cursor_visible(TextLayout* this_, int cursor_visible);
43878 void gtk_text_layout_set_default_style(TextLayout* this_, TextAttributes* values);
43879 void gtk_text_layout_set_keyboard_direction(TextLayout* this_, TextDirection keyboard_dir);
43880 void gtk_text_layout_set_overwrite_mode(TextLayout* this_, int overwrite);
43881 void gtk_text_layout_set_preedit_string(TextLayout* this_, char* preedit_string, Pango.AttrList* preedit_attrs, int cursor_pos);
43882 void gtk_text_layout_set_screen_width(TextLayout* this_, int width);
43883 void gtk_text_layout_spew(TextLayout* this_);
43884 void gtk_text_layout_validate(TextLayout* this_, int max_pixels);
43885 void gtk_text_layout_validate_yrange(TextLayout* this_, TextIter* anchor_line, int y0_, int y1_);
43886 TextLineData* gtk_text_layout_wrap(TextLayout* this_, TextLine* line, TextLineData* line_data);
43887 void gtk_text_layout_wrap_loop_end(TextLayout* this_);
43888 void gtk_text_layout_wrap_loop_start(TextLayout* this_);
43889 TextMark* /*new*/ gtk_text_mark_new(char* name, int left_gravity);
43890 TextBuffer* gtk_text_mark_get_buffer(TextMark* this_);
43891 int gtk_text_mark_get_deleted(TextMark* this_);
43892 int gtk_text_mark_get_left_gravity(TextMark* this_);
43893 char* gtk_text_mark_get_name(TextMark* this_);
43894 int gtk_text_mark_get_visible(TextMark* this_);
43895 void gtk_text_mark_set_visible(TextMark* this_, int setting);
43896 TextTag* /*new*/ gtk_text_tag_new(char* name=null);
43897 int gtk_text_tag_event(TextTag* this_, GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter);
43898 int gtk_text_tag_get_priority(TextTag* this_);
43899 void gtk_text_tag_set_priority(TextTag* this_, int priority);
43900 TextTagTable* /*new*/ gtk_text_tag_table_new();
43901 void gtk_text_tag_table_add(TextTagTable* this_, TextTag* tag);
43902 void gtk_text_tag_table_foreach(TextTagTable* this_, TextTagTableForeach func, void* data);
43903 int gtk_text_tag_table_get_size(TextTagTable* this_);
43904 TextTag* gtk_text_tag_table_lookup(TextTagTable* this_, char* name);
43905 void gtk_text_tag_table_remove(TextTagTable* this_, TextTag* tag);
43906 TextView* gtk_text_view_new();
43907 TextView* gtk_text_view_new_with_buffer(TextBuffer* buffer);
43908 void gtk_text_view_add_child_at_anchor(TextView* this_, Widget* child, TextChildAnchor* anchor);
43909 void gtk_text_view_add_child_in_window(TextView* this_, Widget* child, TextWindowType which_window, int xpos, int ypos);
43910 int gtk_text_view_backward_display_line(TextView* this_, TextIter* iter);
43911 int gtk_text_view_backward_display_line_start(TextView* this_, TextIter* iter);
43912 void gtk_text_view_buffer_to_window_coords(TextView* this_, TextWindowType win, int buffer_x, int buffer_y, /*out*/ int* window_x=null, /*out*/ int* window_y=null);
43913 int gtk_text_view_forward_display_line(TextView* this_, TextIter* iter);
43914 int gtk_text_view_forward_display_line_end(TextView* this_, TextIter* iter);
43915 int gtk_text_view_get_accepts_tab(TextView* this_);
43916 int gtk_text_view_get_border_window_size(TextView* this_, TextWindowType type);
43917 TextBuffer* gtk_text_view_get_buffer(TextView* this_);
43918 int gtk_text_view_get_cursor_visible(TextView* this_);
43919 TextAttributes* /*new*/ gtk_text_view_get_default_attributes(TextView* this_);
43920 int gtk_text_view_get_editable(TextView* this_);
43921 Adjustment* gtk_text_view_get_hadjustment(TextView* this_);
43922 int gtk_text_view_get_indent(TextView* this_);
43923 void gtk_text_view_get_iter_at_location(TextView* this_, /*out*/ TextIter* iter, int x, int y);
43924 void gtk_text_view_get_iter_at_position(TextView* this_, /*out*/ TextIter* iter, /*out*/ int* trailing, int x, int y);
43925 void gtk_text_view_get_iter_location(TextView* this_, TextIter* iter, /*out*/ Gdk2.Rectangle* location);
43926 Justification gtk_text_view_get_justification(TextView* this_);
43927 int gtk_text_view_get_left_margin(TextView* this_);
43928 void gtk_text_view_get_line_at_y(TextView* this_, /*out*/ TextIter* target_iter, int y, /*out*/ int* line_top);
43929 void gtk_text_view_get_line_yrange(TextView* this_, TextIter* iter, /*out*/ int* y, /*out*/ int* height);
43930 int gtk_text_view_get_overwrite(TextView* this_);
43931 int gtk_text_view_get_pixels_above_lines(TextView* this_);
43932 int gtk_text_view_get_pixels_below_lines(TextView* this_);
43933 int gtk_text_view_get_pixels_inside_wrap(TextView* this_);
43934 int gtk_text_view_get_right_margin(TextView* this_);
43935 Pango.TabArray* /*new*/ gtk_text_view_get_tabs(TextView* this_);
43936 Adjustment* gtk_text_view_get_vadjustment(TextView* this_);
43937 void gtk_text_view_get_visible_rect(TextView* this_, /*out*/ Gdk2.Rectangle* visible_rect);
43938 Gdk2.Window* gtk_text_view_get_window(TextView* this_, TextWindowType win);
43939 TextWindowType gtk_text_view_get_window_type(TextView* this_, Gdk2.Window* window);
43940 WrapMode gtk_text_view_get_wrap_mode(TextView* this_);
43941 int gtk_text_view_im_context_filter_keypress(TextView* this_, Gdk2.EventKey* event);
43942 void gtk_text_view_move_child(TextView* this_, Widget* child, int xpos, int ypos);
43943 int gtk_text_view_move_mark_onscreen(TextView* this_, TextMark* mark);
43944 int gtk_text_view_move_visually(TextView* this_, TextIter* iter, int count);
43945 int gtk_text_view_place_cursor_onscreen(TextView* this_);
43946 void gtk_text_view_reset_im_context(TextView* this_);
43947 void gtk_text_view_scroll_mark_onscreen(TextView* this_, TextMark* mark);
43948 int gtk_text_view_scroll_to_iter(TextView* this_, TextIter* iter, double within_margin, int use_align, double xalign, double yalign);
43949 void gtk_text_view_scroll_to_mark(TextView* this_, TextMark* mark, double within_margin, int use_align, double xalign, double yalign);
43950 void gtk_text_view_set_accepts_tab(TextView* this_, int accepts_tab);
43951 void gtk_text_view_set_border_window_size(TextView* this_, TextWindowType type, int size);
43952 void gtk_text_view_set_buffer(TextView* this_, TextBuffer* buffer=null);
43953 void gtk_text_view_set_cursor_visible(TextView* this_, int setting);
43954 void gtk_text_view_set_editable(TextView* this_, int setting);
43955 void gtk_text_view_set_indent(TextView* this_, int indent);
43956 void gtk_text_view_set_justification(TextView* this_, Justification justification);
43957 void gtk_text_view_set_left_margin(TextView* this_, int left_margin);
43958 void gtk_text_view_set_overwrite(TextView* this_, int overwrite);
43959 void gtk_text_view_set_pixels_above_lines(TextView* this_, int pixels_above_lines);
43960 void gtk_text_view_set_pixels_below_lines(TextView* this_, int pixels_below_lines);
43961 void gtk_text_view_set_pixels_inside_wrap(TextView* this_, int pixels_inside_wrap);
43962 void gtk_text_view_set_right_margin(TextView* this_, int right_margin);
43963 void gtk_text_view_set_tabs(TextView* this_, Pango.TabArray* tabs);
43964 void gtk_text_view_set_wrap_mode(TextView* this_, WrapMode wrap_mode);
43965 int gtk_text_view_starts_display_line(TextView* this_, TextIter* iter);
43966 void gtk_text_view_window_to_buffer_coords(TextView* this_, TextWindowType win, int window_x, int window_y, /*out*/ int* buffer_x=null, /*out*/ int* buffer_y=null);
43967 TipsQuery* gtk_tips_query_new();
43968 void gtk_tips_query_set_caller(TipsQuery* this_, Widget* caller);
43969 void gtk_tips_query_set_labels(TipsQuery* this_, char* label_inactive, char* label_no_tip);
43970 void gtk_tips_query_start_query(TipsQuery* this_);
43971 void gtk_tips_query_stop_query(TipsQuery* this_);
43972 ToggleAction* /*new*/ gtk_toggle_action_new(char* name, char* label, char* tooltip, char* stock_id);
43973 int gtk_toggle_action_get_active(ToggleAction* this_);
43974 int gtk_toggle_action_get_draw_as_radio(ToggleAction* this_);
43975 void gtk_toggle_action_set_active(ToggleAction* this_, int is_active);
43976 void gtk_toggle_action_set_draw_as_radio(ToggleAction* this_, int draw_as_radio);
43977 void gtk_toggle_action_toggled(ToggleAction* this_);
43978 ToggleButton* gtk_toggle_button_new();
43979 ToggleButton* gtk_toggle_button_new_with_label(char* label);
43980 ToggleButton* gtk_toggle_button_new_with_mnemonic(char* label);
43981 int gtk_toggle_button_get_active(ToggleButton* this_);
43982 int gtk_toggle_button_get_inconsistent(ToggleButton* this_);
43983 int gtk_toggle_button_get_mode(ToggleButton* this_);
43984 void gtk_toggle_button_set_active(ToggleButton* this_, int is_active);
43985 void gtk_toggle_button_set_inconsistent(ToggleButton* this_, int setting);
43986 void gtk_toggle_button_set_mode(ToggleButton* this_, int draw_indicator);
43987 void gtk_toggle_button_toggled(ToggleButton* this_);
43988 ToggleToolButton* gtk_toggle_tool_button_new();
43989 ToggleToolButton* gtk_toggle_tool_button_new_from_stock(char* stock_id);
43990 int gtk_toggle_tool_button_get_active(ToggleToolButton* this_);
43991 void gtk_toggle_tool_button_set_active(ToggleToolButton* this_, int is_active);
43992 ToolButton* gtk_tool_button_new(Widget* icon_widget=null, char* label=null);
43993 ToolButton* gtk_tool_button_new_from_stock(char* stock_id);
43994 char* gtk_tool_button_get_icon_name(ToolButton* this_);
43995 Widget* gtk_tool_button_get_icon_widget(ToolButton* this_);
43996 char* gtk_tool_button_get_label(ToolButton* this_);
43997 Widget* gtk_tool_button_get_label_widget(ToolButton* this_);
43998 char* gtk_tool_button_get_stock_id(ToolButton* this_);
43999 int gtk_tool_button_get_use_underline(ToolButton* this_);
44000 void gtk_tool_button_set_icon_name(ToolButton* this_, char* icon_name=null);
44001 void gtk_tool_button_set_icon_widget(ToolButton* this_, Widget* icon_widget=null);
44002 void gtk_tool_button_set_label(ToolButton* this_, char* label=null);
44003 void gtk_tool_button_set_label_widget(ToolButton* this_, Widget* label_widget=null);
44004 void gtk_tool_button_set_stock_id(ToolButton* this_, char* stock_id=null);
44005 void gtk_tool_button_set_use_underline(ToolButton* this_, int use_underline);
44006 ToolItem* gtk_tool_item_new();
44007 Pango.EllipsizeMode gtk_tool_item_get_ellipsize_mode(ToolItem* this_);
44008 int gtk_tool_item_get_expand(ToolItem* this_);
44009 int gtk_tool_item_get_homogeneous(ToolItem* this_);
44010 int gtk_tool_item_get_icon_size(ToolItem* this_);
44011 int gtk_tool_item_get_is_important(ToolItem* this_);
44012 Orientation gtk_tool_item_get_orientation(ToolItem* this_);
44013 Widget* gtk_tool_item_get_proxy_menu_item(ToolItem* this_, char* menu_item_id);
44014 ReliefStyle gtk_tool_item_get_relief_style(ToolItem* this_);
44015 float gtk_tool_item_get_text_alignment(ToolItem* this_);
44016 Orientation gtk_tool_item_get_text_orientation(ToolItem* this_);
44017 SizeGroup* gtk_tool_item_get_text_size_group(ToolItem* this_);
44018 ToolbarStyle gtk_tool_item_get_toolbar_style(ToolItem* this_);
44019 int gtk_tool_item_get_use_drag_window(ToolItem* this_);
44020 int gtk_tool_item_get_visible_horizontal(ToolItem* this_);
44021 int gtk_tool_item_get_visible_vertical(ToolItem* this_);
44022 void gtk_tool_item_rebuild_menu(ToolItem* this_);
44023 Widget* gtk_tool_item_retrieve_proxy_menu_item(ToolItem* this_);
44024 void gtk_tool_item_set_expand(ToolItem* this_, int expand);
44025 void gtk_tool_item_set_homogeneous(ToolItem* this_, int homogeneous);
44026 void gtk_tool_item_set_is_important(ToolItem* this_, int is_important);
44027 void gtk_tool_item_set_proxy_menu_item(ToolItem* this_, char* menu_item_id, Widget* menu_item);
44028 void gtk_tool_item_set_tooltip(ToolItem* this_, Tooltips* tooltips, char* tip_text=null, char* tip_private=null);
44029 void gtk_tool_item_set_tooltip_markup(ToolItem* this_, char* markup);
44030 void gtk_tool_item_set_tooltip_text(ToolItem* this_, char* text);
44031 void gtk_tool_item_set_use_drag_window(ToolItem* this_, int use_drag_window);
44032 void gtk_tool_item_set_visible_horizontal(ToolItem* this_, int visible_horizontal);
44033 void gtk_tool_item_set_visible_vertical(ToolItem* this_, int visible_vertical);
44034 void gtk_tool_item_toolbar_reconfigured(ToolItem* this_);
44035 ToolItemGroup* gtk_tool_item_group_new(char* label);
44036 int gtk_tool_item_group_get_collapsed(ToolItemGroup* this_);
44037 ToolItem* gtk_tool_item_group_get_drop_item(ToolItemGroup* this_, int x, int y);
44038 Pango.EllipsizeMode gtk_tool_item_group_get_ellipsize(ToolItemGroup* this_);
44039 ReliefStyle gtk_tool_item_group_get_header_relief(ToolItemGroup* this_);
44040 int gtk_tool_item_group_get_item_position(ToolItemGroup* this_, ToolItem* item);
44041 char* gtk_tool_item_group_get_label(ToolItemGroup* this_);
44042 Widget* gtk_tool_item_group_get_label_widget(ToolItemGroup* this_);
44043 uint gtk_tool_item_group_get_n_items(ToolItemGroup* this_);
44044 ToolItem* gtk_tool_item_group_get_nth_item(ToolItemGroup* this_, uint index);
44045 void gtk_tool_item_group_insert(ToolItemGroup* this_, ToolItem* item, int position);
44046 void gtk_tool_item_group_set_collapsed(ToolItemGroup* this_, int collapsed);
44047 void gtk_tool_item_group_set_ellipsize(ToolItemGroup* this_, Pango.EllipsizeMode ellipsize);
44048 void gtk_tool_item_group_set_header_relief(ToolItemGroup* this_, ReliefStyle style);
44049 void gtk_tool_item_group_set_item_position(ToolItemGroup* this_, ToolItem* item, int position);
44050 void gtk_tool_item_group_set_label(ToolItemGroup* this_, char* label);
44051 void gtk_tool_item_group_set_label_widget(ToolItemGroup* this_, Widget* label_widget);
44052 ToolPalette* gtk_tool_palette_new();
44053 TargetEntry* gtk_tool_palette_get_drag_target_group();
44054 TargetEntry* gtk_tool_palette_get_drag_target_item();
44055 void gtk_tool_palette_add_drag_dest(ToolPalette* this_, Widget* widget, DestDefaults flags, ToolPaletteDragTargets targets, Gdk2.DragAction actions);
44056 Widget* gtk_tool_palette_get_drag_item(ToolPalette* this_, SelectionData* selection);
44057 ToolItemGroup* gtk_tool_palette_get_drop_group(ToolPalette* this_, int x, int y);
44058 ToolItem* gtk_tool_palette_get_drop_item(ToolPalette* this_, int x, int y);
44059 int gtk_tool_palette_get_exclusive(ToolPalette* this_, ToolItemGroup* group);
44060 int gtk_tool_palette_get_expand(ToolPalette* this_, ToolItemGroup* group);
44061 int gtk_tool_palette_get_group_position(ToolPalette* this_, ToolItemGroup* group);
44062 Adjustment* gtk_tool_palette_get_hadjustment(ToolPalette* this_);
44063 int gtk_tool_palette_get_icon_size(ToolPalette* this_);
44064 ToolbarStyle gtk_tool_palette_get_style(ToolPalette* this_);
44065 Adjustment* gtk_tool_palette_get_vadjustment(ToolPalette* this_);
44066 void gtk_tool_palette_set_drag_source(ToolPalette* this_, ToolPaletteDragTargets targets);
44067 void gtk_tool_palette_set_exclusive(ToolPalette* this_, ToolItemGroup* group, int exclusive);
44068 void gtk_tool_palette_set_expand(ToolPalette* this_, ToolItemGroup* group, int expand);
44069 void gtk_tool_palette_set_group_position(ToolPalette* this_, ToolItemGroup* group, int position);
44070 void gtk_tool_palette_set_icon_size(ToolPalette* this_, int icon_size);
44071 void gtk_tool_palette_set_style(ToolPalette* this_, ToolbarStyle style);
44072 void gtk_tool_palette_unset_icon_size(ToolPalette* this_);
44073 void gtk_tool_palette_unset_style(ToolPalette* this_);
44074 Pango.EllipsizeMode gtk_tool_shell_get_ellipsize_mode(ToolShell* this_);
44075 int gtk_tool_shell_get_icon_size(ToolShell* this_);
44076 Orientation gtk_tool_shell_get_orientation(ToolShell* this_);
44077 ReliefStyle gtk_tool_shell_get_relief_style(ToolShell* this_);
44078 ToolbarStyle gtk_tool_shell_get_style(ToolShell* this_);
44079 float gtk_tool_shell_get_text_alignment(ToolShell* this_);
44080 Orientation gtk_tool_shell_get_text_orientation(ToolShell* this_);
44081 SizeGroup* gtk_tool_shell_get_text_size_group(ToolShell* this_);
44082 void gtk_tool_shell_rebuild_menu(ToolShell* this_);
44083 Toolbar* gtk_toolbar_new();
44084 Widget* gtk_toolbar_append_element(Toolbar* this_, ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data);
44085 Widget* gtk_toolbar_append_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data);
44086 void gtk_toolbar_append_space(Toolbar* this_);
44087 void gtk_toolbar_append_widget(Toolbar* this_, Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null);
44088 int gtk_toolbar_get_drop_index(Toolbar* this_, int x, int y);
44089 int gtk_toolbar_get_icon_size(Toolbar* this_);
44090 int gtk_toolbar_get_item_index(Toolbar* this_, ToolItem* item);
44091 int gtk_toolbar_get_n_items(Toolbar* this_);
44092 ToolItem* gtk_toolbar_get_nth_item(Toolbar* this_, int n);
44093 Orientation gtk_toolbar_get_orientation(Toolbar* this_);
44094 ReliefStyle gtk_toolbar_get_relief_style(Toolbar* this_);
44095 int gtk_toolbar_get_show_arrow(Toolbar* this_);
44096 ToolbarStyle gtk_toolbar_get_style(Toolbar* this_);
44097 int gtk_toolbar_get_tooltips(Toolbar* this_);
44098 void gtk_toolbar_insert(Toolbar* this_, ToolItem* item, int pos);
44099 Widget* gtk_toolbar_insert_element(Toolbar* this_, ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data, int position);
44100 Widget* gtk_toolbar_insert_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data, int position);
44101 void gtk_toolbar_insert_space(Toolbar* this_, int position);
44102 Widget* gtk_toolbar_insert_stock(Toolbar* this_, char* stock_id, char* tooltip_text, char* tooltip_private_text, GObject2.Callback callback, void* user_data, int position);
44103 void gtk_toolbar_insert_widget(Toolbar* this_, Widget* widget, char* tooltip_text, char* tooltip_private_text, int position);
44104 Widget* gtk_toolbar_prepend_element(Toolbar* this_, ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data);
44105 Widget* gtk_toolbar_prepend_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data);
44106 void gtk_toolbar_prepend_space(Toolbar* this_);
44107 void gtk_toolbar_prepend_widget(Toolbar* this_, Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null);
44108 void gtk_toolbar_remove_space(Toolbar* this_, int position);
44109 void gtk_toolbar_set_drop_highlight_item(Toolbar* this_, ToolItem* tool_item, int index_);
44110 void gtk_toolbar_set_icon_size(Toolbar* this_, int icon_size);
44111 void gtk_toolbar_set_orientation(Toolbar* this_, Orientation orientation);
44112 void gtk_toolbar_set_show_arrow(Toolbar* this_, int show_arrow);
44113 void gtk_toolbar_set_style(Toolbar* this_, ToolbarStyle style);
44114 void gtk_toolbar_set_tooltips(Toolbar* this_, int enable);
44115 void gtk_toolbar_unset_icon_size(Toolbar* this_);
44116 void gtk_toolbar_unset_style(Toolbar* this_);
44117 void gtk_tooltip_trigger_tooltip_query(Gdk2.Display* display);
44118 void gtk_tooltip_set_custom(Tooltip* this_, Widget* custom_widget=null);
44119 void gtk_tooltip_set_icon(Tooltip* this_, GdkPixbuf2.Pixbuf* pixbuf=null);
44120 void gtk_tooltip_set_icon_from_gicon(Tooltip* this_, Gio2.Icon* gicon, int size);
44121 void gtk_tooltip_set_icon_from_icon_name(Tooltip* this_, char* icon_name, int size);
44122 void gtk_tooltip_set_icon_from_stock(Tooltip* this_, char* stock_id, int size);
44123 void gtk_tooltip_set_markup(Tooltip* this_, char* markup=null);
44124 void gtk_tooltip_set_text(Tooltip* this_, char* text=null);
44125 void gtk_tooltip_set_tip_area(Tooltip* this_, Gdk2.Rectangle* rect);
44126 Tooltips* gtk_tooltips_new();
44127 int gtk_tooltips_get_info_from_tip_window(Window* tip_window, Tooltips** tooltips, Widget** current_widget);
44128 void gtk_tooltips_disable(Tooltips* this_);
44129 void gtk_tooltips_enable(Tooltips* this_);
44130 void gtk_tooltips_force_window(Tooltips* this_);
44131 void gtk_tooltips_set_delay(Tooltips* this_, uint delay);
44132 void gtk_tooltips_set_tip(Tooltips* this_, Widget* widget, char* tip_text=null, char* tip_private=null);
44133 int gtk_tree_drag_dest_drag_data_received(TreeDragDest* this_, TreePath* dest, SelectionData* selection_data);
44134 int gtk_tree_drag_dest_row_drop_possible(TreeDragDest* this_, TreePath* dest_path, SelectionData* selection_data);
44135 int gtk_tree_drag_source_drag_data_delete(TreeDragSource* this_, TreePath* path);
44136 int gtk_tree_drag_source_drag_data_get(TreeDragSource* this_, TreePath* path, /*out*/ SelectionData* selection_data);
44137 int gtk_tree_drag_source_row_draggable(TreeDragSource* this_, TreePath* path);
44138 TreeIter* /*new*/ gtk_tree_iter_copy(TreeIter* this_);
44139 void gtk_tree_iter_free(TreeIter* this_);
44140 TreeModel* /*new*/ gtk_tree_model_filter_new(TreeModel* this_, TreePath* root=null);
44141 void gtk_tree_model_foreach(TreeModel* this_, TreeModelForeachFunc func, void* user_data);
44142 void gtk_tree_model_get(TreeModel* this_, TreeIter* iter, ...);
44143 Type gtk_tree_model_get_column_type(TreeModel* this_, int index_);
44144 TreeModelFlags gtk_tree_model_get_flags(TreeModel* this_);
44145 int gtk_tree_model_get_iter(TreeModel* this_, /*out*/ TreeIter* iter, TreePath* path);
44146 int gtk_tree_model_get_iter_first(TreeModel* this_, /*out*/ TreeIter* iter);
44147 int gtk_tree_model_get_iter_from_string(TreeModel* this_, /*out*/ TreeIter* iter, char* path_string);
44148 int gtk_tree_model_get_n_columns(TreeModel* this_);
44149 TreePath* /*new*/ gtk_tree_model_get_path(TreeModel* this_, TreeIter* iter);
44150 char* /*new*/ gtk_tree_model_get_string_from_iter(TreeModel* this_, TreeIter* iter);
44151 void gtk_tree_model_get_valist(TreeModel* this_, TreeIter* iter, va_list var_args);
44152 void gtk_tree_model_get_value(TreeModel* this_, TreeIter* iter, int column, /*out*/ GObject2.Value* value);
44153 int gtk_tree_model_iter_children(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* parent=null);
44154 int gtk_tree_model_iter_has_child(TreeModel* this_, TreeIter* iter);
44155 int gtk_tree_model_iter_n_children(TreeModel* this_, TreeIter* iter=null);
44156 int gtk_tree_model_iter_next(TreeModel* this_, TreeIter* iter);
44157 int gtk_tree_model_iter_nth_child(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* parent, int n);
44158 int gtk_tree_model_iter_parent(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* child);
44159 void gtk_tree_model_ref_node(TreeModel* this_, TreeIter* iter);
44160 void gtk_tree_model_row_changed(TreeModel* this_, TreePath* path, TreeIter* iter);
44161 void gtk_tree_model_row_deleted(TreeModel* this_, TreePath* path);
44162 void gtk_tree_model_row_has_child_toggled(TreeModel* this_, TreePath* path, TreeIter* iter);
44163 void gtk_tree_model_row_inserted(TreeModel* this_, TreePath* path, TreeIter* iter);
44164 void gtk_tree_model_rows_reordered(TreeModel* this_, TreePath* path, TreeIter* iter, int* new_order);
44165 TreeModel* /*new*/ gtk_tree_model_sort_new_with_model(TreeModel* this_);
44166 void gtk_tree_model_unref_node(TreeModel* this_, TreeIter* iter);
44167 void gtk_tree_model_filter_clear_cache(TreeModelFilter* this_);
44168 int gtk_tree_model_filter_convert_child_iter_to_iter(TreeModelFilter* this_, /*out*/ TreeIter* filter_iter, TreeIter* child_iter);
44169 TreePath* /*new*/ gtk_tree_model_filter_convert_child_path_to_path(TreeModelFilter* this_, TreePath* child_path);
44170 void gtk_tree_model_filter_convert_iter_to_child_iter(TreeModelFilter* this_, /*out*/ TreeIter* child_iter, TreeIter* filter_iter);
44171 TreePath* /*new*/ gtk_tree_model_filter_convert_path_to_child_path(TreeModelFilter* this_, TreePath* filter_path);
44172 TreeModel* gtk_tree_model_filter_get_model(TreeModelFilter* this_);
44173 void gtk_tree_model_filter_refilter(TreeModelFilter* this_);
44174 void gtk_tree_model_filter_set_modify_func(TreeModelFilter* this_, int n_columns, Type* types, TreeModelFilterModifyFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
44175 void gtk_tree_model_filter_set_visible_column(TreeModelFilter* this_, int column);
44176 void gtk_tree_model_filter_set_visible_func(TreeModelFilter* this_, TreeModelFilterVisibleFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
44177 void gtk_tree_model_sort_clear_cache(TreeModelSort* this_);
44178 int gtk_tree_model_sort_convert_child_iter_to_iter(TreeModelSort* this_, /*out*/ TreeIter* sort_iter, TreeIter* child_iter);
44179 TreePath* /*new*/ gtk_tree_model_sort_convert_child_path_to_path(TreeModelSort* this_, TreePath* child_path);
44180 void gtk_tree_model_sort_convert_iter_to_child_iter(TreeModelSort* this_, /*out*/ TreeIter* child_iter, TreeIter* sorted_iter);
44181 TreePath* /*new*/ gtk_tree_model_sort_convert_path_to_child_path(TreeModelSort* this_, TreePath* sorted_path);
44182 TreeModel* gtk_tree_model_sort_get_model(TreeModelSort* this_);
44183 int gtk_tree_model_sort_iter_is_valid(TreeModelSort* this_, TreeIter* iter);
44184 void gtk_tree_model_sort_reset_default_sort_func(TreeModelSort* this_);
44185 TreePath* /*new*/ gtk_tree_path_new();
44186 TreePath* /*new*/ gtk_tree_path_new_first();
44187 TreePath* /*new*/ gtk_tree_path_new_from_indices(int first_index, ...);
44188 TreePath* /*new*/ gtk_tree_path_new_from_string(char* path);
44189 void gtk_tree_path_append_index(TreePath* this_, int index_);
44190 int gtk_tree_path_compare(TreePath* this_, TreePath* b);
44191 TreePath* /*new*/ gtk_tree_path_copy(TreePath* this_);
44192 void gtk_tree_path_down(TreePath* this_);
44193 void gtk_tree_path_free(TreePath* this_);
44194 int gtk_tree_path_get_depth(TreePath* this_);
44195 int* gtk_tree_path_get_indices(TreePath* this_);
44196 int* gtk_tree_path_get_indices_with_depth(TreePath* this_, /*out*/ int* depth);
44197 int gtk_tree_path_is_ancestor(TreePath* this_, TreePath* descendant);
44198 int gtk_tree_path_is_descendant(TreePath* this_, TreePath* ancestor);
44199 void gtk_tree_path_next(TreePath* this_);
44200 void gtk_tree_path_prepend_index(TreePath* this_, int index_);
44201 int gtk_tree_path_prev(TreePath* this_);
44202 char* /*new*/ gtk_tree_path_to_string(TreePath* this_);
44203 int gtk_tree_path_up(TreePath* this_);
44204 TreeRowReference* /*new*/ gtk_tree_row_reference_new(TreeModel* model, TreePath* path);
44205 TreeRowReference* /*new*/ gtk_tree_row_reference_new_proxy(GObject2.Object* proxy, TreeModel* model, TreePath* path);
44206 TreeRowReference* /*new*/ gtk_tree_row_reference_copy(TreeRowReference* this_);
44207 void gtk_tree_row_reference_free(TreeRowReference* this_);
44208 TreeModel* gtk_tree_row_reference_get_model(TreeRowReference* this_);
44209 TreePath* /*new*/ gtk_tree_row_reference_get_path(TreeRowReference* this_);
44210 int gtk_tree_row_reference_valid(TreeRowReference* this_);
44211 int gtk_tree_selection_count_selected_rows(TreeSelection* this_);
44212 SelectionMode gtk_tree_selection_get_mode(TreeSelection* this_);
44213 TreeSelectionFunc gtk_tree_selection_get_select_function(TreeSelection* this_);
44214 int gtk_tree_selection_get_selected(TreeSelection* this_, /*out*/ TreeModel** model=null, /*out*/ TreeIter* iter=null);
44215 GLib2.List* /*new*/ gtk_tree_selection_get_selected_rows(TreeSelection* this_, /*out*/ TreeModel** model=null);
44216 TreeView* gtk_tree_selection_get_tree_view(TreeSelection* this_);
44217 void* gtk_tree_selection_get_user_data(TreeSelection* this_);
44218 int gtk_tree_selection_iter_is_selected(TreeSelection* this_, TreeIter* iter);
44219 int gtk_tree_selection_path_is_selected(TreeSelection* this_, TreePath* path);
44220 void gtk_tree_selection_select_all(TreeSelection* this_);
44221 void gtk_tree_selection_select_iter(TreeSelection* this_, TreeIter* iter);
44222 void gtk_tree_selection_select_path(TreeSelection* this_, TreePath* path);
44223 void gtk_tree_selection_select_range(TreeSelection* this_, TreePath* start_path, TreePath* end_path);
44224 void gtk_tree_selection_selected_foreach(TreeSelection* this_, TreeSelectionForeachFunc func, void* data);
44225 void gtk_tree_selection_set_mode(TreeSelection* this_, SelectionMode type);
44226 void gtk_tree_selection_set_select_function(TreeSelection* this_, TreeSelectionFunc func, void* data, GLib2.DestroyNotify destroy);
44227 void gtk_tree_selection_unselect_all(TreeSelection* this_);
44228 void gtk_tree_selection_unselect_iter(TreeSelection* this_, TreeIter* iter);
44229 void gtk_tree_selection_unselect_path(TreeSelection* this_, TreePath* path);
44230 void gtk_tree_selection_unselect_range(TreeSelection* this_, TreePath* start_path, TreePath* end_path);
44231 int gtk_tree_sortable_get_sort_column_id(TreeSortable* this_, int* sort_column_id, SortType* order);
44232 int gtk_tree_sortable_has_default_sort_func(TreeSortable* this_);
44233 void gtk_tree_sortable_set_default_sort_func(TreeSortable* this_, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null);
44234 void gtk_tree_sortable_set_sort_column_id(TreeSortable* this_, int sort_column_id, SortType order);
44235 void gtk_tree_sortable_set_sort_func(TreeSortable* this_, int sort_column_id, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null);
44236 void gtk_tree_sortable_sort_column_changed(TreeSortable* this_);
44237 TreeStore* /*new*/ gtk_tree_store_new(int n_columns, ...);
44238 TreeStore* /*new*/ gtk_tree_store_newv(int n_columns, Type* types);
44239 void gtk_tree_store_append(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null);
44240 void gtk_tree_store_clear(TreeStore* this_);
44241 void gtk_tree_store_insert(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position);
44242 void gtk_tree_store_insert_after(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null);
44243 void gtk_tree_store_insert_before(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null);
44244 void gtk_tree_store_insert_with_values(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position, ...);
44245 void gtk_tree_store_insert_with_valuesv(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position, int* columns, GObject2.Value* values, int n_values);
44246 int gtk_tree_store_is_ancestor(TreeStore* this_, TreeIter* iter, TreeIter* descendant);
44247 int gtk_tree_store_iter_depth(TreeStore* this_, TreeIter* iter);
44248 int gtk_tree_store_iter_is_valid(TreeStore* this_, TreeIter* iter);
44249 void gtk_tree_store_move_after(TreeStore* this_, TreeIter* iter, TreeIter* position=null);
44250 void gtk_tree_store_move_before(TreeStore* this_, TreeIter* iter, TreeIter* position=null);
44251 void gtk_tree_store_prepend(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null);
44252 int gtk_tree_store_remove(TreeStore* this_, TreeIter* iter);
44253 void gtk_tree_store_reorder(TreeStore* this_, TreeIter* parent, int* new_order);
44254 void gtk_tree_store_set(TreeStore* this_, TreeIter* iter, ...);
44255 void gtk_tree_store_set_column_types(TreeStore* this_, int n_columns, Type* types);
44256 void gtk_tree_store_set_valist(TreeStore* this_, TreeIter* iter, va_list var_args);
44257 void gtk_tree_store_set_value(TreeStore* this_, TreeIter* iter, int column, GObject2.Value* value);
44258 void gtk_tree_store_set_valuesv(TreeStore* this_, TreeIter* iter, int* columns, GObject2.Value* values, int n_values);
44259 void gtk_tree_store_swap(TreeStore* this_, TreeIter* a, TreeIter* b);
44260 TreeView* gtk_tree_view_new();
44261 TreeView* gtk_tree_view_new_with_model(TreeModel* model);
44262 int gtk_tree_view_append_column(TreeView* this_, TreeViewColumn* column);
44263 void gtk_tree_view_collapse_all(TreeView* this_);
44264 int gtk_tree_view_collapse_row(TreeView* this_, TreePath* path);
44265 void gtk_tree_view_columns_autosize(TreeView* this_);
44266 void gtk_tree_view_convert_bin_window_to_tree_coords(TreeView* this_, int bx, int by, /*out*/ int* tx, /*out*/ int* ty);
44267 void gtk_tree_view_convert_bin_window_to_widget_coords(TreeView* this_, int bx, int by, /*out*/ int* wx, /*out*/ int* wy);
44268 void gtk_tree_view_convert_tree_to_bin_window_coords(TreeView* this_, int tx, int ty, /*out*/ int* bx, /*out*/ int* by);
44269 void gtk_tree_view_convert_tree_to_widget_coords(TreeView* this_, int tx, int ty, /*out*/ int* wx, /*out*/ int* wy);
44270 void gtk_tree_view_convert_widget_to_bin_window_coords(TreeView* this_, int wx, int wy, /*out*/ int* bx, /*out*/ int* by);
44271 void gtk_tree_view_convert_widget_to_tree_coords(TreeView* this_, int wx, int wy, /*out*/ int* tx, /*out*/ int* ty);
44272 Gdk2.Pixmap* gtk_tree_view_create_row_drag_icon(TreeView* this_, TreePath* path);
44273 void gtk_tree_view_enable_model_drag_dest(TreeView* this_, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
44274 void gtk_tree_view_enable_model_drag_source(TreeView* this_, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
44275 void gtk_tree_view_expand_all(TreeView* this_);
44276 int gtk_tree_view_expand_row(TreeView* this_, TreePath* path, int open_all);
44277 void gtk_tree_view_expand_to_path(TreeView* this_, TreePath* path);
44278 void gtk_tree_view_get_background_area(TreeView* this_, TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect);
44279 Gdk2.Window* gtk_tree_view_get_bin_window(TreeView* this_);
44280 void gtk_tree_view_get_cell_area(TreeView* this_, TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect);
44281 TreeViewColumn* gtk_tree_view_get_column(TreeView* this_, int n);
44282 GLib2.List* /*new container*/ gtk_tree_view_get_columns(TreeView* this_);
44283 void gtk_tree_view_get_cursor(TreeView* this_, /*out*/ TreePath** path=null, /*out*/ TreeViewColumn** focus_column=null);
44284 int gtk_tree_view_get_dest_row_at_pos(TreeView* this_, int drag_x, int drag_y, /*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null);
44285 void gtk_tree_view_get_drag_dest_row(TreeView* this_, /*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null);
44286 int gtk_tree_view_get_enable_search(TreeView* this_);
44287 int gtk_tree_view_get_enable_tree_lines(TreeView* this_);
44288 TreeViewColumn* gtk_tree_view_get_expander_column(TreeView* this_);
44289 int gtk_tree_view_get_fixed_height_mode(TreeView* this_);
44290 TreeViewGridLines gtk_tree_view_get_grid_lines(TreeView* this_);
44291 Adjustment* gtk_tree_view_get_hadjustment(TreeView* this_);
44292 int gtk_tree_view_get_headers_clickable(TreeView* this_);
44293 int gtk_tree_view_get_headers_visible(TreeView* this_);
44294 int gtk_tree_view_get_hover_expand(TreeView* this_);
44295 int gtk_tree_view_get_hover_selection(TreeView* this_);
44296 int gtk_tree_view_get_level_indentation(TreeView* this_);
44297 TreeModel* gtk_tree_view_get_model(TreeView* this_);
44298 int gtk_tree_view_get_path_at_pos(TreeView* this_, int x, int y, /*out*/ TreePath** path=null, /*out*/ TreeViewColumn** column=null, /*out*/ int* cell_x=null, /*out*/ int* cell_y=null);
44299 int gtk_tree_view_get_reorderable(TreeView* this_);
44300 TreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func(TreeView* this_);
44301 int gtk_tree_view_get_rubber_banding(TreeView* this_);
44302 int gtk_tree_view_get_rules_hint(TreeView* this_);
44303 int gtk_tree_view_get_search_column(TreeView* this_);
44304 Entry* gtk_tree_view_get_search_entry(TreeView* this_);
44305 TreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func(TreeView* this_);
44306 TreeViewSearchPositionFunc gtk_tree_view_get_search_position_func(TreeView* this_);
44307 TreeSelection* gtk_tree_view_get_selection(TreeView* this_);
44308 int gtk_tree_view_get_show_expanders(TreeView* this_);
44309 int gtk_tree_view_get_tooltip_column(TreeView* this_);
44310 int gtk_tree_view_get_tooltip_context(TreeView* this_, /*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ TreeModel** model=null, /*out*/ TreePath** path=null, /*out*/ TreeIter* iter=null);
44311 Adjustment* gtk_tree_view_get_vadjustment(TreeView* this_);
44312 int gtk_tree_view_get_visible_range(TreeView* this_, /*out*/ TreePath** start_path=null, /*out*/ TreePath** end_path=null);
44313 void gtk_tree_view_get_visible_rect(TreeView* this_, /*out*/ Gdk2.Rectangle* visible_rect);
44314 int gtk_tree_view_insert_column(TreeView* this_, TreeViewColumn* column, int position);
44315 int gtk_tree_view_insert_column_with_attributes(TreeView* this_, int position, char* title, CellRenderer* cell, ...);
44316 int gtk_tree_view_insert_column_with_data_func(TreeView* this_, int position, char* title, CellRenderer* cell, TreeCellDataFunc func, void* data, GLib2.DestroyNotify dnotify);
44317 int gtk_tree_view_is_rubber_banding_active(TreeView* this_);
44318 void gtk_tree_view_map_expanded_rows(TreeView* this_, TreeViewMappingFunc func, void* data);
44319 void gtk_tree_view_move_column_after(TreeView* this_, TreeViewColumn* column, TreeViewColumn* base_column=null);
44320 int gtk_tree_view_remove_column(TreeView* this_, TreeViewColumn* column);
44321 void gtk_tree_view_row_activated(TreeView* this_, TreePath* path, TreeViewColumn* column);
44322 int gtk_tree_view_row_expanded(TreeView* this_, TreePath* path);
44323 void gtk_tree_view_scroll_to_cell(TreeView* this_, TreePath* path, TreeViewColumn* column, int use_align, float row_align, float col_align);
44324 void gtk_tree_view_scroll_to_point(TreeView* this_, int tree_x, int tree_y);
44325 void gtk_tree_view_set_column_drag_function(TreeView* this_, TreeViewColumnDropFunc func=null, void* user_data=null, GLib2.DestroyNotify destroy=null);
44326 void gtk_tree_view_set_cursor(TreeView* this_, TreePath* path, TreeViewColumn* focus_column, int start_editing);
44327 void gtk_tree_view_set_cursor_on_cell(TreeView* this_, TreePath* path, TreeViewColumn* focus_column, CellRenderer* focus_cell, int start_editing);
44328 void gtk_tree_view_set_destroy_count_func(TreeView* this_, TreeDestroyCountFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null);
44329 void gtk_tree_view_set_drag_dest_row(TreeView* this_, TreePath* path, TreeViewDropPosition pos);
44330 void gtk_tree_view_set_enable_search(TreeView* this_, int enable_search);
44331 void gtk_tree_view_set_enable_tree_lines(TreeView* this_, int enabled);
44332 void gtk_tree_view_set_expander_column(TreeView* this_, TreeViewColumn* column);
44333 void gtk_tree_view_set_fixed_height_mode(TreeView* this_, int enable);
44334 void gtk_tree_view_set_grid_lines(TreeView* this_, TreeViewGridLines grid_lines);
44335 void gtk_tree_view_set_hadjustment(TreeView* this_, Adjustment* adjustment=null);
44336 void gtk_tree_view_set_headers_clickable(TreeView* this_, int setting);
44337 void gtk_tree_view_set_headers_visible(TreeView* this_, int headers_visible);
44338 void gtk_tree_view_set_hover_expand(TreeView* this_, int expand);
44339 void gtk_tree_view_set_hover_selection(TreeView* this_, int hover);
44340 void gtk_tree_view_set_level_indentation(TreeView* this_, int indentation);
44341 void gtk_tree_view_set_model(TreeView* this_, TreeModel* model=null);
44342 void gtk_tree_view_set_reorderable(TreeView* this_, int reorderable);
44343 void gtk_tree_view_set_row_separator_func(TreeView* this_, TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
44344 void gtk_tree_view_set_rubber_banding(TreeView* this_, int enable);
44345 void gtk_tree_view_set_rules_hint(TreeView* this_, int setting);
44346 void gtk_tree_view_set_search_column(TreeView* this_, int column);
44347 void gtk_tree_view_set_search_entry(TreeView* this_, Entry* entry=null);
44348 void gtk_tree_view_set_search_equal_func(TreeView* this_, TreeViewSearchEqualFunc search_equal_func, void* search_user_data=null, GLib2.DestroyNotify search_destroy=null);
44349 void gtk_tree_view_set_search_position_func(TreeView* this_, TreeViewSearchPositionFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null);
44350 void gtk_tree_view_set_show_expanders(TreeView* this_, int enabled);
44351 void gtk_tree_view_set_tooltip_cell(TreeView* this_, Tooltip* tooltip, TreePath* path=null, TreeViewColumn* column=null, CellRenderer* cell=null);
44352 void gtk_tree_view_set_tooltip_column(TreeView* this_, int column);
44353 void gtk_tree_view_set_tooltip_row(TreeView* this_, Tooltip* tooltip, TreePath* path);
44354 void gtk_tree_view_set_vadjustment(TreeView* this_, Adjustment* adjustment=null);
44355 void gtk_tree_view_tree_to_widget_coords(TreeView* this_, int tx, int ty, int* wx, int* wy);
44356 void gtk_tree_view_unset_rows_drag_dest(TreeView* this_);
44357 void gtk_tree_view_unset_rows_drag_source(TreeView* this_);
44358 void gtk_tree_view_widget_to_tree_coords(TreeView* this_, int wx, int wy, int* tx, int* ty);
44359 TreeViewColumn* gtk_tree_view_column_new();
44360 TreeViewColumn* gtk_tree_view_column_new_with_attributes(char* title, CellRenderer* cell, ...);
44361 void gtk_tree_view_column_add_attribute(TreeViewColumn* this_, CellRenderer* cell_renderer, char* attribute, int column);
44362 int gtk_tree_view_column_cell_get_position(TreeViewColumn* this_, CellRenderer* cell_renderer, int* start_pos, int* width);
44363 void gtk_tree_view_column_cell_get_size(TreeViewColumn* this_, Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null);
44364 int gtk_tree_view_column_cell_is_visible(TreeViewColumn* this_);
44365 void gtk_tree_view_column_cell_set_cell_data(TreeViewColumn* this_, TreeModel* tree_model, TreeIter* iter, int is_expander, int is_expanded);
44366 void gtk_tree_view_column_clear(TreeViewColumn* this_);
44367 void gtk_tree_view_column_clear_attributes(TreeViewColumn* this_, CellRenderer* cell_renderer);
44368 void gtk_tree_view_column_clicked(TreeViewColumn* this_);
44369 void gtk_tree_view_column_focus_cell(TreeViewColumn* this_, CellRenderer* cell);
44370 float gtk_tree_view_column_get_alignment(TreeViewColumn* this_);
44371 GLib2.List* gtk_tree_view_column_get_cell_renderers(TreeViewColumn* this_);
44372 int gtk_tree_view_column_get_clickable(TreeViewColumn* this_);
44373 int gtk_tree_view_column_get_expand(TreeViewColumn* this_);
44374 int gtk_tree_view_column_get_fixed_width(TreeViewColumn* this_);
44375 int gtk_tree_view_column_get_max_width(TreeViewColumn* this_);
44376 int gtk_tree_view_column_get_min_width(TreeViewColumn* this_);
44377 int gtk_tree_view_column_get_reorderable(TreeViewColumn* this_);
44378 int gtk_tree_view_column_get_resizable(TreeViewColumn* this_);
44379 TreeViewColumnSizing gtk_tree_view_column_get_sizing(TreeViewColumn* this_);
44380 int gtk_tree_view_column_get_sort_column_id(TreeViewColumn* this_);
44381 int gtk_tree_view_column_get_sort_indicator(TreeViewColumn* this_);
44382 SortType gtk_tree_view_column_get_sort_order(TreeViewColumn* this_);
44383 int gtk_tree_view_column_get_spacing(TreeViewColumn* this_);
44384 char* gtk_tree_view_column_get_title(TreeViewColumn* this_);
44385 Widget* gtk_tree_view_column_get_tree_view(TreeViewColumn* this_);
44386 int gtk_tree_view_column_get_visible(TreeViewColumn* this_);
44387 Widget* gtk_tree_view_column_get_widget(TreeViewColumn* this_);
44388 int gtk_tree_view_column_get_width(TreeViewColumn* this_);
44389 void gtk_tree_view_column_pack_end(TreeViewColumn* this_, CellRenderer* cell, int expand);
44390 void gtk_tree_view_column_pack_start(TreeViewColumn* this_, CellRenderer* cell, int expand);
44391 void gtk_tree_view_column_queue_resize(TreeViewColumn* this_);
44392 void gtk_tree_view_column_set_alignment(TreeViewColumn* this_, float xalign);
44393 void gtk_tree_view_column_set_attributes(TreeViewColumn* this_, CellRenderer* cell_renderer, ...);
44394 void gtk_tree_view_column_set_cell_data_func(TreeViewColumn* this_, CellRenderer* cell_renderer, TreeCellDataFunc func, void* func_data, GLib2.DestroyNotify destroy);
44395 void gtk_tree_view_column_set_clickable(TreeViewColumn* this_, int clickable);
44396 void gtk_tree_view_column_set_expand(TreeViewColumn* this_, int expand);
44397 void gtk_tree_view_column_set_fixed_width(TreeViewColumn* this_, int fixed_width);
44398 void gtk_tree_view_column_set_max_width(TreeViewColumn* this_, int max_width);
44399 void gtk_tree_view_column_set_min_width(TreeViewColumn* this_, int min_width);
44400 void gtk_tree_view_column_set_reorderable(TreeViewColumn* this_, int reorderable);
44401 void gtk_tree_view_column_set_resizable(TreeViewColumn* this_, int resizable);
44402 void gtk_tree_view_column_set_sizing(TreeViewColumn* this_, TreeViewColumnSizing type);
44403 void gtk_tree_view_column_set_sort_column_id(TreeViewColumn* this_, int sort_column_id);
44404 void gtk_tree_view_column_set_sort_indicator(TreeViewColumn* this_, int setting);
44405 void gtk_tree_view_column_set_sort_order(TreeViewColumn* this_, SortType order);
44406 void gtk_tree_view_column_set_spacing(TreeViewColumn* this_, int spacing);
44407 void gtk_tree_view_column_set_title(TreeViewColumn* this_, char* title);
44408 void gtk_tree_view_column_set_visible(TreeViewColumn* this_, int visible);
44409 void gtk_tree_view_column_set_widget(TreeViewColumn* this_, Widget* widget=null);
44410 UIManager* /*new*/ gtk_ui_manager_new();
44411 void gtk_ui_manager_add_ui(UIManager* this_, uint merge_id, char* path, char* name, char* action, UIManagerItemType type, int top);
44412 uint gtk_ui_manager_add_ui_from_file(UIManager* this_, char* filename, GLib2.Error** error);
44413 uint gtk_ui_manager_add_ui_from_string(UIManager* this_, char* buffer, ssize_t length, GLib2.Error** error);
44414 void gtk_ui_manager_ensure_update(UIManager* this_);
44415 AccelGroup* gtk_ui_manager_get_accel_group(UIManager* this_);
44416 Action* gtk_ui_manager_get_action(UIManager* this_, char* path);
44417 GLib2.List* gtk_ui_manager_get_action_groups(UIManager* this_);
44418 int gtk_ui_manager_get_add_tearoffs(UIManager* this_);
44419 GLib2.SList* /*new container*/ gtk_ui_manager_get_toplevels(UIManager* this_, UIManagerItemType types);
44420 char* /*new*/ gtk_ui_manager_get_ui(UIManager* this_);
44421 Widget* gtk_ui_manager_get_widget(UIManager* this_, char* path);
44422 void gtk_ui_manager_insert_action_group(UIManager* this_, ActionGroup* action_group, int pos);
44423 uint gtk_ui_manager_new_merge_id(UIManager* this_);
44424 void gtk_ui_manager_remove_action_group(UIManager* this_, ActionGroup* action_group);
44425 void gtk_ui_manager_remove_ui(UIManager* this_, uint merge_id);
44426 void gtk_ui_manager_set_add_tearoffs(UIManager* this_, int add_tearoffs);
44427 VBox* gtk_vbox_new(int homogeneous, int spacing);
44428 VButtonBox* gtk_vbutton_box_new();
44429 ButtonBoxStyle gtk_vbutton_box_get_layout_default();
44430 int gtk_vbutton_box_get_spacing_default();
44431 void gtk_vbutton_box_set_layout_default(ButtonBoxStyle layout);
44432 void gtk_vbutton_box_set_spacing_default(int spacing);
44433 VPaned* gtk_vpaned_new();
44434 VRuler* gtk_vruler_new();
44435 VScale* gtk_vscale_new(Adjustment* adjustment);
44436 VScale* gtk_vscale_new_with_range(double min, double max, double step);
44437 VScrollbar* gtk_vscrollbar_new(Adjustment* adjustment=null);
44438 VSeparator* gtk_vseparator_new();
44439 Viewport* gtk_viewport_new(Adjustment* hadjustment, Adjustment* vadjustment);
44440 Gdk2.Window* gtk_viewport_get_bin_window(Viewport* this_);
44441 Adjustment* gtk_viewport_get_hadjustment(Viewport* this_);
44442 ShadowType gtk_viewport_get_shadow_type(Viewport* this_);
44443 Adjustment* gtk_viewport_get_vadjustment(Viewport* this_);
44444 Gdk2.Window* gtk_viewport_get_view_window(Viewport* this_);
44445 void gtk_viewport_set_hadjustment(Viewport* this_, Adjustment* adjustment=null);
44446 void gtk_viewport_set_shadow_type(Viewport* this_, ShadowType type);
44447 void gtk_viewport_set_vadjustment(Viewport* this_, Adjustment* adjustment=null);
44448 VolumeButton* gtk_volume_button_new();
44449 Widget* gtk_widget_new(Type type, char* first_property_name, ...);
44450 Gdk2.Colormap* gtk_widget_get_default_colormap();
44451 TextDirection gtk_widget_get_default_direction();
44452 Style* gtk_widget_get_default_style();
44453 Gdk2.Visual* gtk_widget_get_default_visual();
44454 void gtk_widget_pop_colormap();
44455 void gtk_widget_pop_composite_child();
44456 void gtk_widget_push_colormap(Gdk2.Colormap* cmap);
44457 void gtk_widget_push_composite_child();
44458 void gtk_widget_set_default_colormap(Gdk2.Colormap* colormap);
44459 void gtk_widget_set_default_direction(TextDirection dir);
44460 int gtk_widget_activate(Widget* this_);
44461 void gtk_widget_add_accelerator(Widget* this_, char* accel_signal, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags);
44462 void gtk_widget_add_events(Widget* this_, int events);
44463 void gtk_widget_add_mnemonic_label(Widget* this_, Widget* label);
44464 int gtk_widget_can_activate_accel(Widget* this_, uint signal_id);
44465 int gtk_widget_child_focus(Widget* this_, DirectionType direction);
44466 void gtk_widget_child_notify(Widget* this_, char* child_property);
44467 void gtk_widget_class_path(Widget* this_, /*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null);
44468 Pango.Context* /*new*/ gtk_widget_create_pango_context(Widget* this_);
44469 Pango.Layout* /*new*/ gtk_widget_create_pango_layout(Widget* this_, char* text);
44470 void gtk_widget_destroy(Widget* this_);
44471 void gtk_widget_destroyed(Widget* this_, /*inout*/ Widget** widget_pointer);
44472 void gtk_widget_draw(Widget* this_, Gdk2.Rectangle* area);
44473 void gtk_widget_ensure_style(Widget* this_);
44474 void gtk_widget_error_bell(Widget* this_);
44475 int gtk_widget_event(Widget* this_, Gdk2.Event* event);
44476 void gtk_widget_freeze_child_notify(Widget* this_);
44477 Atk.Object* gtk_widget_get_accessible(Widget* this_);
44478 Action* gtk_widget_get_action(Widget* this_);
44479 void gtk_widget_get_allocation(Widget* this_, /*out*/ Allocation* allocation);
44480 Widget* gtk_widget_get_ancestor(Widget* this_, Type widget_type);
44481 int gtk_widget_get_app_paintable(Widget* this_);
44482 int gtk_widget_get_can_default(Widget* this_);
44483 int gtk_widget_get_can_focus(Widget* this_);
44484 void gtk_widget_get_child_requisition(Widget* this_, Requisition* requisition);
44485 int gtk_widget_get_child_visible(Widget* this_);
44486 Clipboard* gtk_widget_get_clipboard(Widget* this_, Gdk2.Atom selection);
44487 Gdk2.Colormap* gtk_widget_get_colormap(Widget* this_);
44488 char* /*new*/ gtk_widget_get_composite_name(Widget* this_);
44489 TextDirection gtk_widget_get_direction(Widget* this_);
44490 Gdk2.Display* gtk_widget_get_display(Widget* this_);
44491 int gtk_widget_get_double_buffered(Widget* this_);
44492 int gtk_widget_get_events(Widget* this_);
44493 Gdk2.ExtensionMode gtk_widget_get_extension_events(Widget* this_);
44494 int gtk_widget_get_has_tooltip(Widget* this_);
44495 int gtk_widget_get_has_window(Widget* this_);
44496 int gtk_widget_get_mapped(Widget* this_);
44497 RcStyle* gtk_widget_get_modifier_style(Widget* this_);
44498 char* gtk_widget_get_name(Widget* this_);
44499 int gtk_widget_get_no_show_all(Widget* this_);
44500 Pango.Context* gtk_widget_get_pango_context(Widget* this_);
44501 Widget* gtk_widget_get_parent(Widget* this_);
44502 Gdk2.Window* gtk_widget_get_parent_window(Widget* this_);
44503 void gtk_widget_get_pointer(Widget* this_, /*out*/ int* x=null, /*out*/ int* y=null);
44504 int gtk_widget_get_realized(Widget* this_);
44505 int gtk_widget_get_receives_default(Widget* this_);
44506 void gtk_widget_get_requisition(Widget* this_, /*out*/ Requisition* requisition);
44507 Gdk2.Window* gtk_widget_get_root_window(Widget* this_);
44508 Gdk2.Screen* gtk_widget_get_screen(Widget* this_);
44509 int gtk_widget_get_sensitive(Widget* this_);
44510 Settings* gtk_widget_get_settings(Widget* this_);
44511 void gtk_widget_get_size_request(Widget* this_, /*out*/ int* width=null, /*out*/ int* height=null);
44512 Gdk2.Pixmap* gtk_widget_get_snapshot(Widget* this_, Gdk2.Rectangle* clip_rect=null);
44513 StateType gtk_widget_get_state(Widget* this_);
44514 Style* gtk_widget_get_style(Widget* this_);
44515 char* /*new*/ gtk_widget_get_tooltip_markup(Widget* this_);
44516 char* /*new*/ gtk_widget_get_tooltip_text(Widget* this_);
44517 Window* gtk_widget_get_tooltip_window(Widget* this_);
44518 Widget* gtk_widget_get_toplevel(Widget* this_);
44519 int gtk_widget_get_visible(Widget* this_);
44520 Gdk2.Visual* gtk_widget_get_visual(Widget* this_);
44521 Gdk2.Window* gtk_widget_get_window(Widget* this_);
44522 void gtk_widget_grab_default(Widget* this_);
44523 void gtk_widget_grab_focus(Widget* this_);
44524 int gtk_widget_has_default(Widget* this_);
44525 int gtk_widget_has_focus(Widget* this_);
44526 int gtk_widget_has_grab(Widget* this_);
44527 int gtk_widget_has_rc_style(Widget* this_);
44528 int gtk_widget_has_screen(Widget* this_);
44529 void gtk_widget_hide(Widget* this_);
44530 void gtk_widget_hide_all(Widget* this_);
44531 int gtk_widget_hide_on_delete(Widget* this_);
44532 void gtk_widget_input_shape_combine_mask(Widget* this_, Gdk2.Bitmap* shape_mask, int offset_x, int offset_y);
44533 int gtk_widget_intersect(Widget* this_, Gdk2.Rectangle* area, Gdk2.Rectangle* intersection);
44534 int gtk_widget_is_ancestor(Widget* this_, Widget* ancestor);
44535 int gtk_widget_is_composited(Widget* this_);
44536 int gtk_widget_is_drawable(Widget* this_);
44537 int gtk_widget_is_focus(Widget* this_);
44538 int gtk_widget_is_sensitive(Widget* this_);
44539 int gtk_widget_is_toplevel(Widget* this_);
44540 int gtk_widget_keynav_failed(Widget* this_, DirectionType direction);
44541 GLib2.List* /*new container*/ gtk_widget_list_accel_closures(Widget* this_);
44542 GLib2.List* /*new container*/ gtk_widget_list_mnemonic_labels(Widget* this_);
44543 void gtk_widget_map(Widget* this_);
44544 int gtk_widget_mnemonic_activate(Widget* this_, int group_cycling);
44545 void gtk_widget_modify_base(Widget* this_, StateType state, Gdk2.Color* color=null);
44546 void gtk_widget_modify_bg(Widget* this_, StateType state, Gdk2.Color* color=null);
44547 void gtk_widget_modify_cursor(Widget* this_, Gdk2.Color* primary, Gdk2.Color* secondary);
44548 void gtk_widget_modify_fg(Widget* this_, StateType state, Gdk2.Color* color=null);
44549 void gtk_widget_modify_font(Widget* this_, Pango.FontDescription* font_desc=null);
44550 void gtk_widget_modify_style(Widget* this_, RcStyle* style);
44551 void gtk_widget_modify_text(Widget* this_, StateType state, Gdk2.Color* color=null);
44552 void gtk_widget_path(Widget* this_, /*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null);
44553 void gtk_widget_queue_clear(Widget* this_);
44554 void gtk_widget_queue_clear_area(Widget* this_, int x, int y, int width, int height);
44555 void gtk_widget_queue_draw(Widget* this_);
44556 void gtk_widget_queue_draw_area(Widget* this_, int x, int y, int width, int height);
44557 void gtk_widget_queue_resize(Widget* this_);
44558 void gtk_widget_queue_resize_no_redraw(Widget* this_);
44559 void gtk_widget_realize(Widget* this_);
44560 Widget* gtk_widget_ref(Widget* this_);
44561 Gdk2.Region* gtk_widget_region_intersect(Widget* this_, Gdk2.Region* region);
44562 int gtk_widget_remove_accelerator(Widget* this_, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods);
44563 void gtk_widget_remove_mnemonic_label(Widget* this_, Widget* label);
44564 GdkPixbuf2.Pixbuf* /*new*/ gtk_widget_render_icon(Widget* this_, char* stock_id, IconSize size, char* detail=null);
44565 void gtk_widget_reparent(Widget* this_, Widget* new_parent);
44566 void gtk_widget_reset_rc_styles(Widget* this_);
44567 void gtk_widget_reset_shapes(Widget* this_);
44568 int gtk_widget_send_expose(Widget* this_, Gdk2.Event* event);
44569 int gtk_widget_send_focus_change(Widget* this_, Gdk2.Event* event);
44570 void gtk_widget_set(Widget* this_, char* first_property_name, ...);
44571 void gtk_widget_set_accel_path(Widget* this_, char* accel_path=null, AccelGroup* accel_group=null);
44572 void gtk_widget_set_allocation(Widget* this_, Allocation* allocation);
44573 void gtk_widget_set_app_paintable(Widget* this_, int app_paintable);
44574 void gtk_widget_set_can_default(Widget* this_, int can_default);
44575 void gtk_widget_set_can_focus(Widget* this_, int can_focus);
44576 void gtk_widget_set_child_visible(Widget* this_, int is_visible);
44577 void gtk_widget_set_colormap(Widget* this_, Gdk2.Colormap* colormap);
44578 void gtk_widget_set_composite_name(Widget* this_, char* name);
44579 void gtk_widget_set_direction(Widget* this_, TextDirection dir);
44580 void gtk_widget_set_double_buffered(Widget* this_, int double_buffered);
44581 void gtk_widget_set_events(Widget* this_, int events);
44582 void gtk_widget_set_extension_events(Widget* this_, Gdk2.ExtensionMode mode);
44583 void gtk_widget_set_has_tooltip(Widget* this_, int has_tooltip);
44584 void gtk_widget_set_has_window(Widget* this_, int has_window);
44585 void gtk_widget_set_mapped(Widget* this_, int mapped);
44586 void gtk_widget_set_name(Widget* this_, char* name);
44587 void gtk_widget_set_no_show_all(Widget* this_, int no_show_all);
44588 void gtk_widget_set_parent(Widget* this_, Widget* parent);
44589 void gtk_widget_set_parent_window(Widget* this_, Gdk2.Window* parent_window);
44590 void gtk_widget_set_realized(Widget* this_, int realized);
44591 void gtk_widget_set_receives_default(Widget* this_, int receives_default);
44592 void gtk_widget_set_redraw_on_allocate(Widget* this_, int redraw_on_allocate);
44593 int gtk_widget_set_scroll_adjustments(Widget* this_, Adjustment* hadjustment=null, Adjustment* vadjustment=null);
44594 void gtk_widget_set_sensitive(Widget* this_, int sensitive);
44595 void gtk_widget_set_size_request(Widget* this_, int width, int height);
44596 void gtk_widget_set_state(Widget* this_, StateType state);
44597 void gtk_widget_set_style(Widget* this_, Style* style=null);
44598 void gtk_widget_set_tooltip_markup(Widget* this_, char* markup=null);
44599 void gtk_widget_set_tooltip_text(Widget* this_, char* text);
44600 void gtk_widget_set_tooltip_window(Widget* this_, Window* custom_window=null);
44601 void gtk_widget_set_uposition(Widget* this_, int x, int y);
44602 void gtk_widget_set_usize(Widget* this_, int width, int height);
44603 void gtk_widget_set_visible(Widget* this_, int visible);
44604 void gtk_widget_set_window(Widget* this_, Gdk2.Window* window);
44605 void gtk_widget_shape_combine_mask(Widget* this_, Gdk2.Bitmap* shape_mask, int offset_x, int offset_y);
44606 void gtk_widget_show(Widget* this_);
44607 void gtk_widget_show_all(Widget* this_);
44608 void gtk_widget_show_now(Widget* this_);
44609 void gtk_widget_size_allocate(Widget* this_, Allocation* allocation);
44610 void gtk_widget_size_request(Widget* this_, Requisition* requisition);
44611 void gtk_widget_style_attach(Widget* this_);
44612 void gtk_widget_style_get(Widget* this_, char* first_property_name, ...);
44613 void gtk_widget_style_get_property(Widget* this_, char* property_name, GObject2.Value* value);
44614 void gtk_widget_style_get_valist(Widget* this_, char* first_property_name, va_list var_args);
44615 void gtk_widget_thaw_child_notify(Widget* this_);
44616 int gtk_widget_translate_coordinates(Widget* this_, Widget* dest_widget, int src_x, int src_y, /*out*/ int* dest_x, /*out*/ int* dest_y);
44617 void gtk_widget_trigger_tooltip_query(Widget* this_);
44618 void gtk_widget_unmap(Widget* this_);
44619 void gtk_widget_unparent(Widget* this_);
44620 void gtk_widget_unrealize(Widget* this_);
44621 void gtk_widget_unref(Widget* this_);
44622 GObject2.ParamSpec* gtk_widget_class_find_style_property(WidgetClass* this_, char* property_name);
44623 void gtk_widget_class_install_style_property(WidgetClass* this_, GObject2.ParamSpec* pspec);
44624 void gtk_widget_class_install_style_property_parser(WidgetClass* this_, GObject2.ParamSpec* pspec, RcPropertyParser parser);
44625 GObject2.ParamSpec** /*new container*/ gtk_widget_class_list_style_properties(WidgetClass* this_, /*out*/ uint* n_properties);
44626 Window* gtk_window_new(WindowType type);
44627 GLib2.List* /*new container*/ gtk_window_get_default_icon_list();
44628 char* gtk_window_get_default_icon_name();
44629 GLib2.List* /*new container*/ gtk_window_list_toplevels();
44630 void gtk_window_set_auto_startup_notification(int setting);
44631 void gtk_window_set_default_icon(GdkPixbuf2.Pixbuf* icon);
44632 int gtk_window_set_default_icon_from_file(char* filename, GLib2.Error** error);
44633 void gtk_window_set_default_icon_list(GLib2.List* list);
44634 void gtk_window_set_default_icon_name(char* name);
44635 int gtk_window_activate_default(Window* this_);
44636 int gtk_window_activate_focus(Window* this_);
44637 int gtk_window_activate_key(Window* this_, Gdk2.EventKey* event);
44638 void gtk_window_add_accel_group(Window* this_, AccelGroup* accel_group);
44639 void gtk_window_add_embedded_xid(Window* this_, Gdk2.NativeWindow xid);
44640 void gtk_window_add_mnemonic(Window* this_, uint keyval, Widget* target);
44641 void gtk_window_begin_move_drag(Window* this_, int button, int root_x, int root_y, uint timestamp);
44642 void gtk_window_begin_resize_drag(Window* this_, Gdk2.WindowEdge edge, int button, int root_x, int root_y, uint timestamp);
44643 void gtk_window_deiconify(Window* this_);
44644 void gtk_window_fullscreen(Window* this_);
44645 int gtk_window_get_accept_focus(Window* this_);
44646 int gtk_window_get_decorated(Window* this_);
44647 void gtk_window_get_default_size(Window* this_, int* width=null, int* height=null);
44648 Widget* gtk_window_get_default_widget(Window* this_);
44649 int gtk_window_get_deletable(Window* this_);
44650 int gtk_window_get_destroy_with_parent(Window* this_);
44651 Widget* gtk_window_get_focus(Window* this_);
44652 int gtk_window_get_focus_on_map(Window* this_);
44653 void gtk_window_get_frame_dimensions(Window* this_, /*out*/ int* left=null, /*out*/ int* top=null, /*out*/ int* right=null, /*out*/ int* bottom=null);
44654 Gdk2.Gravity gtk_window_get_gravity(Window* this_);
44655 WindowGroup* gtk_window_get_group(Window* this_);
44656 int gtk_window_get_has_frame(Window* this_);
44657 GdkPixbuf2.Pixbuf* gtk_window_get_icon(Window* this_);
44658 GLib2.List* /*new container*/ gtk_window_get_icon_list(Window* this_);
44659 char* gtk_window_get_icon_name(Window* this_);
44660 Gdk2.ModifierType gtk_window_get_mnemonic_modifier(Window* this_);
44661 int gtk_window_get_mnemonics_visible(Window* this_);
44662 int gtk_window_get_modal(Window* this_);
44663 double gtk_window_get_opacity(Window* this_);
44664 void gtk_window_get_position(Window* this_, /*out*/ int* root_x=null, /*out*/ int* root_y=null);
44665 int gtk_window_get_resizable(Window* this_);
44666 char* gtk_window_get_role(Window* this_);
44667 Gdk2.Screen* gtk_window_get_screen(Window* this_);
44668 void gtk_window_get_size(Window* this_, /*out*/ int* width=null, /*out*/ int* height=null);
44669 int gtk_window_get_skip_pager_hint(Window* this_);
44670 int gtk_window_get_skip_taskbar_hint(Window* this_);
44671 char* gtk_window_get_title(Window* this_);
44672 Window* gtk_window_get_transient_for(Window* this_);
44673 Gdk2.WindowTypeHint gtk_window_get_type_hint(Window* this_);
44674 int gtk_window_get_urgency_hint(Window* this_);
44675 WindowType gtk_window_get_window_type(Window* this_);
44676 int gtk_window_has_group(Window* this_);
44677 int gtk_window_has_toplevel_focus(Window* this_);
44678 void gtk_window_iconify(Window* this_);
44679 int gtk_window_is_active(Window* this_);
44680 void gtk_window_maximize(Window* this_);
44681 int gtk_window_mnemonic_activate(Window* this_, uint keyval, Gdk2.ModifierType modifier);
44682 void gtk_window_move(Window* this_, int x, int y);
44683 int gtk_window_parse_geometry(Window* this_, char* geometry);
44684 void gtk_window_present(Window* this_);
44685 void gtk_window_present_with_time(Window* this_, uint timestamp);
44686 int gtk_window_propagate_key_event(Window* this_, Gdk2.EventKey* event);
44687 void gtk_window_remove_accel_group(Window* this_, AccelGroup* accel_group);
44688 void gtk_window_remove_embedded_xid(Window* this_, Gdk2.NativeWindow xid);
44689 void gtk_window_remove_mnemonic(Window* this_, uint keyval, Widget* target);
44690 void gtk_window_reshow_with_initial_size(Window* this_);
44691 void gtk_window_resize(Window* this_, int width, int height);
44692 void gtk_window_set_accept_focus(Window* this_, int setting);
44693 void gtk_window_set_decorated(Window* this_, int setting);
44694 void gtk_window_set_default(Window* this_, Widget* default_widget=null);
44695 void gtk_window_set_default_size(Window* this_, int width, int height);
44696 void gtk_window_set_deletable(Window* this_, int setting);
44697 void gtk_window_set_destroy_with_parent(Window* this_, int setting);
44698 void gtk_window_set_focus(Window* this_, Widget* focus=null);
44699 void gtk_window_set_focus_on_map(Window* this_, int setting);
44700 void gtk_window_set_frame_dimensions(Window* this_, int left, int top, int right, int bottom);
44701 void gtk_window_set_geometry_hints(Window* this_, Widget* geometry_widget, Gdk2.Geometry* geometry, Gdk2.WindowHints geom_mask);
44702 void gtk_window_set_gravity(Window* this_, Gdk2.Gravity gravity);
44703 void gtk_window_set_has_frame(Window* this_, int setting);
44704 void gtk_window_set_icon(Window* this_, GdkPixbuf2.Pixbuf* icon=null);
44705 int gtk_window_set_icon_from_file(Window* this_, char* filename, GLib2.Error** error);
44706 void gtk_window_set_icon_list(Window* this_, GLib2.List* list);
44707 void gtk_window_set_icon_name(Window* this_, char* name=null);
44708 void gtk_window_set_keep_above(Window* this_, int setting);
44709 void gtk_window_set_keep_below(Window* this_, int setting);
44710 void gtk_window_set_mnemonic_modifier(Window* this_, Gdk2.ModifierType modifier);
44711 void gtk_window_set_mnemonics_visible(Window* this_, int setting);
44712 void gtk_window_set_modal(Window* this_, int modal);
44713 void gtk_window_set_opacity(Window* this_, double opacity);
44714 void gtk_window_set_policy(Window* this_, int allow_shrink, int allow_grow, int auto_shrink);
44715 void gtk_window_set_position(Window* this_, WindowPosition position);
44716 void gtk_window_set_resizable(Window* this_, int resizable);
44717 void gtk_window_set_role(Window* this_, char* role);
44718 void gtk_window_set_screen(Window* this_, Gdk2.Screen* screen);
44719 void gtk_window_set_skip_pager_hint(Window* this_, int setting);
44720 void gtk_window_set_skip_taskbar_hint(Window* this_, int setting);
44721 void gtk_window_set_startup_id(Window* this_, char* startup_id);
44722 void gtk_window_set_title(Window* this_, char* title);
44723 void gtk_window_set_transient_for(Window* this_, Window* parent=null);
44724 void gtk_window_set_type_hint(Window* this_, Gdk2.WindowTypeHint hint);
44725 void gtk_window_set_urgency_hint(Window* this_, int setting);
44726 void gtk_window_set_wmclass(Window* this_, char* wmclass_name, char* wmclass_class);
44727 void gtk_window_stick(Window* this_);
44728 void gtk_window_unfullscreen(Window* this_);
44729 void gtk_window_unmaximize(Window* this_);
44730 void gtk_window_unstick(Window* this_);
44731 WindowGroup* /*new*/ gtk_window_group_new();
44732 void gtk_window_group_add_window(WindowGroup* this_, Window* window);
44733 Widget* gtk_window_group_get_current_grab(WindowGroup* this_);
44734 GLib2.List* /*new container*/ gtk_window_group_list_windows(WindowGroup* this_);
44735 void gtk_window_group_remove_window(WindowGroup* this_, Window* window);
44736 int gtk_accel_groups_activate(GObject2.Object* object, uint accel_key, Gdk2.ModifierType accel_mods);
44737 GLib2.SList* gtk_accel_groups_from_object(GObject2.Object* object);
44738 uint gtk_accelerator_get_default_mod_mask();
44739 char* /*new*/ gtk_accelerator_get_label(uint accelerator_key, Gdk2.ModifierType accelerator_mods);
44740 char* /*new*/ gtk_accelerator_name(uint accelerator_key, Gdk2.ModifierType accelerator_mods);
44741 void gtk_accelerator_parse(char* accelerator, /*out*/ uint* accelerator_key=null, /*out*/ Gdk2.ModifierType* accelerator_mods=null);
44742 void gtk_accelerator_set_default_mod_mask(Gdk2.ModifierType default_mod_mask);
44743 int gtk_accelerator_valid(uint keyval, Gdk2.ModifierType modifiers);
44744 int gtk_alternative_dialog_button_order(Gdk2.Screen* screen=null);
44745 void gtk_binding_entry_add_signal(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, uint n_args, ...);
44746 void gtk_binding_entry_add_signall(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, GLib2.SList* binding_args);
44747 void gtk_binding_entry_clear(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers);
44748 void gtk_binding_entry_remove(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers);
44749 void gtk_binding_entry_skip(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers);
44750 uint gtk_binding_parse_binding(GLib2.Scanner* scanner);
44751 BindingSet* gtk_binding_set_by_class(void* object_class);
44752 BindingSet* gtk_binding_set_find(char* set_name);
44753 BindingSet* gtk_binding_set_new(char* set_name);
44754 int gtk_bindings_activate(Object* object, uint keyval, Gdk2.ModifierType modifiers);
44755 int gtk_bindings_activate_event(Object* object, Gdk2.EventKey* event);
44756 GLib2.Quark gtk_builder_error_quark();
44757 char* gtk_check_version(uint required_major, uint required_minor, uint required_micro);
44758 Type gtk_ctree_node_get_type();
44759 void gtk_disable_setlocale();
44760 Gdk2.DragContext* gtk_drag_begin(Widget* widget, TargetList* targets, Gdk2.DragAction actions, int button, Gdk2.Event* event);
44761 int gtk_drag_check_threshold(Widget* widget, int start_x, int start_y, int current_x, int current_y);
44762 void gtk_drag_dest_add_image_targets(Widget* widget);
44763 void gtk_drag_dest_add_text_targets(Widget* widget);
44764 void gtk_drag_dest_add_uri_targets(Widget* widget);
44765 Gdk2.Atom gtk_drag_dest_find_target(Widget* widget, Gdk2.DragContext* context, TargetList* target_list=null);
44766 TargetList* gtk_drag_dest_get_target_list(Widget* widget);
44767 int gtk_drag_dest_get_track_motion(Widget* widget);
44768 void gtk_drag_dest_set(Widget* widget, DestDefaults flags, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
44769 void gtk_drag_dest_set_proxy(Widget* widget, Gdk2.Window* proxy_window, Gdk2.DragProtocol protocol, int use_coordinates);
44770 void gtk_drag_dest_set_target_list(Widget* widget, TargetList* target_list=null);
44771 void gtk_drag_dest_set_track_motion(Widget* widget, int track_motion);
44772 void gtk_drag_dest_unset(Widget* widget);
44773 void gtk_drag_finish(Gdk2.DragContext* context, int success, int del, uint time_);
44774 void gtk_drag_get_data(Widget* widget, Gdk2.DragContext* context, Gdk2.Atom target, uint time_);
44775 Widget* gtk_drag_get_source_widget(Gdk2.DragContext* context);
44776 void gtk_drag_highlight(Widget* widget);
44777 void gtk_drag_set_default_icon(Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y);
44778 void gtk_drag_set_icon_default(Gdk2.DragContext* context);
44779 void gtk_drag_set_icon_name(Gdk2.DragContext* context, char* icon_name, int hot_x, int hot_y);
44780 void gtk_drag_set_icon_pixbuf(Gdk2.DragContext* context, GdkPixbuf2.Pixbuf* pixbuf, int hot_x, int hot_y);
44781 void gtk_drag_set_icon_pixmap(Gdk2.DragContext* context, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y);
44782 void gtk_drag_set_icon_stock(Gdk2.DragContext* context, char* stock_id, int hot_x, int hot_y);
44783 void gtk_drag_set_icon_widget(Gdk2.DragContext* context, Widget* widget, int hot_x, int hot_y);
44784 void gtk_drag_source_add_image_targets(Widget* widget);
44785 void gtk_drag_source_add_text_targets(Widget* widget);
44786 void gtk_drag_source_add_uri_targets(Widget* widget);
44787 TargetList* gtk_drag_source_get_target_list(Widget* widget);
44788 void gtk_drag_source_set(Widget* widget, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
44789 void gtk_drag_source_set_icon(Widget* widget, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
44790 void gtk_drag_source_set_icon_name(Widget* widget, char* icon_name);
44791 void gtk_drag_source_set_icon_pixbuf(Widget* widget, GdkPixbuf2.Pixbuf* pixbuf);
44792 void gtk_drag_source_set_icon_stock(Widget* widget, char* stock_id);
44793 void gtk_drag_source_set_target_list(Widget* widget, TargetList* target_list=null);
44794 void gtk_drag_source_unset(Widget* widget);
44795 void gtk_drag_unhighlight(Widget* widget);
44796 void gtk_draw_arrow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, ArrowType arrow_type, int fill, int x, int y, int width, int height);
44797 void gtk_draw_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44798 void gtk_draw_box_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width);
44799 void gtk_draw_check(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44800 void gtk_draw_diamond(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44801 void gtk_draw_expander(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, ExpanderStyle expander_style);
44802 void gtk_draw_extension(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side);
44803 void gtk_draw_flat_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44804 void gtk_draw_focus(Style* style, Gdk2.Window* window, int x, int y, int width, int height);
44805 void gtk_draw_handle(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation);
44806 void gtk_draw_hline(Style* style, Gdk2.Window* window, StateType state_type, int x1, int x2, int y);
44807 void gtk_draw_insertion_cursor(Widget* widget, Gdk2.Drawable* drawable, Gdk2.Rectangle* area, Gdk2.Rectangle* location, int is_primary, TextDirection direction, int draw_arrow);
44808 void gtk_draw_layout(Style* style, Gdk2.Window* window, StateType state_type, int use_text, int x, int y, Pango.Layout* layout);
44809 void gtk_draw_option(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44810 void gtk_draw_polygon(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Point* points, int npoints, int fill);
44811 void gtk_draw_resize_grip(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.WindowEdge edge, int x, int y, int width, int height);
44812 void gtk_draw_shadow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44813 void gtk_draw_shadow_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width);
44814 void gtk_draw_slider(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation);
44815 void gtk_draw_string(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, char* string_);
44816 void gtk_draw_tab(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
44817 void gtk_draw_vline(Style* style, Gdk2.Window* window, StateType state_type, int y1_, int y2_, int x);
44818 int gtk_events_pending();
44819 void gtk_exit(int error_code);
44820 int gtk_false();
44821 GLib2.Quark gtk_file_chooser_error_quark();
44822 Gdk2.GC* gtk_gc_get(int depth, Gdk2.Colormap* colormap, Gdk2.GCValues* values, Gdk2.GCValuesMask values_mask);
44823 void gtk_gc_release(Gdk2.GC* gc);
44824 Gdk2.Event* /*new*/ gtk_get_current_event();
44825 int gtk_get_current_event_state(/*out*/ Gdk2.ModifierType* state);
44826 uint gtk_get_current_event_time();
44827 Pango.Language* /*new*/ gtk_get_default_language();
44828 Widget* gtk_get_event_widget(Gdk2.Event* event);
44829 GLib2.OptionGroup* gtk_get_option_group(int open_default_display);
44830 void gtk_grab_add(Widget* widget);
44831 Widget* gtk_grab_get_current();
44832 void gtk_grab_remove(Widget* widget);
44833 int gtk_icon_size_from_name(char* name);
44834 char* gtk_icon_size_get_name(int size);
44835 int gtk_icon_size_lookup(int size, /*out*/ int* width, /*out*/ int* height);
44836 int gtk_icon_size_lookup_for_settings(Settings* settings, int size, /*out*/ int* width, /*out*/ int* height);
44837 int gtk_icon_size_register(char* name, int width, int height);
44838 void gtk_icon_size_register_alias(char* alias_, int target);
44839 GLib2.Quark gtk_icon_theme_error_quark();
44840 Type gtk_identifier_get_type();
44841 uint gtk_idle_add(Function function_, void* data);
44842 uint gtk_idle_add_full(int priority, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
44843 uint gtk_idle_add_priority(int priority, Function function_, void* data);
44844 void gtk_idle_remove(uint idle_handler_id);
44845 void gtk_idle_remove_by_data(void* data);
44846 void gtk_init(/*inout*/ int* argc, /*inout*/ char*** argv=null);
44847 void gtk_init_add(Function function_, void* data);
44848 int gtk_init_check(/*inout*/ int* argc, /*inout*/ char*** argv=null);
44849 int gtk_init_with_args(/*inout*/ int* argc, /*inout*/ char*** argv, char* parameter_string, GLib2.OptionEntry* entries, char* translation_domain, GLib2.Error** error);
44850 uint gtk_input_add_full(int source, Gdk2.InputCondition condition, Gdk2.InputFunction function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
44851 void gtk_input_remove(uint input_handler_id);
44852 uint gtk_key_snooper_install(KeySnoopFunc snooper, void* func_data);
44853 void gtk_key_snooper_remove(uint snooper_handler_id);
44854 void gtk_main();
44855 void gtk_main_do_event(Gdk2.Event* event);
44856 int gtk_main_iteration();
44857 int gtk_main_iteration_do(int blocking);
44858 uint gtk_main_level();
44859 void gtk_main_quit();
44860 void gtk_marshal_BOOLEAN__POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44861 void gtk_marshal_BOOLEAN__POINTER_INT_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44862 void gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44863 void gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44864 void gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44865 void gtk_marshal_BOOLEAN__VOID(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44866 void gtk_marshal_ENUM__ENUM(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44867 void gtk_marshal_INT__POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44868 void gtk_marshal_INT__POINTER_CHAR_CHAR(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44869 void gtk_marshal_VOID__ENUM_FLOAT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44870 void gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44871 void gtk_marshal_VOID__INT_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44872 void gtk_marshal_VOID__INT_INT_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44873 void gtk_marshal_VOID__POINTER_INT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44874 void gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44875 void gtk_marshal_VOID__POINTER_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44876 void gtk_marshal_VOID__POINTER_POINTER_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44877 void gtk_marshal_VOID__POINTER_POINTER_UINT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44878 void gtk_marshal_VOID__POINTER_STRING_STRING(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44879 void gtk_marshal_VOID__POINTER_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44880 void gtk_marshal_VOID__POINTER_UINT_ENUM(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44881 void gtk_marshal_VOID__POINTER_UINT_UINT(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44882 void gtk_marshal_VOID__STRING_INT_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44883 void gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44884 void gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44885 void gtk_marshal_VOID__UINT_STRING(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data);
44886 void gtk_paint_arrow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, ArrowType arrow_type, int fill, int x, int y, int width, int height);
44887 void gtk_paint_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44888 void gtk_paint_box_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width);
44889 void gtk_paint_check(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44890 void gtk_paint_diamond(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44891 void gtk_paint_expander(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, ExpanderStyle expander_style);
44892 void gtk_paint_extension(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side);
44893 void gtk_paint_flat_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44894 void gtk_paint_focus(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44895 void gtk_paint_handle(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation);
44896 void gtk_paint_hline(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x1, int x2, int y);
44897 void gtk_paint_layout(Style* style, Gdk2.Window* window, StateType state_type, int use_text, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, Pango.Layout* layout);
44898 void gtk_paint_option(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44899 void gtk_paint_polygon(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.Point* points, int n_points, int fill);
44900 void gtk_paint_resize_grip(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.WindowEdge edge, int x, int y, int width, int height);
44901 void gtk_paint_shadow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44902 void gtk_paint_shadow_gap(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width);
44903 void gtk_paint_slider(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation);
44904 void gtk_paint_spinner(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, uint step, int x, int y, int width, int height);
44905 void gtk_paint_string(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, char* string_);
44906 void gtk_paint_tab(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height);
44907 void gtk_paint_vline(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int y1_, int y2_, int x);
44908 char* gtk_paper_size_get_default();
44909 GLib2.List* /*new*/ gtk_paper_size_get_paper_sizes(int include_custom);
44910 int gtk_parse_args(/*inout*/ int* argc, /*inout*/ char*** argv);
44911 GLib2.Quark gtk_print_error_quark();
44912 PageSetup* /*new*/ gtk_print_run_page_setup_dialog(Window* parent, PageSetup* page_setup, PrintSettings* settings);
44913 void gtk_print_run_page_setup_dialog_async(Window* parent, PageSetup* page_setup, PrintSettings* settings, PageSetupDoneFunc done_cb, void* data);
44914 void gtk_propagate_event(Widget* widget, Gdk2.Event* event);
44915 uint gtk_quit_add(uint main_level, Function function_, void* data);
44916 void gtk_quit_add_destroy(uint main_level, Object* object);
44917 uint gtk_quit_add_full(uint main_level, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
44918 void gtk_quit_remove(uint quit_handler_id);
44919 void gtk_quit_remove_by_data(void* data);
44920 void gtk_rc_add_class_style(RcStyle* rc_style, char* pattern);
44921 void gtk_rc_add_default_file(char* filename);
44922 void gtk_rc_add_widget_class_style(RcStyle* rc_style, char* pattern);
44923 void gtk_rc_add_widget_name_style(RcStyle* rc_style, char* pattern);
44924 char* /*new*/ gtk_rc_find_module_in_path(char* module_file);
44925 char* /*new*/ gtk_rc_find_pixmap_in_path(Settings* settings, GLib2.Scanner* scanner, char* pixmap_file);
44926 char** gtk_rc_get_default_files();
44927 char* /*new*/ gtk_rc_get_im_module_file();
44928 char* /*new*/ gtk_rc_get_im_module_path();
44929 char* /*new*/ gtk_rc_get_module_dir();
44930 Style* gtk_rc_get_style(Widget* widget);
44931 Style* gtk_rc_get_style_by_paths(Settings* settings, char* widget_path, char* class_path, Type type);
44932 char* /*new*/ gtk_rc_get_theme_dir();
44933 void gtk_rc_parse(char* filename);
44934 uint gtk_rc_parse_color(GLib2.Scanner* scanner, /*out*/ Gdk2.Color* color);
44935 uint gtk_rc_parse_color_full(GLib2.Scanner* scanner, RcStyle* style, /*out*/ Gdk2.Color* color);
44936 uint gtk_rc_parse_priority(GLib2.Scanner* scanner, PathPriorityType* priority);
44937 uint gtk_rc_parse_state(GLib2.Scanner* scanner, StateType* state);
44938 void gtk_rc_parse_string(char* rc_string);
44939 int gtk_rc_property_parse_border(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
44940 int gtk_rc_property_parse_color(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
44941 int gtk_rc_property_parse_enum(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
44942 int gtk_rc_property_parse_flags(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
44943 int gtk_rc_property_parse_requisition(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
44944 int gtk_rc_reparse_all();
44945 int gtk_rc_reparse_all_for_settings(Settings* settings, int force_load);
44946 void gtk_rc_reset_styles(Settings* settings);
44947 GLib2.Scanner* gtk_rc_scanner_new();
44948 void gtk_rc_set_default_files(char** filenames);
44949 GLib2.Quark gtk_recent_chooser_error_quark();
44950 GLib2.Quark gtk_recent_manager_error_quark();
44951 void gtk_rgb_to_hsv(double r, double g, double b, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v);
44952 void gtk_selection_add_target(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint info);
44953 void gtk_selection_add_targets(Widget* widget, Gdk2.Atom selection, TargetEntry* targets, uint ntargets);
44954 int gtk_selection_clear(Widget* widget, Gdk2.EventSelection* event);
44955 void gtk_selection_clear_targets(Widget* widget, Gdk2.Atom selection);
44956 int gtk_selection_convert(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint time_);
44957 int gtk_selection_owner_set(Widget* widget, Gdk2.Atom selection, uint time_);
44958 int gtk_selection_owner_set_for_display(Gdk2.Display* display, Widget* widget, Gdk2.Atom selection, uint time_);
44959 void gtk_selection_remove_all(Widget* widget);
44960 char* /*new*/ gtk_set_locale();
44961 void gtk_show_about_dialog(Window* parent, char* first_property_name, ...);
44962 int gtk_show_uri(Gdk2.Screen* screen, char* uri, uint timestamp, GLib2.Error** error);
44963 void gtk_signal_compat_matched(Object* object, GObject2.Callback func, void* data, GObject2.SignalMatchType match, uint action);
44964 c_ulong gtk_signal_connect_full(Object* object, char* name, GObject2.Callback func, CallbackMarshal unsupported, void* data, GLib2.DestroyNotify destroy_func, int object_signal, int after);
44965 void gtk_signal_connect_object_while_alive(Object* object, char* name, GObject2.Callback func, Object* alive_object);
44966 void gtk_signal_connect_while_alive(Object* object, char* name, GObject2.Callback func, void* func_data, Object* alive_object);
44967 void gtk_signal_emit(Object* object, uint signal_id, ...);
44968 void gtk_signal_emit_by_name(Object* object, char* name, ...);
44969 void gtk_signal_emit_stop_by_name(Object* object, char* name);
44970 void gtk_signal_emitv(Object* object, uint signal_id, Arg* args);
44971 void gtk_signal_emitv_by_name(Object* object, char* name, Arg* args);
44972 uint gtk_signal_new(char* name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, ...);
44973 uint gtk_signal_newv(char* name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, Type* args);
44974 void gtk_stock_add(StockItem* items, uint n_items);
44975 void gtk_stock_add_static(StockItem* items, uint n_items);
44976 GLib2.SList* /*new*/ gtk_stock_list_ids();
44977 int gtk_stock_lookup(char* stock_id, /*out*/ StockItem* item);
44978 void gtk_stock_set_translate_func(char* domain, TranslateFunc func, void* data, GLib2.DestroyNotify notify);
44979 void gtk_target_table_free(TargetEntry* targets, int n_targets);
44980 TargetEntry* /*new*/ gtk_target_table_new_from_list(TargetList* list, /*out*/ int* n_targets);
44981 int gtk_targets_include_image(Gdk2.Atom* targets, int n_targets, int writable);
44982 int gtk_targets_include_rich_text(Gdk2.Atom* targets, int n_targets, TextBuffer* buffer);
44983 int gtk_targets_include_text(Gdk2.Atom* targets, int n_targets);
44984 int gtk_targets_include_uri(Gdk2.Atom* targets, int n_targets);
44985 Widget* gtk_test_create_simple_window(char* window_title, char* dialog_text);
44986 Widget* gtk_test_create_widget(Type widget_type, char* first_property_name=null, ...);
44987 Widget* gtk_test_display_button_window(char* window_title, char* dialog_text, ...);
44988 Widget* gtk_test_find_label(Widget* widget, char* label_pattern);
44989 Widget* gtk_test_find_sibling(Widget* base_widget, Type widget_type);
44990 Widget* gtk_test_find_widget(Widget* widget, char* label_pattern, Type widget_type);
44991 void gtk_test_init(/*inout*/ int* argcp, /*inout*/ char*** argvp, ...);
44992 Type* gtk_test_list_all_types(/*out*/ uint* n_types);
44993 void gtk_test_register_all_types();
44994 double gtk_test_slider_get_value(Widget* widget);
44995 void gtk_test_slider_set_perc(Widget* widget, double percentage);
44996 int gtk_test_spin_button_click(SpinButton* spinner, uint button, int upwards);
44997 char* /*new*/ gtk_test_text_get(Widget* widget);
44998 void gtk_test_text_set(Widget* widget, char* string_);
44999 int gtk_test_widget_click(Widget* widget, uint button, Gdk2.ModifierType modifiers);
45000 int gtk_test_widget_send_key(Widget* widget, uint keyval, Gdk2.ModifierType modifiers);
45001 void gtk_text_anchored_child_set_layout(Widget* child, TextLayout* layout);
45002 uint gtk_timeout_add(uint interval, Function function_, void* data);
45003 uint gtk_timeout_add_full(uint interval, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
45004 void gtk_timeout_remove(uint timeout_handler_id);
45005 TooltipsData* gtk_tooltips_data_get(Widget* widget);
45006 int gtk_tree_get_row_drag_data(SelectionData* selection_data, /*out*/ TreeModel** tree_model, /*out*/ TreePath** path);
45007 void gtk_tree_row_reference_deleted(GObject2.Object* proxy, TreePath* path);
45008 void gtk_tree_row_reference_inserted(GObject2.Object* proxy, TreePath* path);
45009 void gtk_tree_row_reference_reordered(GObject2.Object* proxy, TreePath* path, TreeIter* iter, int* new_order);
45010 int gtk_tree_set_row_drag_data(SelectionData* selection_data, TreeModel* tree_model, TreePath* path);
45011 int gtk_true();
45012 void* gtk_type_class(Type type);
45013 EnumValue* gtk_type_enum_find_value(Type enum_type, char* value_name);
45014 EnumValue* gtk_type_enum_get_values(Type enum_type);
45015 FlagValue* gtk_type_flags_find_value(Type flags_type, char* value_name);
45016 FlagValue* gtk_type_flags_get_values(Type flags_type);
45017 void gtk_type_init(GObject2.TypeDebugFlags debug_flags);
45018 void* gtk_type_new(Type type);
45019 Type gtk_type_unique(Type parent_type, TypeInfo* gtkinfo);